2017-04-01 12:45阅读: 441评论: 0推荐: 0

iis6-0 cve-2017-7269 批量验证脚本

代码地址

import subprocess

f = open('ips.txt', 'r')
flines = f.readlines()

vulnsrvs = 0
i = 1

for line in flines:

    host = line.split(":")

    ip = host[0].replace('\n','')
    port = host[1].replace('\n','')

    print "Try (" + str(i) +") "+ str(ip) +":" + str(port)

    if port == "443":
        #dont bother with SSL/TLS
        continue
    try:
        myout =  subprocess.check_output(['curl', '--connect-timeout', '2', '--max-time', '2', '-s','-I', '-X', 'PROPFIND','http://' + ip  + ':' + port + '/' ])
        print myout
        if "HTTP/1.1 411 Length Required" in myout:
            print "Found one:"
            print myout
            vulnsrvs += 1
    except Exception, e:
        print str(e.output)
    i += 1
    print "Vulnerable: " + str(vulnsrvs)

说明

ips.txt 是待验证的列表格式为:

129.112.44.1:80
129.112.44.2:81
129.112.44.43:8808

它不检测443端口(HTTPS)
你也可以简单改一下进行网段批量验证。

转自群友CF_HB

本文作者:Akkuman

本文链接:https://www.cnblogs.com/Akkuman/p/6963121.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   Akkuman  阅读(441)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
  1. 1 404 not found REOL
404 not found - REOL
00:00 / 00:00
An audio error has occurred.