python3调用exe程序编写cve20190708批量检测工具,,1、python3调


1、python3调用exe程序编写cve20190708批量检测工具

工具下载地址:

https://www.qianxin.com/other/CVE-2019-0708

由于这个exe程序只是单IP扫描版本,于是使用python3修改为批量扫描脚本版本

#!/usr/bin/python3#-*- coding:utf-8 -*-#编写环境  windows 7 x64  Notepad++ + Python3.5.0import osimport sysdef main():        #需要修改的地址,注意后面有个空格    path="D:\\MS_19_0708_Scan\\cve20190708批量脚本检测工具\\cve-2019-0708-scan.exe "        filename="ip.txt"    with open(‘result.txt‘,‘w‘) as fw:         with open(filename,‘r‘) as file:            for line in file:                try:                    result = os.popen(path+line+‘ 3389‘)                    print("检测 "+line)                    fw.writelines(result)                              fw.writelines(line)                     except Exception as e:                    print("Path error")                    print(e)   if __name__ == ‘__main__‘:    main()    

  

1.1测试用例

技术图片

1.2使用方法

技术图片

1.3检测结果:

技术图片

python3调用exe程序编写cve20190708批量检测工具

评论关闭