Wire Transfer - Personal Loans - Debt - Office Depot - Dell Coupons

PDA

View Full Version : Someone can give a usefull help here?


deny
Dec 18th 2007, 7:34 am
I have found some script that give output of all domains listed on same class ip. For example if you input 208.76.80.74 output will be:


Your Input was : 208.76.80.74
208.76.80.0 ---> 208.76.80.0
208.76.80.1 ---> gateway.tchmachines.com
208.76.80.2 ---> bala.tchmachines.com
208.76.80.3 ---> gw1.tchmachines.com
208.76.80.4 ---> notprovisioned.tchmachines.com
208.76.80.5 ---> notprovisioned.tchmachines.com
208.76.80.6 ---> notprovisioned.tchmachines.com
208.76.80.7 ---> notprovisioned.tchmachines.com
208.76.80.8 ---> etc...etc....
208.76.80.9 --->etc..etc...
208.76.80.251 ---> notprovisioned.tchmachines.com
208.76.80.252 ---> notprovisioned.tchmachines.com
208.76.80.253 ---> notprovisioned.tchmachines.com
208.76.80.254 ---> gw2.tchmachines.com
208.76.80.255 ---> notprovisioned.tchmachines.com


This is code.


<?
$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>";
}

}


?>


It looks to me similar but can not figure out to get all domains on same ip address as can be seen here:
reverseiplookup.net

Any idea? Help? Way of modified script above?

Thanks

kmap
Dec 19th 2007, 8:36 am
try to replace $scanip="$ip1.$ip2.$ip3.$a"; -> $scanip="$ip1.$ip2.$ip3.$ip4";

sunnyverma1984
Dec 19th 2007, 8:55 am
try to replace $scanip="$ip1.$ip2.$ip3.$a"; -> $scanip="$ip1.$ip2.$ip3.$ip4";
hahaha
kmap how for loop will work if he will not use $a variable

Tanzil Ahmed
Dec 19th 2007, 8:58 am
sunny is right its looping