traffic_gen


SUBMITTED BY: jimmny

DATE: April 15, 2023, 10:56 p.m.

FORMAT: Text only

SIZE: 5.1 kB

HITS: 650

  1. import requests
  2. import time
  3. import random
  4. from termcolor import cprint
  5. import subprocess
  6. import os.path
  7. from random_user_agent.user_agent import UserAgent
  8. from random_user_agent.params import SoftwareName, OperatingSystem
  9. def create_UA():
  10. # you can also import SoftwareEngine, HardwareType, SoftwareType, Popularity from random_user_agent.params
  11. # you can also set number of user agents required by providing `limit` as parameter
  12. software_names = [SoftwareName.CHROME.value]
  13. operating_systems = [OperatingSystem.WINDOWS.value, OperatingSystem.LINUX.value]
  14. user_agent_rotator = UserAgent(software_names=software_names, operating_systems=operating_systems, limit=100)
  15. # Get list of user agents.
  16. user_agents = user_agent_rotator.get_user_agents()
  17. # Get Random User Agent String.
  18. user_agent = user_agent_rotator.get_random_user_agent()
  19. return user_agent
  20. bitbin_links = ['https://bitbin.it/oWdpwcJv/','https://bitbin.it/eJXeQF01/', 'https://bitbin.it/UsyS2ZoP/', 'https://bitbin.it/PsyAs1rD/', 'https://bitbin.it/3Ma3AaP6/', 'https://bitbin.it/mUUkzivt/', 'https://bitbin.it/MLVNLWdU/', 'https://bitbin.it/z3sakMf5/', 'https://bitbin.it/nOmii302/']
  21. proxy_site_list = ["https://eu1.proxysite.com/includes/process.php?action=update","https://eu2.proxysite.com/includes/process.php?action=update" ,"https://eu3.proxysite.com/includes/process.php?action=update" ,"https://eu4.proxysite.com/includes/process.php?action=update" ,"https://eu5.proxysite.com/includes/process.php?action=update" ,"https://eu6.proxysite.com/includes/process.php?action=update" ,"https://eu15.proxysite.com/includes/process.php?action=update" ,"https://eu15.proxysite.com/includes/process.php?action=update" ,"https://eu7.proxysite.com/includes/process.php?action=update" ,"https://eu8.proxysite.com/includes/process.php?action=update" ,"https://eu9.proxysite.com/includes/process.php?action=update" ,"https://eu10.proxysite.com/includes/process.php?action=update" ,"https://eu11.proxysite.com/includes/process.php?action=update" ,"https://eu12.proxysite.com/includes/process.php?action=update" ,"https://eu13.proxysite.com/includes/process.php?action=update" "https://eu14.proxysite.com/includes/process.php?action=update" "https://eu15.proxysite.com/includes/process.php?action=update" ,"https://eu16.proxysite.com/includes/process.php?action=update" ,"https://eu17.proxysite.com/includes/process.php?action=update" ,"https://eu18.proxysite.com/includes/process.php?action=update" ,"https://us1.proxysite.com/includes/process.php?action=update" ,"https://us2.proxysite.com/includes/process.php?action=update" ,"https://us3.proxysite.com/includes/process.php?action=update" ,"https://us4.proxysite.com/includes/process.php?action=update" ,"https://us5.proxysite.com/includes/process.php?action=update" ,"https://us6.proxysite.com/includes/process.php?action=update", "https://us7.proxysite.com/includes/process.php?action=update" ,"https://us8.proxysite.com/includes/process.php?action=update","https://us9.proxysite.com/includes/process.php?action=update" ,"https://us10.proxysite.com/includes/process.php?action=update" ,"https://us11.proxysite.com/includes/process.php?action=update" ,"https://us12.proxysite.com/includes/process.php?action=update" ,"https://us13.proxysite.com/includes/process.php?action=update" ,"https://us14.proxysite.com/includes/process.php?action=update" ,"https://us15.proxysite.com/includes/process.php?action=update" ,"https://us16.proxysite.com/includes/process.php?action=update" ,"https://us17.proxysite.com/includes/process.php?action=update" ,"https://us18.proxysite.com/includes/process.php?action=update" ,"https://us19.proxysite.com/includes/process.php?action=update" ,"https://us20.proxysite.com/includes/process.php?action=update" ]
  22. def create_hits():
  23. # change_mac()
  24. #this function generates traffic upon proxy list above
  25. # Get a copy of the default headers that requests would use
  26. headers = requests.utils.default_headers()
  27. # Update the headers with your custom ones
  28. # You don't have to worry about case-sensitivity with
  29. # the dictionary keys, because default_headers uses a custom
  30. # CaseInsensitiveDict implementation within requests' source code.
  31. new_ua = create_UA()
  32. #headers.update(
  33. # {
  34. # 'User-Agent': '{}'.format(new_ua),
  35. # }
  36. # )
  37. url = random.choice(proxy_site_list)
  38. cprint(f"the current used url is: {url}\n", "red","on_white")
  39. bitbin = random.choice(bitbin_links)
  40. cprint(f"the current bitbin link is: {bitbin}\n","green","on_white")
  41. headers = {'User_agent': '{}'.format(new_ua)}
  42. cprint("current user agent is: {}\n".format(new_ua),"blue", "on_white")
  43. data = {'update':'{}'.format(bitbin)}
  44. x = requests.post(url, json=data, headers=headers)
  45. if x:
  46. #subprocess.run(["figlet","hit done!"])
  47. time.sleep(random.randint(1,4))
  48. def main():
  49. subprocess.run(["reset"])
  50. subprocess.run(["clear"])
  51. z = input("enter how many hits do u need: ")
  52. for i in range(int(z)):
  53. create_hits()
  54. main()

comments powered by Disqus