File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,7 +120,11 @@ def main():
120120
121121 if (arguments .output_json ):
122122 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 )
124128
125129
126130if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ def write_normal(self, filename):
2424 output += self .output_normal_detail ()
2525 file .write_file (output )
2626
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+
2735 def output_normal_likely (self ):
2836 uniques = False
2937 depth = str (self .scanner .unique_depth )
@@ -107,6 +115,16 @@ def output_normal_detail(self):
107115
108116 return output
109117
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+
110128 def generate_header (self ):
111129 output = "VHostScanner Log: {} {}\n " .format (
112130 time .strftime ("%d/%m/%Y" ),
You can’t perform that action at this time.
0 commit comments