Advertisement
MrLuciferz

Auto Scan Dorking

Dec 26th, 2016
881
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use LWP::UserAgent;
  4. use HTTP::Request::Common qw(GET);
  5. $ag = LWP::UserAgent->new();
  6. $ag->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801");
  7. $ag->timeout(10);
  8.  
  9. chomp(my $dork = $ARGV[0]);
  10. system "Title searching = $/files/journals/1/articles";
  11. for ($i = 1; $i <= 10000; $i+=10){
  12. $url = "http://www.bing.com/search?q=$/files/journals/1/articles&filt=all&first=$i&FORM=PERE";
  13. $resp = $ag->request(HTTP::Request->new(GET => $url));
  14. $rrs = $resp->content;
  15.  
  16. while($rrs =~ m/<a href=\"?http:\/\/(.*?)\//g){
  17. $link = $1;
  18. if ( $link !~ /overture|msn|live|bing|yahoo|duckduckgo|google|yahoo|microsof/){
  19. if ($link !~ /^http:/){$link = 'http://' . "$link" . '/';}
  20. if($link !~ /\"|\?|\=|index\.php/){
  21. print "\n\t $link";
  22. push(@resul,$link);}} }
  23.  
  24. while($rrs =~ m/<a href=\"?http:\/\/(.*?[\/].*?)\//g){
  25. $link = $1;
  26. if ( $link !~ /overture|msn|live|bing|yahoo|duckduckgo|google|yahoo|microsof/){
  27. if ($link !~ /^http:/){$link = 'http://' . "$link" . '/';}
  28. if($link !~ /\"|\?|\=|index\.php/){
  29. print "\n\t $link";
  30. push(@resul,$link);}} }
  31.  
  32. if ($rrs !~ m/class=\"sb_pagN\"/g){
  33. $total = $#resul+1;
  34. open(TXTS,"<kinggecko.txt"); chomp(@ar = <TXTS>); close(TXTS); push(@resul,@ar);
  35. open (TXT,">kinggecko.txt");
  36. foreach(@resul){$c{$_}++;next if $c{$_} > 1;print TXT "$_\n";push(@arq,$_);}
  37. close(TXT);
  38. $arq=$#arq+1;
  39. print "\n\n Total Result $total , total in file $arq\n"; exit; }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement