File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,11 @@ def main():
120
120
121
121
if (arguments .output_json ):
122
122
output .output_json (arguments .output_json )
123
- print ("\n [+] Writing json ouptut to %s" % arguments .output_json )
123
+ print ("\n [+] Writing json output to %s" % arguments .output_json )
124
+
125
+ if (arguments .output_grepable ):
126
+ output .output_grepable (arguments .output_grepable )
127
+ print ("\n [+] Writing grepable ouptut to %s" % arguments .output_json )
124
128
125
129
126
130
if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ def write_normal(self, filename):
24
24
output += self .output_normal_detail ()
25
25
file .write_file (output )
26
26
27
+ def write_grepable (self , filename ):
28
+ file = file_helper (filename )
29
+
30
+ output = self .generate_header ()
31
+ output += self .output_grepable_detail ()
32
+
33
+ file .write_file (output )
34
+
27
35
def output_normal_likely (self ):
28
36
uniques = False
29
37
depth = str (self .scanner .unique_depth )
@@ -107,6 +115,16 @@ def output_normal_detail(self):
107
115
108
116
return output
109
117
118
+ def output_grepable_detail (self ):
119
+ for host in self .scanner .hosts :
120
+ output += "\n {}\t {}\t {}" .format (
121
+ str (host .hostname ),
122
+ str (host .response_code ),
123
+ str (host .hash )
124
+ )
125
+
126
+ return output
127
+
110
128
def generate_header (self ):
111
129
output = "VHostScanner Log: {} {}\n " .format (
112
130
time .strftime ("%d/%m/%Y" ),
You can’t perform that action at this time.
0 commit comments