Change arbo and create config file

This commit is contained in:
2023-06-11 20:19:40 +02:00
parent 0312e1dbe4
commit 39e83d2336
23 changed files with 252 additions and 111 deletions
+1
View File
@@ -0,0 +1 @@
#!/usr/bin/env python3
+51
View File
@@ -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
+7
View File
@@ -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