resolved dependency issue of the json.py file, renamed it to json_reporter

This commit is contained in:
manish
2019-02-22 15:13:58 +01:00
parent 66fed51036
commit 607612866f
4 changed files with 2 additions and 15 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
*.pyc
.dockerignore
*aqua*
.idea/

View File

@@ -35,7 +35,7 @@ if config.log.lower() != "none":
from src.modules.report.plain import PlainReporter
from src.modules.report.yaml import YAMLReporter
from src.modules.report.json import JSONReporter
from src.modules.report.json_reporter import JSONReporter
if config.report.lower() == "yaml":
config.reporter = YAMLReporter()

View File

@@ -1,13 +0,0 @@
import StringIO
import json
from base import BaseReporter
class JSONReporter(BaseReporter):
def get_report(self):
report = {
"nodes": self.get_nodes(),
"services": self.get_services(),
"vulnerabilities": self.get_vulnerabilities(),
"vulnerability_count": self.get_count()
}
return json.dumps(report)

View File

@@ -1,4 +1,3 @@
import StringIO
import json
from base import BaseReporter