Skip to content

Commit bb41e34

Browse files
author
Michael Skelton
committed
Removing majority of print statements from dependant class
1 parent 3a86b52 commit bb41e34

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

VHostScan.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,26 @@ def main():
2424
parser.add_argument('--unique-depth', dest='unique_depth', type=int, help='Show likely matches of page content that is found x times (default 1).', default=1)
2525
parser.add_argument("--ssl", dest="ssl", action="store_true", help="If set then connections will be made over HTTPS instead of HTTP.", default=False)
2626
arguments = parser.parse_args()
27-
2827

28+
if not os.path.exists(arguments.wordlist):
29+
print("[!] Wordlist %s doesn't exist, ending scan." % arguments.wordlistt)
30+
sys.exit()
2931

30-
scanner = virtual_host_scanner(arguments.target_hosts, arguments.port, arguments.ssl, arguments.unique_depth, arguments.ignore_http_codes, arguments.ignore_content_length, arguments.wordlist)
31-
scanner.scan()
32+
print("[+] Starting virtual host scan for %s using port %s and wordlist %s" % (arguments.target_hosts, str(arguments.port), arguments.wordlist))
33+
34+
if(arguments.ssl):
35+
print("[>] SSL flag set, sending all results over HTTPS")
36+
37+
print("[>] Ignoring HTTP codes: %s" % (arguments.ignore_http_codes))
3238

39+
if(arguments.ignore_content_length > 0):
40+
print("[>] Ignoring Content length: %s" % (arguments.ignore_content_length))
41+
42+
scanner = virtual_host_scanner(arguments.target_hosts, arguments.port, arguments.ssl, arguments.unique_depth,
43+
arguments.ignore_http_codes, arguments.ignore_content_length, arguments.wordlist)
44+
45+
scanner.scan()
46+
3347
print("\n[+] Most likely matches with a unique count of %s or less:" % arguments.unique_depth)
3448
for p in scanner.likely_matches(): print(" [>] %s" % p)
3549

lib/core/virtual_host_scanner.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ def __init__(self, target, port=80, ssl=False, unique_depth=1, ignore_http_codes
3232

3333

3434
def scan(self):
35-
print("[+] Starting virtual host scan for %s using port %s and wordlist %s" % (self.target, str(self.port), self.wordlist))
36-
print("[>] Ignoring HTTP codes: %s" % (self.ignore_http_codes))
37-
if(self.ignore_content_length > 0):
38-
print("[>] Ignoring Content length: %s" % (self.ignore_content_length))
39-
40-
if not os.path.exists(self.wordlist):
41-
print("[!] Wordlist %s doesn't exist, ending scan." % self.wordlist)
42-
return
43-
4435
virtual_host_list = open(self.wordlist).read().splitlines()
4536

4637
for virtual_host in virtual_host_list:

0 commit comments

Comments
 (0)