$b2 = $eip[1];
$c2 = $eip[2];
$d2 = $eip[3];
}
# Based on the IP subnet (Class A, B, C) set the
# correct variables.
check_end();
$aend=$a2;
# Create the array. while ($al < $aend) {
while ($b1 < $bend) {
while ($c1 < $cend) {
while ($d1 < $dend) {
push (@hosts, "$al.$bl.$c1.sdl"); $d1+=1;
check_end();
}
$c]+=1;
$dl=0;
}
$b1+=1;
$cl=0;
}
$al+=1;
$b1=0;
}
}
}
sub portscan {
my $target
= $_[0];
القسم الرابع - قرصنة البرمجيات
print "Port scanning $target.";
local $/;
open(SCAN, "nc -vzn -w 2 $target 80 2>>&1 I"); # Port open $result = <SCAN>;
if ($result =~/open/) {
print "\tPort 80 on $target found open.\n";
print OUTFILE "Port 80 open\n";
open (HTTP, ">http.tmp");
640
ص٦٤٠