Advertisement
Guest User

Dorkscan.pl

a guest
Jun 16th, 2014
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 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. for ($i = 1; $i <= 10000; $i+=10){
  11. $url = "http://www.bing.com/search?q=IP:66.85.169.202 index.php?option=&first=$i&FORM=PERE";
  12. $resp = $ag->request(HTTP::Request->new(GET => $url));
  13. $rrs = $resp->content;
  14.  
  15. while($rrs =~ m/<a href=\"?http:\/\/(.*?)\//g){
  16. $link = $1;
  17. if ( $link !~ /overture|msn|live|bing|yahoo|duckduckgo|google|yahoo|microsof/){
  18. if ($link !~ /^http:/){$link = 'http://' . "$link" . '/';}
  19. if($link !~ /\"|\?|\=|index\.php/){
  20. print "\n\t $link";
  21. push(@resul,$link);}} }
  22.  
  23. while($rrs =~ m/<a href=\"?http:\/\/(.*?[\/].*?)\//g){
  24. $link = $1;
  25. if ( $link !~ /overture|msn|live|bing|yahoo|duckduckgo|google|yahoo|microsof/){
  26. if ($link !~ /^http:/){$link = 'http://' . "$link" . '/';}
  27. if($link !~ /\"|\?|\=|index\.php/){
  28. print "\n\t $link";
  29. push(@resul,$link);}} }
  30.  
  31. if ($rrs !~ m/class=\"sb_pagN\"/g){
  32. $total = $#resul+1;
  33. open(TXTS,"<rRS.txt"); chomp(@ar = <TXTS>); close(TXTS); push(@resul,@ar);
  34. open (TXT,">rRS.txt");
  35. foreach(@resul){$c{$_}++;next if $c{$_} > 1;print TXT "$_\n";push(@arq,$_);}
  36. close(TXT);
  37. $arq=$#arq+1;
  38. print "\n\n Total Resultado $total , total em arquivo $arq\n"; exit; }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement