Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python2.7
- import socket
- import re
- import sys
- print """
- ################################
- ##############################
- # [email protected] Tool #
- ##############################
- ############proxx################
- """
- for arg in sys.argv:
- IP = arg
- print "[Working be patient]"
- print "\n"
- HOST = IP + '.ipaddress.com'
- PORT = 80
- GET='/'
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((HOST, PORT))
- connection = s.makefile('r',0)
- s.send("GET %s HTTP/2.0\r\nHost: %s\r\n\r\n" % (GET, HOST))
- buff = connection.readlines()
- raw_data = []
- for line in buff:
- #print line + "\n\n"
- raw_data.append(line)
- s.close()
- del raw_data[5]
- clean_data = []
- for i in raw_data:
- if "this IP:" in i :
- clean_data.append(i)
- if "Organization:"in i :
- clean_data.append(i)
- if "ISP:" in i :
- clean_data.append(i)
- if "Country:" in i :
- clean_data.append(i)
- if "City:" in i :
- clean_data.append(i)
- if "State:" in i:
- clean_data.append(i)
- if "Timezone:" in i :
- clean_data.append(i)
- if "Local Time:" in i:
- clean_data.append(i)
- if "var coord=new google.maps.LatLng(" in i:
- clean_data.append("Coordinates:"+i)
- del clean_data[2]
- del clean_data[1]
- for i in clean_data:
- i = i.lstrip ("<tr><th>")
- i = i.rstrip ("</td></tr>")
- new = re.sub('</th><td class="sep"></td><td>', "", i)
- new2 = re.sub('</td></tr>', "", new)
- new3 = re.sub('" style="vertical-align:baseline">', "", new2)
- new4 = re.sub('var coord=new google.maps.LatLng', '', new3)
- new5 = re.sub('<img src="/flags/?>', '', new4)
- new5 = new5.strip("<img src=\"/flags/")
- new5 = new5.strip("<img")
- new6 = re.sub('<img?', '', new5)
- new7 = re.sub('src="/flags/?', '', new6)
- new8 = re.sub('...gif" alt=""', '', new7)
- new9 = re.sub('title.\=*?.?.?.?.?.?.?.?.?\s.?....?.?.?.?..?.?.?.?', '', new8)
- print "[@] "+new9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement