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


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.0

import os
import sys

def 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检测结果:


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM