Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (ISSET($_POST["domain"])) {
- require_once("/protected/db.php");
- echo gethostbyname($_POST["domain"]);
- }
- echo "Error";
- ?>
- $result = dns_get_record($_POST["domain"],DNS_ALL);
- print_r($result);
- if (ISSET($_POST["domain"])) {
- $txt=shell_exec('nslookup ' . $_POST["domain"]);
- $re1='.*?'; # Non-greedy match on filler
- $re2='(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?![\d])'; # Uninteresting: ipaddress
- $re3='.*?'; # Non-greedy match on filler
- $re4='((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(?![\d])'; # IPv4 IP Address 1
- if ($c=preg_match_all ("/".$re1.$re2.$re3.$re4."/is", $txt, $matches))
- {
- $ipaddress1=$matches[1][0];
- echo $ipaddress1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement