-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathscan_file.py
executable file
·42 lines (39 loc) · 908 Bytes
/
scan_file.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
""" scan file module """
class ScanFile(dict):
""" ScanFile container based on dict """
duration = ""
title = ""
policy = ""
scanner_edition = ""
uuid = ""
stigid = ""
description = ""
type = ""
hostname = ""
ip = ""
mac = ""
os = ""
filename = ""
total = ""
score = ""
scan_user = ""
scan_date = ""
version = ""
release = ""
credentialed = False
requirements = []
hosts = []
feed = ''
port_range = ""
def __init__(self, data):
""" Constructor """
dict.__init__(self)
self['requirements'] = []
for key in data:
if key in dir(self):
self[key] = data[key]
else:
self[key] = ''
def add_requirement(self, req):
""" Adds a requirement to the internal array """
self['requirements'].append(req)