Advertisement
rutera

Reverse IP script

Jan 8th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.91 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #Reverse IP script.
  3. #Written by dni
  4. #shouts to oto, leetskeet, uNK
  5. #irc.bluehell.org #r00t
  6.  
  7. use LWP::UserAgent;
  8. while (!$ARGV[0]) {
  9. print "Usage: $0 IP \n"; exit;}
  10. $a = 1;
  11. $ua = new LWP::UserAgent(timeout => 15, agent => "Mozilla/5.0 (x11; u; linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7)" );
  12.  
  13. $req = $ua->get('http://whois.webhosting.info/' . $ARGV[0] . '?pi=1&ob=SLD&oo=ASC');
  14. if (!($req->is_success)) {
  15.  
  16. die $req->status_line; }
  17. else {
  18. $output = $req->as_string;
  19. until ($output =~ /(.*?)IP\sDetails\s-\sN\/A\./) {
  20. $req = $ua->get('http://whois.webhosting.info/' . $ARGV[0] . '?pi=' . $a . '&ob=SLD&oo=ASC');
  21. if (!($req->is_success)) { die $req->status_line; }
  22. $output = $req->as_string;
  23.  
  24. while ($output =~ /<td><a\shref=\"http:\/\/whois.webhosting.info\/(.*?)\">/g){
  25. my($crap,$yes)=split(/info\/(.*?)\.\"\>/,$&);
  26. print "$yes\n";
  27. }
  28. sleep 5;
  29. $a++;
  30. }
  31. print "Done!\n";
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement