<? // hostsfinder.php by Nilesh Dosooye (nileshd@webmauritius.com) // Copyright (C) 2001 Nilesh Dosooye // http://nilesh.webmauritius.com // // --- GNU General Public License Disclamer --- // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details.
$ipaddress=getenv("remote_addr");
if ($Submit=="Find all hosts on this domain") {
echo "Your Input was : <b><font color=red face=arial>$input</font></b><br>"; $ipadd=gethostbyname ($input);
list($ip1,$ip2,$ip3,$ip4)=explode('.',$ipadd);
for ($a=0;$a<256;$a++) { $scanip="$ip1.$ip2.$ip3.$a"; $newhostname=gethostbyaddr($scanip); echo "$scanip ---> <a href=\"http://$newhostname\">$newhostname</a><br>"; }
}
?>
<form method="post" action="<? echo $PHP_SELF; ?>"> <p><font face="Verdana, Arial, Helvetica, sans-serif"><b><font size="+1">HostsFinder.php</font></b><font size="+1"> <a href="http://nilesh.webmauritius.com"> <font size="-2">by Nilesh Dosooye</font></a></font></font></p> <p><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">This utility allows you to find all hostnames (if any) on a particular domain. You can either put a hostname or an ip address and program will scan the entire subdomain to locate hosts.</font></p> <p><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Hostname or Ipaddress :</b> <input type="text" name="input" size="40" value="<? echo $ipaddress; ?>"> </font></p> <p> <font face="Verdana, Arial, Helvetica, sans-serif"> <input type="submit" name="Submit" value="Find all hosts on this domain"> </font></p> </form>
|