Bienvenido a Tecnohackers

Tecnohackers » Programacion » Area de Programacion » Scripting. VBS, Batch, Bash, JavaSript.
 » 

[Python] Proxy Tester



Autor Tema: [Python] Proxy Tester  (Leído 690 veces)

Desconectado Doddy

  • Veterano
  • ***
  • Mensajes: 249
  • Slow Mind
[Python] Proxy Tester
« en: Mayo 29, 2011, 03:57:08 am »

Simple programa para testear proxies

Código: You are not allowed to view links. Register or Login
#!usr/bin/python
#Proxy Tester (C) Doddy Hackman 2011

import urllib2,sys


def toma(web) :
 return nave.open(web).read()

def header() :
 print "\n\n--== Proxy Tester ==--\n"

def copyright() :
 print "\n\n(C) Doddy Hackman 2011\n"
 sys.exit(1)

def sintax() :
 print "\n[*] Sintax : ",sys.argv[0]," <file>"

def testar(host):
 try:
  proxy = urllib2.ProxyHandler({"http":host})
  nave = urllib2.build_opener(proxy)
  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')]
  urllib2.install_opener(nave)
  urllib2.urlopen("http://127.0.0.1/sql.php")#
  print "[+] Proxy Found : "+host
 except:
  pass

header()
if len(sys.argv) != 2 :
 sintax()
else :
 print "\n[+] Opening file\n\n"
 try:
  hosts = open(sys.argv[1], "r").readlines()
 except :
  print "\n[-] Error opening file\n"
 for host in hosts:
  host = host.replace("\r","").replace("\n","")
  testar(host)
copyright()

#  The End
You are not allowed to view links. Register or Login

Tags:
Tags:

 


SMF 2.0.19 | SMF © 2016, Simple Machines
Paginas Afiliadas
Twitter - FaceBook - Daraxblog
Designed by Smf Personal