Skip to content

Commit b1fdae1

Browse files
author
Michael Skelton
committed
Improved output of url results
1 parent 72eb1ca commit b1fdae1

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

VHostScan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def main():
2626

2727
scanner = virtual_host_scanner(arguments.target_hosts, arguments.port, arguments.unique_depth, arguments.ignore_http_codes, arguments.ignore_content_length, arguments.wordlist)
2828
scanner.scan()
29-
print(scanner.likely_matches())
29+
30+
for p in scanner.likely_matches(): print(" [>] %s" % p)
3031

3132
if __name__ == "__main__":
3233
main()

lib/core/virtual_host_scanner.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ def scan(self):
8282

8383
def likely_matches(self):
8484
if self.completed_scan is False:
85-
print("Likely matches cannot be printed as a scan has not yet been run.")
85+
print("[!] Likely matches cannot be printed as a scan has not yet been run.")
8686
return
8787

88-
print("\n[#] Most likely matches with a unique count of %s or less:" % self.unique_depth)
89-
90-
d={}
88+
print("\n[+] Most likely matches with a unique count of %s or less:" % self.unique_depth)
9189

90+
# segment results from previous scan into usable results
91+
segmented_data={}
9292
for item in self.results:
93-
r=item.split(",")
94-
d[r[0]]=r[1]
93+
result = item.split(",")
94+
segmented_data[result[0]] = result[1]
9595

96-
df= pd.DataFrame([[key, value] for key, value in d.items()], columns=["key_col", "val_col"])
97-
d=df.groupby("val_col").filter(lambda x: len(x) <= self.unique_depth)
98-
matches=((d["key_col"].values).tolist())
96+
dataframe = pd.DataFrame([[key, value] for key, value in segmented_data.items()], columns=["key_col", "val_col"])
97+
segmented_data = dataframe.groupby("val_col").filter(lambda x: len(x) <= self.unique_depth)
98+
matches = ((segmented_data["key_col"].values).tolist())
9999

100100
return matches

0 commit comments

Comments
 (0)