Codebase list python-faraday / debian/2.0.0-0kali1 bin / delAllVulnsWith.py
debian/2.0.0-0kali1

Tree @debian/2.0.0-0kali1 (Download .tar.gz)

delAllVulnsWith.py @debian/2.0.0-0kali1raw · history · blame

#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''
Faraday Penetration Test IDE
Copyright (C) 2013  Infobyte LLC (http://www.infobytesec.com/)
See the file 'doc/LICENSE' for the license information

'''

import re
regex="ssl\-cert|ssl\-date|Traceroute Information|TCP\/IP Timestamps Supported|OS Identification|Common Platform Enumeration"
c=0
for host in api.__model_controller.getAllHosts():
    hostnames=""
    for v in host.getVulns():
        if re.match(regex,v.name) is not None:
            api.delVulnFromHost(v.id,host.id)
            c+=1

    for i in host.getAllInterfaces():
        for s in i.getAllServices():
            for v in s.getVulns():
                if re.match(regex,v.name) is not None:
                    api.delVulnFromService(v.id,host.id,s.id)
                    c+=1            

print "Vulnerabilities deleted %s" % c