Skip to content

Commit 50c9a22

Browse files
committed
Added fuzzy_logic option
1 parent 8b36d18 commit 50c9a22

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

VHostScan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def main():
2626
parser.add_argument('--ignore-content-length', dest='ignore_content_length', type=int, help='Ignore content lengths of specificed amount (default 0).', default=0)
2727
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)
2828
parser.add_argument("--ssl", dest="ssl", action="store_true", help="If set then connections will be made over HTTPS instead of HTTP (default http).", default=False)
29+
parser.add_argument("--fuzzy_logic", dest="fuzzy_logic", action="store_true", help="If set then fuzzy match will be performed against unique hosts (default off).", default=False)
2930
parser.add_argument("-oN", dest="output_normal", help="Normal output printed to a file when the -oN option is specified with a filename argument." )
3031
arguments = parser.parse_args()
3132

@@ -45,7 +46,7 @@ def main():
4546
if(arguments.ignore_content_length > 0):
4647
print("[>] Ignoring Content length: %s" % (arguments.ignore_content_length))
4748

48-
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)
49+
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, arguments.fuzzy_logic)
4950

5051
scanner.scan()
5152
output = output_helper(scanner)

lib/core/virtual_host_scanner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class virtual_host_scanner(object):
2020
"""
2121

2222
def __init__(self, target, base_host, port=80, real_port=80, ssl=False, unique_depth=1, ignore_http_codes='404', ignore_content_length=0,
23-
wordlist="./wordlists/virtual-host-scanning.txt"):
23+
wordlist="./wordlists/virtual-host-scanning.txt", fuzzy_logic=False):
2424
self.target = target
2525
self.base_host = base_host
2626
self.port = int(port)
@@ -30,6 +30,7 @@ def __init__(self, target, base_host, port=80, real_port=80, ssl=False, unique_d
3030
self.wordlist = wordlist
3131
self.unique_depth = unique_depth
3232
self.ssl = ssl
33+
self.fuzzy_logic = fuzzy_logic
3334

3435
# this can be made redundant in future with better exceptions
3536
self.completed_scan=False

0 commit comments

Comments
 (0)