Una imagen de como quedo
El codigo.
Código
#!usr/bin/python #LocateIP 0.1 #Coded By Doddy H import sys,urllib2,re,socket from PyQt4 import QtCore,QtGui nave = urllib2.build_opener() 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')] def toma(web) : nave = urllib2.Request(web) 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'); op = urllib2.build_opener() return op.open(nave).read() def search(): ip = socket.gethostbyname(str(new.target.text())) code = toma("http://www.melissadata.com/lookups/iplocation.asp?ipaddress="+ip) if (re.findall("City<\/td><td align=(.*)><b>(.*)<\/b><\/td>",code)): rex = re.findall("City<\/td><td align=(.*)><b>(.*)<\/b><\/td>",code) city = rex[0][1] new.city.setText(city) else: new.city.setText("Not Found") if (re.findall("Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>",code)): rex = re.findall("Country<\/td><td align=(.*)><b>(.*)<\/b><\/td>",code) country = rex[0][1] new.country.setText(country) else: new.country.setText("Not Found") if (re.findall("State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>",code)): rex = re.findall("State or Region<\/td><td align=(.*)><b>(.*)<\/b><\/td>",code) state = rex[0][1] new.state.setText(state) else: new.state.setText("Not Found") new.dns.clear() code = toma("http://www.ip-adress.com/reverse_ip/"+ip) if (re.findall("whois\/(.*?)\">Whois",code)): rex = re.findall("whois\/(.*?)\">Whois",code) for dns in rex: new.dns.appendPlainText(dns) app = QtGui.QApplication(sys.argv) new = QtGui.QWidget() new.setWindowTitle("LocateIP 0.1 || Coded By Doddy H") new.resize(450,275) new.setStyleSheet("QWidget {background-color: #000000;color: #FF0000}") new.label1 = QtGui.QLabel("Target : ",new) new.label1.setStyleSheet("QWidget {background-color: #000000;color: #FF0000;font: normal 17px Verdana}") new.label1.setGeometry(20,23,80,20) new.target = QtGui.QLineEdit(new) new.target.setStyleSheet("QWidget {background-color: #000000; color: #FF0000;border: 2px solid #FF0000}") new.target.setGeometry(95,23,200,25) new.search = QtGui.QPushButton("Find",new) new.search.setGeometry(310,22,110,28) new.search.setStyleSheet("QWidget {background-color: #000000; color: #FF0000;border: 2px solid #FF0000}") new.label2 = QtGui.QLabel("Information",new) new.label2.setStyleSheet("QWidget {background-color: #000000;color: #FF0000;font: normal 17px Verdana}") new.label2.setGeometry(60,70,105,20) new.label4 = QtGui.QLabel("City :",new) new.label4.setStyleSheet("QWidget {background-color: #000000;color: #FF0000;font: normal 17px Verdana}") new.label4.setGeometry(25,120,100,20) new.city = QtGui.QLineEdit(new) new.city.setStyleSheet("QWidget {background-color: #000000; color: #FF0000;border: 2px solid #FF0000}") new.city.setGeometry(77,120,140,25) new.label5 = QtGui.QLabel("Country :",new) new.label5.setStyleSheet("QWidget {background-color: #000000;color: #FF0000;font: normal 17px Verdana}") new.label5.setGeometry(25,160,100,20) new.country = QtGui.QLineEdit(new) new.country.setStyleSheet("QWidget {background-color: #000000; color: #FF0000;border: 2px solid #FF0000}") new.country.setGeometry(110,160,105,25) new.label6 = QtGui.QLabel("State :",new) new.label6.setStyleSheet("QWidget {background-color: #000000;color: #FF0000;font: normal 17px Verdana}") new.label6.setGeometry(25,195,100,20) new.state = QtGui.QLineEdit(new) new.state.setStyleSheet("QWidget {background-color: #000000; color: #FF0000;border: 2px solid #FF0000}") new.state.setGeometry(90,195,125,25) new.label3 = QtGui.QLabel("DNS Found",new) new.label3.setStyleSheet("QWidget {background-color: #000000;color: #FF0000;font: normal 17px Verdana}") new.label3.setGeometry(280,70,100,20) new.dns = QtGui.QPlainTextEdit(new) new.dns.setGeometry(235,100,180,150) new.dns.setStyleSheet("QWidget {background-color: #000000; color: #FF0000;border: 2px solid #FF0000}") new.connect(new.search,QtCore.SIGNAL("clicked()"),search) new.show() sys.exit(app.exec_()) # The End ?