apache log shooter(GET)
programming/perl 2009. 10. 11. 18:58 |$ua = LWP::UserAgent->new;
require HTTP::Request;
require HTTP::Response;
if( $#ARGV != 1 )
{ die "Usage: geturireq.pl [target IP] [FileName]\nEx: geturireq.pl 192.168.1.20 Query.txt\n"; }
$ipaddress = $ARGV[0];
$fileName = $ARGV[1] ;
if( -d $fileName )
{ die "$fileName is a directory.\n"; }
-e $fileName || die "$fileName is not exist.\n";
-T $fileName || die "$fileName is not a text file.\n";
open( fileHandle, $fileName ) || die "Cannot open $fileName.\n";
$i = 1;
while($aLine =<fileHandle>)
{
if($aLine=~/(?<=GET\s).*(?=\sHTTP\/\d\.\d)/)
{
$qu = 'http://'.$ipaddress.$&;
$req = HTTP::Request->new(GET => $qu);
$res = $ua->request($req);
print $i.'. '.$qu."\r\n";
$i=$i+1;
}
}
'programming > perl' 카테고리의 다른 글
HTTP 파일업로드(Perl) (0) | 2009.12.30 |
---|---|
web login dictionary attack (0) | 2009.12.03 |
HTTP요청 스크립트(ActivePerl) form-data (0) | 2009.11.19 |
WireShark HTTP파싱 스크립트 (0) | 2009.09.30 |
HTTP요청 스크립트(ActivePerl) (0) | 2009.09.30 |