SHARE
TWEET

Grab website From IP

Tu5b0l3d Dec 29th, 2016 (edited) 869 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Grab website From IP.
  3. // by tu5b0l3d
  4. // thx magelang6etar
  5. // http://www.indoxploit.or.id/2016/12/massive-grab-website-from-ip.html
  6.  
  7. //example: 31.170.164 same with 31.170.164.1-254
  8.  
  9.  
  10. $ip = "31.170.164";
  11. for($i=1;$i<=254;$i++){
  12.     echo "$ip.$i\n";
  13. $curl = curl_init();
  14. curl_setopt_array($curl, array(
  15.     CURLOPT_RETURNTRANSFER => 1,
  16.     CURLOPT_URL => "http://reverseip.domaintools.com/search/?q=$ip.$i",
  17.     CURLOPT_USERAGENT => 'Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20140722 Firefox/24.0 Iceweasel/24.7.0'
  18. ));
  19. $resp = curl_exec($curl);
  20. curl_close($curl);
  21. preg_match("/<span title=\"$ip.$i\">(.*?)<\/span><\/td>/i", $resp, $domains);
  22.     $su = "$domains[1]";
  23.     echo "$su\n";
  24.     file_put_contents("Result.htm", "$su\n", FILE_APPEND);
  25. }
  26. ?>
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top