#!/usr/bin/perl use IO::Socket; #unless (@ARGV) { die "usage: $0 URL\n" } die "Usage: $0 ip\n" unless(@ARGV==1); for ($b=0; $b <= 255; $b++) { for ($c=0; $c <= 255; $c++) { for ($d=0; $d <= 255; $d++) { $url = "http://$ARGV[0].$b.$c.$d/oiuert.tct"; #$url = "http://12.101.189.130/p.tttt"; $EOL = "\015\012"; $BLANK = $EOL x 2; $sep = ($url > 1) ? "-------------------\n" : ""; $host = "$ARGV[0].$b.$c.$d"; #$host = "12.101.189.130"; print "\nConnecting to: $host\n"; $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $host, PeerPort => "http(80)", ); if ($remote ==0) {print "Cannot connect to http daemon on $host\n" } else { $remote->autoflush(1); print $remote "GET $url HTTP/1.0" . $BLANK; while ( <$remote> ) { print } print "\n$sep"; close $remote;} } } }