微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

解析 db_nmap metasploit 的终端输出

如何解决解析 db_nmap metasploit 的终端输出

我有这两个字符串,例如在 python 中:

s = 'VULNERABLE: Apache byterange filter DoS State: VULNERABLE IDs: BID:49303 CVE:CVE-2011-3192 The Apache web server is vulnerable to a denial of service attack when numerous overlapping byte ranges are requested. disclosure date: 2011-08-19 References: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3192 https://www.securityfocus.com/bid/49303 https://seclists.org/fulldisclosure/2011/Aug/175 https://www.tenable.com/plugins/nessus/55976'

我想把它解析成这样的字典形式,例如:

d = {
'VULNERABLE': Apache byterange filter DoS,'State': VULNERABLE,'VULNERABLE IDs': {
'BID': '49303','CVE': 'CVE-2011-3192'
},'Description': 'The Apache web server is vulnerable to a denial of service attack when numerous overlapping byte ranges are requested','disclosure date': '2011-08-19','References': ['https://www.securityfocus.com/bid/49303','https://seclists.org/fulldisclosure/2011/Aug/175','https://www.tenable.com/plugins/nessus/55976']
}

这是 db_nmapMetasploit 漏洞脚本扫描程序的一些输出 有没有一种简单的方法可以在 python 中做到这一点?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。