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
|-+  Programación
| |-+  Scripting
| | |-+  [Python] Proxy Tester
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Python] Proxy Tester  (Leído 1,777 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Python] Proxy Tester
« en: 16 Octubre 2011, 02:52 am »

Un simple programa para testear proxies

Código
  1. #!usr/bin/python
  2. #Proxy Tester (C) Doddy Hackman 2011
  3.  
  4. import urllib2,sys
  5.  
  6.  
  7. def toma(web) :
  8. return nave.open(web).read()
  9.  
  10. def header() :
  11. print "\n\n--== Proxy Tester ==--\n"
  12.  
  13. def copyright() :
  14. print "\n\n(C) Doddy Hackman 2011\n"
  15. sys.exit(1)
  16.  
  17. def sintax() :
  18. print "\n[*] Sintax : ",sys.argv[0]," <file>"
  19.  
  20. def testar(host):
  21. try:
  22.  proxy = urllib2.ProxyHandler({"http":host})
  23.  nave = urllib2.build_opener(proxy)
  24.  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')]
  25.  urllib2.install_opener(nave)
  26.  urllib2.urlopen("http://127.0.0.1/sql.php")#
  27.  print "[+] Proxy Found : "+host
  28. except:
  29.  pass
  30.  
  31. header()
  32. if len(sys.argv) != 2 :
  33. sintax()
  34. else :
  35. print "\n[+] Opening file\n\n"
  36. try:
  37.  hosts = open(sys.argv[1], "r").readlines()
  38. except :
  39.  print "\n[-] Error opening file\n"
  40. for host in hosts:
  41.  host = host.replace("\r","").replace("\n","")
  42.  testar(host)
  43. copyright()
  44.  
  45. #  The End
  46.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Python] RFI Tester
Scripting
BigBear 0 1,520 Último mensaje 7 Octubre 2011, 01:39 am
por BigBear
[Ruby] Proxy Tester
Scripting
BigBear 0 1,791 Último mensaje 16 Octubre 2011, 02:49 am
por BigBear
[Perl] Proxy Tester 0.5
Scripting
BigBear 0 1,787 Último mensaje 12 Mayo 2012, 20:51 pm
por BigBear
[Perl Tk] Proxy Tester 0.5
Scripting
BigBear 0 2,063 Último mensaje 12 Mayo 2012, 20:52 pm
por BigBear
[AYUDA] Tester de password.
Programación Visual Basic
Sink 1 1,587 Último mensaje 19 Junio 2013, 01:03 am
por XresH
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines