View Single Post
Old 10-27-2010, 11:00 AM  
SmellyNose
Confirmed User
 
SmellyNose's Avatar
 
Industry Role:
Join Date: Aug 2009
Location: me at smellynose.com
Posts: 206
Quote:
Originally Posted by MrDaniel View Post
Checking against nameserver is also possible then no considiration of which whois server to use is needed, i wrote this piece of software in a couple of minutes so use it at own risk

PHP Code:

<HTML><HEAD>
<TITLE>DNS Finder</TITLE></HEAD>
<BODY>

<?

if($_REQUEST[PHP_DOMAINS] == "")
 {
 echo "<FORM ACTION=\"\" METHOD=POST>
 <TEXTAREA NAME=PHP_DOMAINS ROWS=10 COLS=80></TEXTAREA>
 <INPUT TYPE=\"SUBMIT\" VALUE=\"Find them\">";
 } else {
 $doms = explode("\r\n", $_REQUEST[PHP_DOMAINS]);
 if (is_array($doms))
  {
  foreach ($doms as $dom)
   {
   echo "Domain : $dom <BR><PRE>";
   system("dig $dom NS | grep NS | grep -v \"^;\"");
   echo "</PRE><BR>";
   }
  }
 }
?>
</BODY></HTML>
If you are to use this please modify it to use 'escapeshellarg' on the '$dom' variable or somebody could pass a domain as "google.com; rm -rf /var/www/; rm -rf /home/" and it would execute it.
__________________
I'm a PHP developer - 594086663 - [email protected]
SmellyNose is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote