Advertisement
0xCor3

Untitled

Dec 28th, 2020
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. import requests,json, random, re
  2. from colorama import Style, Fore, init
  3. from threading import Thread
  4. init(autoreset=True)
  5. worker = input("Input ur worker: ")
  6. x = 1
  7. def save(word):
  8. s = open("logImeiValid.txt", "a+")
  9. s.write(word)
  10. s.close()
  11.  
  12. def reff():
  13. global x
  14. while True:
  15. headers = {
  16. 'authority': 'buy.mi.co.id',
  17. 'cache-control': 'max-age=0',
  18. 'upgrade-insecure-requests': '1',
  19. 'origin': 'https://buy.mi.co.id',
  20. 'content-type': 'application/x-www-form-urlencoded',
  21. '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',
  22. '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',
  23. 'sec-fetch-site': 'same-origin',
  24. 'sec-fetch-mode': 'navigate',
  25. 'sec-fetch-user': '?1',
  26. 'sec-fetch-dest': 'document',
  27. 'referer': 'https://buy.mi.co.id/id/registration',
  28. 'accept-language': 'en-US,en;q=0.9,id;q=0.8',
  29. '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',
  30. }
  31. imei = "866228055" + str(random.randint(000000, 999999))
  32. data = {
  33. 'imei': imei
  34. }
  35. response = requests.post('https://buy.mi.co.id/id/registration', headers=headers, data=data)
  36. try:
  37. find = re.search(r"<p><span class=\"info-type\">Negara pembelian: <\/span><span>(.*)<\/span>", response.text).group(1)
  38. if "Malaysia" in find:
  39. save(str(imei) + "|" + str(find) + "\n")
  40. print(Fore.GREEN + str(imei) + "|" + str(find) + "\n")
  41. elif "Philippines" in find:
  42. save(str(imei) + "|" + str(find) + "\n")
  43. print(Fore.GREEN + str(imei) + "|" + str(find) + "\n")
  44. elif "Thailand" in find:
  45. save(str(imei) + "|" + str(find) + "\n")
  46. print(Fore.GREEN + str(imei) + "|" + str(find) + "\n")
  47. else:
  48. print(Fore.RED + str(imei) + "|" + str(find) + "\n")
  49. except:
  50. print(str(imei) + " IMEI not valid..\n")
  51. x += 1
  52.  
  53. for _ in range(int(worker)):
  54. Thread(target=reff).start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement