Change arbo and create config file
This commit is contained in:
@@ -0,0 +1 @@
|
||||
#!/usr/bin/env python3
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
from json import dumps
|
||||
from parsing.base import ParsingBase
|
||||
|
||||
|
||||
class Parsing(ParsingBase):
|
||||
def __init__(self, objects):
|
||||
self._parsing = dict()
|
||||
self._reports = dict()
|
||||
self._objects = objects
|
||||
|
||||
def runParsing(self):
|
||||
# Generate report
|
||||
self._constructReports()
|
||||
|
||||
|
||||
print(self._reports)
|
||||
|
||||
def _parseFile(self):
|
||||
pass
|
||||
|
||||
def _generateReport(self, objects):
|
||||
# We can generate the report
|
||||
for postfix in self._reports['postfix']:
|
||||
self._reports['postfix'][postfix] = objects[postfix]
|
||||
|
||||
def _parsingFile(self, line, obj, vulnerabilityFound) -> bool:
|
||||
"""
|
||||
This function parse the line and try to find the item in it
|
||||
"""
|
||||
result = bool()
|
||||
|
||||
return result
|
||||
|
||||
def _constructReports(self):
|
||||
"""
|
||||
Construct dictionary for result of the tests
|
||||
Each entry contains:
|
||||
Key:
|
||||
- filename: filename of the test
|
||||
- line: line of the test
|
||||
- parse: Display the line where the vulnerabilites has been found
|
||||
- description: description of the vulnerability
|
||||
- level: high, medium or low
|
||||
"""
|
||||
self._reports['postfix'] = dict()
|
||||
|
||||
def getResults(self) -> dict:
|
||||
return self._reports
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
def postfix() -> dict:
|
||||
postfix = dict()
|
||||
postfix['regexp'] = "inet_interfaces = all"
|
||||
postfix['replace'] = "inet_interfaces = loopback-only"
|
||||
return postfix
|
||||
Reference in New Issue
Block a user