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 是待验证的列表格式为:
1
2
3
129.112.44.1:80
129.112.44.2:81
129.112.44.43:8808
它不检测443端口(HTTPS) 你也可以简单改一下进行网段批量验证。
作者:CF_HB
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论