>>>Er is geen PTR RECORD Reverse DNS aangemaakt op dit IP-adres.

"; } else { echo "verwezen naar de volgende host: $host_name

"; } } // Function to find the country location of the machine host/ip function ip_to_country($host_ip) { // Do a whois on the ip using "whois.arin.net" and store the results in $buffer $buffer = nl2br(whois_ip('whois.arin.net', '-1', 'FALSE',$host_ip)); echo $buffer; // $buffer = whois_ip('whois.arin.net', '-1', 'TRUE',$host_ip); // $buffer=print_r_html($buffer); // If the whois contains a line for a referral server, do a new whois using this server and store in $buffer // this works if (eregi("ReferralServer:[[:space:]]*[a-z]*(whois://)*([a-z0-9-][\.a-z0-9-]{2,})[:]*([0-9]+)*", $buffer, $regs)) if (eregi("ReferralServer:[[:space:]]*[a-z]*(whois://)*([a-z0-9-][\.a-z0-9-]{2,})[:]*([0-9]+)*", $buffer, $regs)) // if (preg_match_all("ReferralServer:[[:space:]]*[a-z]*(whois://)*([a-z0-9-][\.a-z0-9-]{2,})[:]*([0-9]+)*", $buffer, $regs)) // if (preg_match("/ReferralServer:[[:space:]]*[a-z]*(whois:\/\/)*([a-z0-9-][\.a-z0-9-]{2,})[:]*([0-9]+)*/i", $buffer, $regs)) // if (preg_match('/ReferralServer: whois:\/\//', $buffer, $regs)) // if($regs == explode("whois://",$buffer)) { $referral_host = $regs[2]; echo"REFERRAL HOST " . $referral_host . "
"; $referral_port = $regs[3]; echo"REFERRAL port " . $referral_port . "
"; $buffer = nl2br(whois_ip($referral_host, $regs[3], 'FALSE', $host_ip)); // $buffer = whois_ip($referral_host, $regs[3], 'FALSE', $host_ip); // echo $buffer; } // If there is a line labeled "country", get its value and print it... if (eregi("country:[[:space:]]*([a-z]{2,})", $buffer, $regs)) { // Store the value of the "country" line from the buffer $country = $regs[1]; // Caching of the country list: If the file "list_file.txt" exists on the server, the country list was already cached, // so read it into the $list_file variable... if (file_exists('list_file.txt')) { $list_file = @file_get_contents('list_file.txt'); } // ...otherwise, download the country list and cache it on the server in the file "list_file.txt" else { // The ISO standards website provides a free text file listing every country and it's 2 character country code - // download this file and store it in the $list_file variable $list_file = @file_get_contents('http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1-semic.txt'); // Cache the country code list on the server $fp = fopen('list_file.txt', 'w'); @fwrite($fp, $list_file); fclose($fp); } // Convert the new line characters in the file contents to HTML line breaks and split it at each line into an array $list_file_br = nl2br($list_file); $list_rows = explode("
", $list_file_br); // Define an array to store the country info $country_list = array(); // Loop through each line in the file and save the 2 character country code and it's full name // in the $country_list array for ($i = 1; $i < count($list_rows); $i++) { $row = explode(";", $list_rows[$i]); $row_abbr = $row[1]; $row_name = ucwords(strtolower($row[0])); $country_list[$row_abbr] = $row_name; } // echo $buffer; // echo "
Whois IP nr results:
"; print_r_html($buffer); //echo "
Whois IP nr results:
"; print_r_html($buffer); // If the country in the whois buffer is in the country_list array, print its full name... if (array_key_exists($country, $country_list)) { echo "Location:  $country_list[$country] ($country)

"; } // ...otherwise, just print the 2 character country code listed in the whois buffer else { echo "Location:  $country

"; } } // ...or if there is no "country" line, print location unknown else { echo 'Location:  Unknown

'; } // echo $buffer; // echo "
Whois IP nr results:
"; print_r_html($buffer); echo "
Whois IP nr results:
"; print_r_html($buffer); echo ""; // If the country in the whois buffer is in the country_list array, print its full name... return $buffer; } // Function to perform a whois lookup on the machine's ip address function whois_ip($whois_ip_server, $whois_ip_port, $do_echo, $host_ip) { if (eregi("^[a-z0-9\:\.\-]+$", $whois_ip_server)) { //global $host_ip; // The whois server "whois.arin.net" requires a "+" flag to get all the details //if ($whois_ip_server == 'whois.arin.net') { //$whois_ip_server .= ' +'; } $host_ip= $host_ip; // Set a variable containing the command to be sent to the system //$command = "whois -h $whois_ip_server $host_ip"; $command = $host_ip; // If we passed a specific port to this function to connect to, add the necessary info to the command //if ($whois_ip_port > 0) { //$command .= " -p $whois_ip_port"; } echo "
Whois ip port>" . $whois_ip_port . "
"; if($whois_ip_port == '' || $whois_ip_port == -1 || $whois_ip_port == '43'){ $whois_ip_port = '43';} // Send the whois command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. //$fp = shell_exec("$command 2>&1"); $nic_server=$whois_ip_server; //echo "nicserver is" . $nicserver; if($nic_server){ $timeout=2; $conn = fsockopen ($nic_server, $whois_ip_port, $errno, $errstr, $timeout); print "in whois check ............" . "conn=" . $conn . " ...server: ... " . $nic_server . " " . $d_sch . "
"; $output=""; if($conn){ //fwrite($conn, "whois " . $d_sch."\r\n"); fwrite($conn, $command . "\r\n"); while(!feof($conn)) { $output .= fgets($conn,4096); // $outputnew1 .= fgets($conn,1024); //$output .= $outputnew1; } fclose($conn); $fp = $output; // echo "fp =" . $fp . "
"; } else { echo "Error: Could not connect to $nic_server "; } } // If the $do_echo variable is set to "TRUE", send the results to the parse_output() function... if ($do_echo == 'TRUE') { //echo "fp arin =" . $fp; $output = 'Whois (IP) Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // ...otherwise, return the results in a variable (i.e. for the ip_to_country() function) else { return $fp; } } else { echo 'Whois (IP) Results:
'; echo '
'; echo 'Bewerking afgebroken. Onjuiste karakters ingevoerd!
Check of er geen spatie voor/achter de host/ip is geplaatst'; echo '
'; } } // Function to perform a whois lookup on a domain function whois_domain($host, $whois_domain_server) { if (eregi("^[a-z0-9\.\-]+$", $whois_domain_server)) { global $host_name, $host_ip; // Set the default value for a variable $whois_host = $host; // Split the host into its domain levels $split_host = explode('.', $host_name); // If the host name contains "www", remove it if ($split_host[0] == 'www') { array_shift($split_host); $whois_host = implode(".", $split_host); } // If searching a japanese whois server, use the "/e" switch to suppress japanese characters in the output if (substr($whois_domain_server, -3) == '.jp') { $whois_host .= '/e'; } // Set a variable containing the command to be sent to the system $command = "whois -h $whois_domain_server $whois_host"; // Send the whois command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Whois (Domain) Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } else { echo 'Whois (Domain) Results:
'; echo '
'; echo 'Bewerking afgebroken. Onjuiste karakters ingevoerd!
Check of er geen spatie voor/achter de host/ip is geplaatst'; echo '
'; } } // Function to perform an NS Lookup on a host/ip function nslookup($host) { // Set initial command to be run on the server $command = "nslookup $host -sil"; // Send the nslookup command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'NS Lookup Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform a dig on a host/ip function dig($host, $dig_class, $dig_server) { if (eregi("^[a-z0-9\.\-]*$", $dig_server)) { // Set initial command to be run on the server $command = "dig -t $dig_class $host"; // If a dig server has been entered, add the necessary info to the command if ($dig_server) { $command .= ' @' . $dig_server; } // Send the dig command to the system // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = "Dig Results ($dig_class):
"; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } else { echo "Dig Results ($dig_class):
"; echo '
'; echo 'Bewerking afgebroken. Onjuiste karakters ingevoerd!
Check of er geen spatie voor/achter de host/ip is geplaatst'; echo '
'; } } // Function to retreive HTTP request info function http_req($http_type) { global $url_parts; if (isset($url_parts)) { $http_query = "$http_type " . $url_parts['path']; if (isset($url_parts['query'])) { $http_query .= '?' . $url_parts['query']; } $http_query .= " HTTP/1.0\r\n"; $http_query .= 'Host: ' . $url_parts['host'] . "\r\n"; $http_query .= "Connection: close\r\n"; $http_query .= "\r\n"; // Create a connection to the server $fp = @fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, 30); $buffer = ''; // If a connection to the server was made, send out request data and save the response to $buffer if ($fp) { @fwrite($fp, $http_query); while (!feof($fp)) { $buffer .= fgets($fp, 4096); } fclose($fp); // Save the results as a variable and send to the parse_output() function $output = "HTTP Request Results ($http_type):
"; $output .= '
'; $output .= '
' . htmlentities(trim($buffer)) . '
'; $output .= '
'; parse_output($output); } else { echo "HTTP Request Results ($http_type):
"; echo '
'; echo 'Could not connect to the specified server.'; echo '
'; } } else { echo "HTTP Request Results ($http_type):
"; echo '
'; echo 'The address in the Host field is either not a URL, or does not appear to be using the HTTP protocol.'; echo '
'; } } // Function to perform a ping on a host/ip function ping($host, $ping_count) { // Set initial command to be run on the server $command = "ping -c $ping_count $host"; // Send the ping command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Ping Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform a traceroute on a host/ip function traceroute($host) { // Set initial command to be run on the server $command = "traceroute $host"; // Send the traceroute command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Traceroute Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform a tracepath on a host/ip function tracepath($host) { // Set initial command to be run on the server $command = "tracepath $host"; // Send the tracepath command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); // Save the results as a variable and send to the parse_output() function $output = 'Tracepath Results:
'; $output .= '
'; $output .= nl2br(htmlentities(trim($fp))); $output .= '
'; parse_output($output); } // Function to perform an nmap on a host/ip function nmap($host, $nmap_options) { if (eregi("^[a-z0-9 @_:,-\.\*\/]+$", $nmap_options)) { // Set initial command to be run on the server $command = "nmap $nmap_options $host"; // Send the nmap command to the system. // Normally, the shell_exec function does not report STDERR messages. The "2>&1" option tells the system // to pipe STDERR to STDOUT so if there is an error, we can see it. $fp = shell_exec("$command 2>&1"); echo 'Nmap Results:
'; echo '
'; echo nl2br(htmlentities(trim($fp))); echo '
'; } else { echo 'Nmap Results:
'; echo '
'; echo 'Bewerking afgebroken. Onjuiste karakters ingevoerd!
Check of er geen spatie voor/achter de host/ip is geplaatst'; echo '
'; } } // Function to parse the results of various commands to create shortcut links function parse_output($input) { // Create a regular expression to validate email addresses // (credit goes to "bobocop at bobocop dot cz" from "eregi" comments on php.net for this regular expression) $user = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; $domain = '([a-z]([-a-z0-9]*[a-z0-9]+)?)'; $regex = $user . '+(\.' . $user . '+)*@(' . $domain . '{1,63}\.)+' . $domain . '{2,63}'; // Convert IP addresses to links $output = eregi_replace("([0-9]{1,3}(\.[0-9]{1,3}){3})", "\\0", $input); // Convert email addresses to links $output = eregi_replace($regex, "\\0", $output); // Print the results echo $output; } // Set the default value for certain variables if (!$host) { $host = 'Voer hier een host/domein in'; } if (!$whois_ip_server) { $whois_ip_server = 'whois.arin.net'; } if (!$whois_domain_server) { $whois_domain_server = 'whois-servers.net'; } if (!$ping_count) { $ping_count = '4'; } if (!$scan_timeout) { $scan_timeout = '1'; } // Call the get_ip() function and store the results in $ip $ip = get_ip(); ?> DNS Tools R V Geerligs

Check domain, host of IP nr
Domain:
DNS records weergeven, Whois, IP nr info
test Check DNS RR
DNS RRname:
DNS Server:
DNS RR Type:
DNS RR request
Zet een EHLO sessie op
SMTP Server:
Mail from:
Rcpt to:
Zet een EHLO sessie op naar een willekeurige SMTP Server
( SMTP server veld leeg = DNS zoekt MX)
Port scan - Alleen open ports zijn zichtbaar.
Ports te scannen
Host
Time out in s
Scan ports op host. Range 20-120 kan ook. Bij twijfel time out verhogen.

Resultaten scherm