Skip to content

Commit e28361f

Browse files
authored
Merge pull request #118 from NVolcz/json-output
Remove is_json function
2 parents 40942f7 + e8ac712 commit e28361f

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

VHostScan/lib/helpers/file_helper.py

-8
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ def check_directory(self):
2323
print("[!] {} didn't exist and has been created.".format(
2424
directory))
2525

26-
def is_json(json_file):
27-
try:
28-
with open(json_file, "r") as f:
29-
json_object = json.load(f)
30-
except ValueError:
31-
return False
32-
return True
33-
3426
def write_file(self, contents):
3527
# check if host directory exists, if not create it
3628
self.check_directory()

VHostScan/lib/helpers/output_helper.py

-3
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ def output_json(self, filename):
8383

8484
output['Result'] = result
8585

86-
if not file.is_json(output):
87-
print("[!] Json format check failed")
88-
8986
file.write_file(json.dumps(output, indent=2))
9087

9188
def output_fuzzy(self):

0 commit comments

Comments
 (0)