예제 #1
0
cve = "CVE-2017-5638"
rules = Detective(cve).get_rules()
print(rules)

# Now lets do both
from core.Defense import Defense

cve = "CVE-2017-5638"
defense_data = Defense(cve).get_all()
print(defense_data)

# exporting to json
cve = "CVE-2017-0199"
from core.Export import Export

Export(cve).dump_json()

# search module
from lib.Search import Search

# search a CPE 2.2
cpe = "cpe:/a:apache:tomcat:7.0.5"
print(Search(cpe).search_cpe())

# search a CPE 2.3
cpe = "cpe:2.3:a:adobe:flash_player:*:*:*:*:*:*:*:*"
print(Search(cpe).search_cpe())

# search a cve
cve = "cve-2017-3100"
print(Search(cve).search_cve())
예제 #2
0
    if args.inspection:
        id = args.inspection[0]
        print(Inspection(id).get_all())

    if args.exploitation:
        id = args.exploitation[0]
        print(Exploitation(id).get_exploits())

    if args.defense:
        id = args.defense[0]
        print(Defense(id).get_all())

    if args.export:
        id = args.export[0]
        Export(id).dump_json()
        # Export(id).dump_yaml()

    if args.search:
        type = args.search[0]
        type = str.join('_', ("search", type))
        id = args.search[1]

        result = getattr(Search(id), type)
        print(result())

    if args.plugin:
        plg_name = args.plugin[0]
        target = args.plugin[1]
        module = str.join('.', ('plugins', plg_name, 'api'))