Skip to content

Commit 95c0f7f

Browse files
author
Michael Skelton
committed
EOD checkin: Successful pass of data to output script object
1 parent 3fe885d commit 95c0f7f

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

VHostScan.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
from argparse import ArgumentParser
66
from lib.core.virtual_host_scanner import *
7-
7+
from lib.outputs.output_normal import *
88

99
def print_banner():
1010
print("+-+-+-+-+-+-+-+-+-+ v. 0.2")
@@ -51,7 +51,9 @@ def main():
5151
print("\n[+] Most likely matches with a unique count of %s or less:" % arguments.unique_depth)
5252
for p in scanner.likely_matches(): print(" [>] %s" % p)
5353

54-
for p in scanner.hosts: print ("[!!!!] %s (%s)" % (p.hostname, p.response_code))
54+
output = output_normal()
55+
output.hosts = scanner.hosts
56+
output.print_current()
5557

5658
if __name__ == "__main__":
5759
main()

lib/core/discovered_host.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ class discovered_host(object):
55

66
def __init__(self):
77
self.hostname = ''
8-
self.response_code = 0
8+
self.response_code = 0
9+
self.hash = ''

lib/core/virtual_host_scanner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def scan(self):
8484
host = discovered_host()
8585
host.hostname = hostname
8686
host.response_code = res.status_code
87+
host.hash = page_hash
8788
self.hosts.append(host)
8889

8990
# add url and hash into array for likely matches

lib/outputs/output_normal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22

33
class output_normal(object):
44
def __init__(self):
5-
print("Placeholder class for later")
5+
self.hosts = []
6+
7+
def print_current(self):
8+
for p in self.hosts: print ("[!!!!] %s (%s) hash: %s" % (p.hostname, p.response_code, p.hash))

0 commit comments

Comments
 (0)