Wednesday, November 7, 2012

GET HTTP (LWP:Simple/Time:LocalTime)

#!/usr/bin/perl

use LWP::Simple;
use Time::localtime;
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 $r = getprint("http://$t/") or die ("Unable to get page!");
##
##
}
sub usg(){
print "[!] usg: perl get.pl  \n";
}
exit ;

No comments:

Post a Comment