Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests,json, random, re
- from colorama import Style, Fore, init
- from threading import Thread
- init(autoreset=True)
- worker = input("Input ur worker: ")
- x = 1
- def save(word):
- s = open("logImeiValid.txt", "a+")
- s.write(word)
- s.close()
- def reff():
- global x
- while True:
- headers = {
- 'authority': 'buy.mi.co.id',
- 'cache-control': 'max-age=0',
- 'upgrade-insecure-requests': '1',
- 'origin': 'https://buy.mi.co.id',
- 'content-type': 'application/x-www-form-urlencoded',
- 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36',
- 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
- 'sec-fetch-site': 'same-origin',
- 'sec-fetch-mode': 'navigate',
- 'sec-fetch-user': '?1',
- 'sec-fetch-dest': 'document',
- 'referer': 'https://buy.mi.co.id/id/registration',
- 'accept-language': 'en-US,en;q=0.9,id;q=0.8',
- 'cookie': 'Cookie: _ot_use_type=1; _ot_referrer_path=; _ot_prev_uri_path=; _ot_curr_uri_path=https://event.mi.com/my/campaign2020/serie-mi-10-t?fbclid=IwAR07xo95oaHKOUCu7wO2ZgwSkBDNQL5zn5OPjsx_njCzVvcR9BmbwqaPC1M; _ot_session_id=1609173044022; _ot_ref_tip=16.46.2.1.4169.64011713; _ot_ref_b=46; _ot_last_time=1609174679781; _ot_last_source=; _ot_utm_type=; _ot_utm_channel=; _ot_utm_campaign=; _ot_utm_source=; _ot_utm_medium=; _ot_utm_term=; _ot_utm_content=; _ot_instance_id=5e0c6554de45ebe239af24663099572a; mstz=36154410ed7838cc-3b00002283124a24|https%3A%2F%2Fevent.mi.com%2Fmy%2Fcampaign2020%2Fserie-mi-10-t|608747259.4|pcpid||; mstuid=1609173044398_403; xm_vistor=1609173044398_403_1609173044398-1609174604364; _ga=GA1.2.448218039.1609173045; _gid=GA1.2.1299235451.1609173045; xmuuid=XMGUEST-2BDDEE58-84DC-CFF3-90ED-FAF60545F93C',
- }
- imei = "866228055" + str(random.randint(000000, 999999))
- data = {
- 'imei': imei
- }
- response = requests.post('https://buy.mi.co.id/id/registration', headers=headers, data=data)
- try:
- find = re.search(r"<p><span class=\"info-type\">Negara pembelian: <\/span><span>(.*)<\/span>", response.text).group(1)
- if "Malaysia" in find:
- save(str(imei) + "|" + str(find) + "\n")
- print(Fore.GREEN + str(imei) + "|" + str(find) + "\n")
- elif "Philippines" in find:
- save(str(imei) + "|" + str(find) + "\n")
- print(Fore.GREEN + str(imei) + "|" + str(find) + "\n")
- elif "Thailand" in find:
- save(str(imei) + "|" + str(find) + "\n")
- print(Fore.GREEN + str(imei) + "|" + str(find) + "\n")
- else:
- print(Fore.RED + str(imei) + "|" + str(find) + "\n")
- except:
- print(str(imei) + " IMEI not valid..\n")
- x += 1
- for _ in range(int(worker)):
- Thread(target=reff).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement