#!/usr/bin/python# -*- coding: utf-8 -*-from Tkinter import *import webbrowserimport reimport base64import urllib2class Widget: def __init__(self, root): root.title("Hide My Ass") root.geometry("331x115+300+300") self.proxy = "4" self.IP = "2" # BOTONES botonProxy = Button(root, text="Seleccionar Proxy", width="38",\ command=self.cambiarProxy) botonProxy.pack(fill=BOTH) botonIP = Button(root, text="Ver IP Pública", width="38",\ command=self.publicIP) botonIP.pack(fill=BOTH) botonNavegador = Button(root, text="Navegar con Proxy", width="38",\ command=self.navegar) botonNavegador.pack(fill=BOTH) botonSalir = Button(root, text="Salir", width="38",\ command=self.salir) botonSalir.pack(fill=BOTH) ##################### CAMBIAR PROXY ################################# def cambiarProxy(self): self.cambiarProxyWidget = Toplevel() self.cambiarProxyWidget.title("Cambiar Proxy") self.cambiarProxyWidget.geometry("270x100+300+300") # FRAMES frameProxy = Frame(self.cambiarProxyWidget) frameProxy.pack(fill=BOTH) self.frameIP = Frame(self.cambiarProxyWidget) self.frameIP.pack(fill=BOTH) # LABELS labelProxy = Label(frameProxy, text="PROXY") labelProxy.pack(side=LEFT) labelIP = Label(self.frameIP, text="IP") labelIP.pack(side=LEFT) # OPTION MENU self.varProxy = StringVar() self.varProxy.set("1") optionProxy = OptionMenu(frameProxy, self.varProxy, "1", "2", "3",\ "4", "5", "6", "7", command=self.optionIPMenu) optionProxy.pack(side=RIGHT) self.varIP = StringVar() self.varIP.set("1") self.optionIP = OptionMenu(self.frameIP, self.varIP, "1", "2", "3", "4",\ "5", "6", "7", "8", "9") self.optionIP.pack(side=RIGHT) # BOTON ACEPTAR botonAceptar = Button(self.cambiarProxyWidget, text="Aceptar", \ command=self.aceptar) botonAceptar.pack() def optionIPMenu(self, proxy): proxy = int(proxy) if proxy == 1: self.optionIP.destroy() IPsProxy1 = ("1", "2", "3", "4", "5", "6", "7", "8", "9") self.creadorIPMenu(IPsProxy1) if proxy == 2: self.optionIP.destroy() IPsProxy2 = ["1"] self.creadorIPMenu(IPsProxy2) if proxy == 3: self.optionIP.destroy() IPsProxy3 = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11",\ "12", "13", "14") self.creadorIPMenu(IPsProxy3) if proxy == 4: self.optionIP.destroy() IPsProxy4 = ("1", "2") self.creadorIPMenu(IPsProxy4) if proxy == 5: self.optionIP.destroy() IPsProxy5 = ["1"] self.creadorIPMenu(IPsProxy5) if proxy == 6: self.optionIP.destroy() IPsProxy6 = ["1"] self.creadorIPMenu(IPsProxy6) if proxy == 7: self.optionIP.destroy() IPsProxy7 = ["1"] self.creadorIPMenu(IPsProxy7) def creadorIPMenu(self, IPsProxy): self.optionIP = apply(OptionMenu,(self.frameIP, self.varIP) + tuple(IPsProxy)) self.optionIP.pack(side=RIGHT) def aceptar(self): self.proxy = self.varProxy.get() self.IP = self.varIP.get() self.cambiarProxyWidget.destroy()##################### IP PÚBLICA ################################# def publicIP(self): publicIPWidget = Toplevel() publicIPWidget.title("Ver IP Pública") publicIPWidget.geometry("200x20+300+300") url = "www.cual-es-mi-ip.net" urlEncoded = self.encoder(url) url = urllib2.urlopen(urlEncoded).read() ipFinder = re.search('<span style="font-size: 32px">.*', url) ip = ipFinder.group(0) ip = re.sub('<span style="font-size: 32px">', '', ip) ip = re.sub('</span>.*', '', ip) labelIP = Label(publicIPWidget, text=ip) labelIP.pack(fill=BOTH) def encoder(self, url): url = "://" + url urlEncoded = "http://" + self.proxy + ".hidemyass.com/ip-"+ self.IP + \ "/encoded/" + base64.b64encode(url) + "%3D%3D&f=norefer" return urlEncoded##################### NAVEGAR ################################# def navegar(self): navegarWidget = Toplevel() navegarWidget.title("Navegar con Proxy") navegarWidget.geometry("235x50+300+300") # FRAME frameNavegar = Frame(navegarWidget) frameNavegar.pack(fill=BOTH) # LABEL labelURL = Label(frameNavegar, text="URL") labelURL.pack(side=LEFT) # LINE EDIT self.url = StringVar() editURL = Entry(frameNavegar, textvariable=self.url) editURL.pack(side=RIGHT) # BOTÓN botonIR = Button(navegarWidget, text="IR", command=self.ir) botonIR.pack() def ir(self): url = self.url.get() self.urlEncoded = self.encoder(url) webbrowser.open_new(self.urlEncoded)##################### SALIR ################################# def salir(self): exit()root = Tk()widget = Widget(root)root.mainloop()################################################################################"""http://[n-proxy].hidemyass.com/[n-ip] --> http://1.hidemyass.com/ip-3 = 74.63.112.140PROXY SERVERS (7)Proxy server 1 IP address 1/9 (74.63.112.138) IP address 2/9 (74.63.112.139) IP address 3/9 (74.63.112.140) IP address 4/9 (74.63.112.141) IP address 5/9 (74.63.112.142) IP address 6/9 (74.63.112.143) IP address 7/9 (74.63.112.144) IP address 8/9 (74.63.112.145) IP address 9/9 (74.63.112.146)Proxy server 2 (NO FUNCIONA)Proxy server 3 IP address 1/14 (66.90.73.223) IP address 2/14 (67.159.36.18) IP address 3/14 (67.159.36.19) IP address 4/14 (67.159.36.20) IP address 5/14 (67.159.36.21) IP address 6/14 (67.159.36.22) IP address 7/14 (67.159.36.23) IP address 8/14 (67.159.36.24) IP address 9/14 (67.159.36.25) IP address 10/14 (67.159.36.26) IP address 11/14 (67.159.36.27) IP address 12/14 (67.159.36.28) IP address 13/14 (67.159.36.29) IP address 14/14 (67.159.36.30) Proxy server 4 IP address 1/2 (95.154.230.253) IP address 2/2 (95.154.230.254) Proxy server 5 IP address 1/1 (95.154.230.191)Proxy server 6 IP address 1/1 (67.159.5.242)Proxy server 7 IP address 1/1 (93.174.93.145)"""
abc = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j','k', 'l', 'm', 'n', 'ñ',\ 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x','y', 'z', 'A', 'B', 'C',\ 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M','N', 'Ñ', 'O', 'P', 'Q',\ 'R', 'S', 'T', 'U', 'V','W', 'X', 'Y', 'Z']num = [34, 0, 2, 10, 51, 29, 18, 0, 2, 10]for n in num: print abc[n],
Muy interesante Lo acabo de probar.Felicitaciones, muy buen trabajo amigo.