Skip to content

Commit 695dd5e

Browse files
author
Michael Skelton
committed
Added ouptut_normal_detail() and output_normal_likely() routines for future file outputs
1 parent 0842193 commit 695dd5e

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

VHostScan.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,13 @@ def main():
4444
if(arguments.ignore_content_length > 0):
4545
print("[>] Ignoring Content length: %s" % (arguments.ignore_content_length))
4646

47-
scanner = virtual_host_scanner(arguments.target_hosts, arguments.base_host, arguments.port, arguments.real_port, arguments.ssl, arguments.unique_depth,
48-
arguments.ignore_http_codes, arguments.ignore_content_length, arguments.wordlist)
47+
scanner = virtual_host_scanner(arguments.target_hosts, arguments.base_host, arguments.port, arguments.real_port, arguments.ssl, arguments.unique_depth, arguments.ignore_http_codes, arguments.ignore_content_length, arguments.wordlist)
4948

5049
scanner.scan()
5150

52-
print("\n[+] Most likely matches with a unique count of %s or less:" % arguments.unique_depth)
53-
for p in scanner.likely_matches(): print(" [>] %s" % p)
54-
55-
output = output_helper()
56-
output.hosts = scanner.hosts
57-
output.print_current()
51+
output = output_helper(scanner)
52+
print(output.output_normal_detail())
53+
print(output.output_normal_likely())
5854

5955
if __name__ == "__main__":
6056
main()

lib/core/virtual_host_scanner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def scan(self):
7373
# hash the page results to aid in identifing unique content
7474
page_hash = hashlib.sha256(res.text.encode('utf-8')).hexdigest()
7575
output = '[#] Found: {} (code: {}, length: {}, hash: {})\n'.format(hostname, res.status_code,
76-
res.headers.get('content-length'), page_hash)
76+
res.headers.get('content-length'), page_hash)
7777
# temporary host class code
7878
host = discovered_host()
7979
host.hostname = hostname
@@ -82,7 +82,7 @@ def scan(self):
8282

8383
for key, val in res.headers.items():
8484
output += ' {}: {}\n'.format(key, val)
85-
host.keys.append(' {}: {}\n'.format(key, val))
85+
host.keys.append('{}: {}'.format(key, val))
8686

8787
# print current results so feedback remains in "realtime"
8888
print(output)

0 commit comments

Comments
 (0)