Alisam_Technology

SEARCH

Sep 2nd, 2015
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #Google Search Tool .
  3. #sh0utz: oTo + #slotin + #bhf @ irc.bluehell.org - we 0wn your f4ce! ;p
  4. #Written by dni
  5. #much thanks to TuXeD & Syn4ps3 for their help ;)
  6.  
  7. use LWP::UserAgent;
  8.  
  9. @google = ("www.google.com","www.google.ae","www.google.at","www.google.be","www.google.ca","www.google.ch","www.google.cl","www.google.co.cr","www.google.co.hu","www.google.co.il","www.google.co.jp","www.google.co.kr","www.google.co.nz","www.google.co.th","www.google.co.uk","www.google.co.ve","www.google.com.ar","www.google.com.au","www.google.com.br","www.google.com.gr","www.google.com.hk","www.google.com.mx","www.google.com.ni","www.google.com.pa","www.google.com.pe","www.google.com.pr","www.google.com.py","www.google.com.ru","www.google.com.sg","www.google.com.tj","www.google.com.tr","www.google.com.tw","www.google.com.ua","www.google.com.uy","www.google.de","www.google.dk","www.google.es","www.google.fi","www.google.fr","www.google.gl","www.google.ie","www.google.it","www.google.kz","www.google.lv","www.google.nl","www.google.pl","www.google.uz");
  10.  
  11. @google2 = ("(U.S)","(Emiratos Arabes)","(Austria)","(Belgica)","(Canada)","(Suiza)","(Chile)","(Costa Rica)","(Hungria)","(Israel)","(Japon)","(Corea)","(Nueva Zelanda)","(Tailandia)","(Reino Unido)","(Venezuela)","(Argentina)","(Australia)","(Brasil)","(Grecia)","(Hong Kong)","(Mexico)","(Nicaragua)","(Panama)","(Peru)","(Puerto Rico)","(Paraguay)","(Rusia)","(Singapur)","(Tajikistan)","(Turquia)","(Taiwan)","(Ucrania)","(Uruguay)","(Alemania)","(Dinamarca)","(Espana)","(Finlandia)","(Francia)","(Groelandia)","(Irlanda)","(Italia)","(Kazajistan)","(Letonia)","(Holanda)","(Polonia)","(Uzbekistan)");
  12.  
  13.  
  14. if(!$ARGV[0])
  15. {
  16. print "Usage: perl d0rk.pl <query> <google-search> \n";
  17. print "perl $0 \"Powered by your mom\" www.google.nl\n";
  18. print "Now you must enter your query: ";
  19. $param0=<STDIN>;
  20. }
  21. if(!$ARGV[1]) {
  22. print "perl $0 <query> <google-host>\n";
  23. print "perl $0 \"Powered by your mom\" www.google.nl\n";
  24. print "Stand by for a list of google engines:..\n";
  25. $i=0;
  26. while ($i < scalar(@google))
  27. {
  28. printf "$i. %-15s %-15s ", $google[$i], $google2[$i];
  29. $m = ($i+1) % 3;
  30. if ($m == 0 && $i != 0) { print "\n";}
  31. $i++;
  32. }
  33.  
  34. print "\nJust press the number of the Search Engine you are going to use and then press ENTER: ";
  35. $aux=<STDIN>;
  36. $param1 = $google[$aux];
  37. }
  38. else
  39. {
  40. $param1 = $ARGV[1];
  41. }
  42.  
  43. if ($ARGV[0]) { $param0 = $ARGV[0];}
  44. $query = $param0;
  45. print "Searching $param1 for: $query\n";
  46. sleep 2;
  47. $counter = 0;
  48. $ua = new LWP::UserAgent;
  49. $ua->timeout(30);
  50. $ua->agent(" Mozilla/5.0 (0wn3d; U; PPC Sik OS XXX Mach-O; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0");
  51. $a=0;
  52.  
  53. while($results !~ /results/) {
  54. $url = "http://$param1/search?q=\"$query\"&hl=id&lr=&start=$a&sa=N";
  55. $response = $ua->get($url);
  56. $counter=$counter+10;
  57. if(!($response->is_success)) {
  58. print ($response->status_line. " Error! \n"); }
  59. else {
  60. @results = $response->as_string;
  61. $results= "@results";
  62.  
  63. while($results =~ m/<a class=l href=\"(.*?)\">.*?<\/a>/g)
  64. {
  65.  
  66. $results1 =~ s/<a class=l href=\"(.*?)\"> .*?<\/a>/$1/;
  67. $host =$1;
  68. print "$host\n";
  69. open (OUT, ">>scan_results.txt");
  70. print OUT "$host\n";
  71. close(OUT);
  72. }
  73.  
  74. $a = $a + 10;
  75. }
  76.  
  77. }
  78.  
  79. print "Results saved to scan_results.txt\n";
Advertisement
Add Comment
Please, Sign In to add comment