use LWP::Simple;
use Time::localtime;
use LWP::UserAgent;
##
print "[+] GET Http Modem\n";
##
sub timestamp {
my $c = localtime;
return sprintf( "%04d-%02d-%02d_%02d-%02d-%02d",
$c->year + 1900, $c->mon + 1, $c->mday,
$c->hour, $c->min, $c->sec );
}
print '[+] Date: [' . timestamp() . ']'. "\n";
##
##
if (@ARGV == 0) {&usg;}
$t = shift(@ARGV);
{
print "[!] Target: $t\n";
}
##
##
##
my $ua = LWP::UserAgent->new;
$ua->agent('Mozilla/5.0');
$ua->proxy([(http )] => 'socks://127.0.0.1:9050');
$ua->cookie_jar({});
my $r = $ua->get("http://$t/") or die ("Unable to get page!");
print $r->content;
##
sub usg(){
print "[!] usg: perl get.pl
}
exit ;
p/s :
Make sure you install the module of LWP::Protocol::socks to make the tor proxy working.
#cpan install
LWP::Protocol::socks
By the way this was simplified just for my own used.Everyone have their own view and style. Please google for more info.
LWP::Protocol::http::socks::Socket: Host unreachable
ReplyDeleteSorry for late reply.you can try http://www.perlmonks.org/?node=LWP-timeout
Deletethanks
ReplyDelete