Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2. if (ISSET($_POST["domain"])) {
  3. require_once("/protected/db.php");
  4. echo gethostbyname($_POST["domain"]);
  5. }
  6. echo "Error";
  7. ?>
  8.  
  9. $result = dns_get_record($_POST["domain"],DNS_ALL);
  10. print_r($result);
  11.  
  12. if (ISSET($_POST["domain"])) {
  13. $txt=shell_exec('nslookup ' . $_POST["domain"]);
  14. $re1='.*?'; # Non-greedy match on filler
  15. $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
  16. $re3='.*?'; # Non-greedy match on filler
  17. $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
  18.  
  19. if ($c=preg_match_all ("/".$re1.$re2.$re3.$re4."/is", $txt, $matches))
  20. {
  21. $ipaddress1=$matches[1][0];
  22. echo $ipaddress1;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement