dnuhax

Untitled

Aug 9th, 2020 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.12 KB | None | 0 0
  1. import os
  2. import random
  3. import string
  4. import threading
  5. import time
  6. from queue import Queue
  7. import platform
  8. import requests
  9. from colorama import Fore, init
  10.  
  11. intro = """
  12. ███████╗████████╗██████╗ ███████╗ █████╗ ███╗ ███╗ ██████╗ ██████╗ ████████╗████████╗███████╗██████╗
  13. ██╔════╝╚══██╔══╝██╔══██╗██╔════╝██╔══██╗████╗ ████║ ██╔══██╗██╔═══██╗╚══██╔══╝╚══██╔══╝██╔════╝██╔══██╗
  14. ███████╗ ██║ ██████╔╝█████╗ ███████║██╔████╔██║█████╗██████╔╝██║ ██║ ██║ ██║ █████╗ ██████╔╝
  15. ╚════██║ ██║ ██╔══██╗██╔══╝ ██╔══██║██║╚██╔╝██║╚════╝██╔══██╗██║ ██║ ██║ ██║ ██╔══╝ ██╔══██╗
  16. ███████║ ██║ ██║ ██║███████╗██║ ██║██║ ╚═╝ ██║ ██████╔╝╚██████╔╝ ██║ ██║ ███████╗██║ ██║
  17. ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
  18.  
  19. https://github.com/KevinLage/YouTube-Livestream-Botter
  20. """
  21.  
  22. print(intro)
  23. if platform.system() == "Windows": #checking OS
  24. clear = "cls"
  25. else:
  26. clear = "clear"
  27.  
  28. iPhone_UA = ("Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
  29. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1",
  30. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D57",
  31. "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1",
  32. "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Mobile/15E148 Safari/604.1",
  33. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
  34. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko)",
  35. "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1",
  36. "Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1",
  37. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1",
  38. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Mobile/15E148 Safari/604.1",
  39. "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1",
  40. "Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1",
  41. "Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1")
  42.  
  43. proxy_loading = input("[1] Load Proxys from APIs\n[2] Load Proxys from proxys.txt\n")
  44.  
  45. token = input("ID?\n")
  46. class main(object):
  47. def __init__(self):
  48. self.combolist = Queue()
  49. self.Writeing = Queue()
  50. self.printing = []
  51. self.botted = 0
  52. self.combolen = self.combolist.qsize()
  53.  
  54. def printservice(self): #print screen
  55. while True:
  56. if True:
  57. os.system(clear)
  58. print(Fore.LIGHTCYAN_EX + intro + Fore.LIGHTMAGENTA_EX)
  59. print(Fore.LIGHTCYAN_EX + "Botted:{self.botted}\n")
  60. for i in range(len(self.printing) - 10, len(self.printing)):
  61. try:
  62. print(self.printing[i])
  63. except (ValueError, Exception):
  64. pass
  65. time.sleep(0.5)
  66. a = main()
  67. class proxy():
  68. global proxy_loading
  69. def update(self):
  70. while True:
  71.  
  72. if proxy_loading == "2":
  73. data = ''
  74. data = open("proxys.txt", "r").read()
  75. self.splited += data.split("\n") #scraping and splitting proxies
  76. else:
  77. data = ''
  78. urls = ["https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/http.txt","https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&ssl=yes","https://www.proxy-list.download/api/v1/get?type=https&anon=elite"]
  79. for url in urls:
  80. data += requests.get(url).text
  81. self.splited += data.split("\n")
  82. self.splited = [s.replace('\r', "") for s in self.splited]
  83. time.sleep(600)
  84.  
  85. def get_proxy(self):
  86. random1 = random.choice(self.splited) #choose a random proxie
  87. return random1
  88. def FormatProxy(self):
  89. proxyOutput = {'https' :'https://'+self.get_proxy()}
  90. return proxyOutput
  91.  
  92. def __init__(self):
  93. self.splited = []
  94. threading.Thread(target=self.update).start()
  95. time.sleep(3)
  96.  
  97. proxy1 = proxy()
  98. def bot():
  99. while True:
  100. try:
  101. ua = random.choice(iPhone_UA)
  102. s = requests.session()
  103. random_proxy = proxy1.FormatProxy()
  104.  
  105. resp = s.get("https://m.youtube.com/watch?v=" + token + "?disable_polymer=1",headers={'Host': 'm.youtube.com', 'Proxy-Connection': 'Keep-Alive', 'User-Agent': ua, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7', 'Accept-Encoding': 'gzip, deflate', 'Cache-Control': 'no-cache', 'Pragma': 'no-cache'},proxies=random_proxy) # simple get request to youtube for the base URL
  106. url = resp.text.split(r'videostatsWatchtimeUrl\":{\"baseUrl\":\"')[1].split(r'\"}')[0].replace(r"\\u0026",r"&").replace('%2C',",").replace("\/","/") #getting the base url for parsing
  107. cl = url.split("cl=")[1].split("&")[0] #parsing some infos for the URL
  108. ei = url.split("ei=")[1].split("&")[0]
  109. of = url.split("of=")[1].split("&")[0]
  110. vm = url.split("vm=")[1].split("&")[0]
  111. s.get("https://s.youtube.com/api/stats/watchtime?ns=yt&el=detailpage&cpn=isWmmj2C9Y2vULKF&docid=" + token + "&ver=2&cmt=7334&ei=" + ei + "&fmt=133&fs=0&rt=1003&of=" + of +"&euri&lact=4418&live=dvr&cl=" + cl + "&state=playing&vm=" + vm + "&volume=100&c=MWEB&cver=2.20200313.03.00&cplayer=UNIPLAYER&cbrand=apple&cbr=Safari%20Mobile&cbrver=12.1.15E148&cmodel=iphone&cos=iPhone&cosver=12_2&cplatform=MOBILE&delay=5&hl=ru&cr=GB&rtn=1303&afmt=140&lio=1556394045.182&idpj=&ldpj=&rti=1003&muted=0&st=7334&et=7634",headers={'Host': 's.youtube.com', 'Proxy-Connection': 'Keep-Alive', 'User-Agent': ua, 'Accept': 'image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5', 'Accept-Language': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3', 'Referer': 'https://m.youtube.com/watch?v=' + token},proxies=random_proxy) # API GET request
  112.  
  113. a.botted += 1
  114. except:
  115. pass
  116.  
  117.  
  118.  
  119. maxthreads = int(input("How many Threads? Recommended: 500 - 1000\n"))
  120.  
  121. threading.Thread(target=a.printservice).start()
  122. num = 0
  123. while num < maxthreads :
  124. num += 1
  125. threading.Thread(target=bot).start()
  126.  
  127.  
  128. threading.Thread(target=bot).start()
  129.  
Add Comment
Please, Sign In to add comment