Version: 1.01
Type: Full Script
Category: Networking
License: GNU General Public License
Description: PHP Domain Scanner.. you can download whole pack (portcaner+java&pic) at http://galeb.etf.bg.ac.yu/~blue_ice/ps.zip here at PHPbuilder.com you have only domain scanner blue_ice@galeb.etf.bg.ac.yu
################################
here you have TWO files...
it's realy important to give them specified names
######## file 1: domain.php ########
<html>
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<TITLE> NeO:TeK </TITLE>
<style type="text/css"><!--
body { color:#000000;font-family:verdana;font-size:10px;}
td { color:#505050;font-family:verdana;font-size:10.4px;}
a {font-family: verdana; text-decoration: none;}
a:link {color:#343434;}
a:visited {color:#989898;}
a:active {color:#000077;}
a:hover {color:#3344ef;}
--></style>
</head>
<body bgcolor=#ffffff leftmargin=0 topmargin=0 rightmargin=0>
<div style="background:#353535; font-size:9;">
<center>
<span style="color:#878787;">
<?
echo "your ip: ",$REMOTE_ADDR ;
?>
</span>
</center>
</div>
<center>
<div style="background:#565656; font-size:23; height:75;">
PHP Domain Scanner
</center>
</div>
<center>
<div style="background:#636363; font-size:12; height:23;">
just enter your ip & port range bellow
</div>
<div style="background:#737373; font-size:10; height=150">
<form action="domainresults.php" method="post" />
from ip:<input type="text" name="a" size="3" value=127 />
.<input type="text" name="b" size="3" value=0 />
.<input type="text" name="c" size="3" value=0 />
.<input type="text" name="d" size="3" value =1 />*<br>
to ip:
   <input type="text" name="au" size="3" value=127 />
.<input type="text" name="bu" size="3" value=0 />
.<input type="text" name="cu" size="3" value=0 />
.<input type="text" name="du" size="3" value=1 />
<span style="color:#434343;">
 <br>
<br>
*every field in this row must be less or equal as field below him
<br>
<br><br>
</span>
from port:<input type="text" name="port" size="6" value=23 />
to port:<input type="text" name="porte" size="6" value=119 />
<br>
<input type="submit" value="Go" size="3" /><br>
</center>
</div>
<div style="background:#737373; font-size:10; height=15">
<P align=right>
return to <a href=portscanner.php>PHP Port scanner</a></p>
</div>
<div style="background:686868; height:24; " >
<center>
<font style="font-size:11px ;"><b>PHP domain scanner V1.01</b></font>
</div>
<div style="background:505050; height:16; " >
<font style="font-size:8px ;"><b>by kodi © 2002</b></font>
</center>
</div>
<table width=100% height=130 topmargin=0 leftmargin=0 border=0 cellspacing=0 cellpading=0>
<tr>
<td background=poz1.jpg>
<P align=center valign=top>
<?
print (date( "H:i: D-d F Y"))
?> <br>
</p>
</td>
</tr>
</table>
</body>
</html>
######## file 2: domainresults.php #########
<html>
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<TITLE> NeO:TeK </TITLE>
<style type="text/css"><!--
body { color:#000000;font-family:verdana;font-size:10px;}
td { color:#c6c6c6;font-family:verdana;font-size:10.4px;}
a {font-family: verdana; text-decoration: none;}
a:link {color:#808080;}
a:visited {color:#808080;}
a:active {color:#FF4000;}
a:hover {color:#FF4000;}
--></style>
</head>
<body bgcolor=#e7e7e7 leftmargin=0 topmargin=0 rightmargin=0>
<div style="background:707070;">
<font>
</font>
<center>
your ip:
<?
echo $REMOTE_ADDR;
?>
</div>
<div style="background:505050; height:100; " >
<br>
<font style="font-size:14px ;"><b> kodi's online PHP portscanner <br> results for:</b><br>
<?
echo $host
?>
</font>
</div>
<?
/*
PHP domain scan
$ip=$a.".".$b . ".".$c . "." .$d; */
$test=$a*$b*$c*$d;
$A=$a;$B=$b;$C=$c;$D=$d;
$broj=0;
for($a=$A; $a<=$au; $a++ ){
for($b=$B; $b<=$bu; $b++ ){
for($c=$C; $c<=$cu; $c++ ){
for($d=$D; $d<=$du; $d++ ){
$dc=$d;
for ($p=$port; $p <=$porte; $p++){
if (getservbyport($p,"tcp")!=null)
{
$service = getservbyport($p,"tcp"); } else { $service = "Unknown Service";
}
$fp = fsockopen ($ip=$a.".".$b . ".".$c . "." .$d , $p , &$errno, &$errstr, 0.2);
if (!$fp){
# uncoment lines below if you want to see error mesages for every ip
# (not recommended)
# echo $errno;
# echo $errstr;
#
#$ipres=@gethostbyaddr($ip);
# echo "<b>"," $ipres ","error","</b> ","$errstr ($errno)\n";
# echo "<br>";
} else{
if ($dc==$d){
$ipres=@gethostbyaddr($ip);
echo".......................","<br>";
echo "host ","<b>",$ipres,"</b>"," is open on port(s): ","<br>......................<br>",$p," -
",$service,"<br>";
$dc++;
$broj++;
}else{
$ipres=@gethostbyaddr($ip);
echo $p," - ",$service, "<br>";
}
}
}#end of port check for current host
#end of ip creating
}
}
}
}
?>
<br>
<?
echo $broj," :houst ";
?>
found
</body>
</html>