Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib, urllib2
- import random
- #Create a new txt file called 'proxies.txt' in the same folder that this script is in, and add proxies to it. ONLY HTTPS proxies will work!
- #Script coded by: TheFox
- print("~~~~~~~~~~~~~~~~~~~~~~~~~~")
- print("TheFox's xat ID generator")
- print("~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n")
- print("*Note: if you want to use default proxies (which is INSANELY slow, then do not create a 'proxies.txt' in the same folder as this script. If you want to use your OWN proxies (WAY FASTER), the create a new .txt file called 'proxies.txt' in the same folder that this script is in, and add https proxies into it.\n\n")
- raw_input("-> Press 'Enter' to start <-")
- def getBetween(strSource, strStart,strEnd):
- start = strSource.find(strStart) + len(strStart)
- end = strSource.find(strEnd,start)
- return strSource[start:end]
- def id_Generator():
- while 1:
- try:
- Proxies_Exist = True
- Proxies = [i.strip() for i in open('proxies.txt','r').read().splitlines()]
- Proxies = random.choice(Proxies)
- Proxy = Proxies.split(':')
- ProxyInfo = 'http://' + str(Proxy[0]) + ':' + str(Proxy[1])
- print("---------------------------------")
- print("~[ Successfully loaded proxy ]~")
- print("---------------------------------\n")
- print("Proxy being used: " + str(Proxy[0]) + ':' + str(Proxy[1]) + "\n")
- Auser3 = urllib.urlopen('http://xat.com/web_gear/chat/auser3.php', proxies = { 'http': ProxyInfo }).read()
- Ids = open("ids.txt","a+")
- if Auser3 in Ids != False or Auser3.find('&UserId=') != False:#Duplicate ID and 404 Error fix
- Ids.write("")
- Ids.close()
- id_Generator()
- else:
- Ids.write(Auser3 + "\n")
- Ids.close()
- print("New ID Found: " + Auser3 + "\n")
- id_Generator()
- except:
- Proxies_Exist = False
- if Proxies_Exist == False:
- print("'proxies.txt' was not found! Using default proxies from: http://www.us-proxy.org/\n")
- try:
- US_PROXY = urllib.urlopen('http://www.us-proxy.org/').read()
- IP = getBetween(US_PROXY,'<tbody><tr><td>','</td>').splitlines()
- Port = getBetween(US_PROXY,'</td><td>','</td><td>US</td><td>').splitlines()
- IP = random.choice(IP)
- Port = random.choice(Port)
- ProxyInfo = 'http://' + str(IP) + ':' + str(Port)
- print("--------------------------------------------------------------------------")
- print("~[ Successfully loaded proxy from http://www.us-proxy.org/ ]~")
- print("--------------------------------------------------------------------------")
- print("Proxy being used: " + str(IP) + ':' + str(Port) + "\n")
- Auser3 = urllib.urlopen('http://xat.com/web_gear/chat/auser3.php', proxies = { 'http': ProxyInfo }).read()
- Ids = open("ids.txt","a+")
- if Auser3 in Ids != False or Auser3.find('&UserId=') != False:#Duplicate ID and 404 Error fix
- Ids.write("")
- Ids.close()
- id_Generator()
- else:
- Ids.write(Auser3 + "\n")
- Ids.close()
- print("New ID Found: " + Auser3 + "\n")
- id_Generator()
- except:
- print("Could not connect to 'http://www.us-proxy.org/' ! Restarting script!'")
- id_Generator()
- id_Generator()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement