From 981bfd216d2f84299f7fb17464560f9516a7d27b Mon Sep 17 00:00:00 2001 From: Tim Kent Date: Sat, 7 Oct 2017 21:11:46 +1000 Subject: [PATCH 1/3] Allow Server Name Identification to be set --- lib/core/virtual_host_scanner.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/core/virtual_host_scanner.py b/lib/core/virtual_host_scanner.py index 3fc9cc5..3c7971d 100644 --- a/lib/core/virtual_host_scanner.py +++ b/lib/core/virtual_host_scanner.py @@ -6,9 +6,21 @@ import pandas as pd import time from lib.core.discovered_host import * +from urllib3.util import ssl_ DEFAULT_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' +_target_host = None +_ssl_wrap_socket = ssl_.ssl_wrap_socket +def ssl_wrap_socket(sock, keyfile=None, certfile=None, cert_reqs=None, + ca_certs=None, server_hostname=None, + ssl_version=None, ciphers=None, ssl_context=None, + ca_cert_dir=None): + ssl_wrap_socket_(sock, keyfile=keyfile, certfile=certfile, cert_reqs=cert_reqs, + ca_certs=ca_certs, server_hostname=_target_host, + ssl_version=ssl_version, ciphers=ciphers, ssl_context=ssl_context, + ca_cert_dir=ca_cert_dir) +ssl_.ssl_wrap_socket = _ssl_wrap_socket class virtual_host_scanner(object): """Virtual host scanning class @@ -85,6 +97,7 @@ def scan(self): }) dest_url = '{}://{}:{}/'.format('https' if self.ssl else 'http', self.target, self.port) + _target_host = hostname try: res = requests.get(dest_url, headers=headers, verify=False) From 1812de2b0ae22f19391af8eac08516347904a9bc Mon Sep 17 00:00:00 2001 From: Michael <886344+codingo@users.noreply.github.com> Date: Sat, 7 Oct 2017 21:38:10 +1000 Subject: [PATCH 2/3] Update __version__.py --- lib/core/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/__version__.py b/lib/core/__version__.py index 19f2498..190075d 100644 --- a/lib/core/__version__.py +++ b/lib/core/__version__.py @@ -2,5 +2,5 @@ # |V|H|o|s|t|S|c|a|n| Developed by @codingo_ & @__timk # +-+-+-+-+-+-+-+-+-+ https://github.com/codingo/VHostScan -__version__ = '1.5.2' +__version__ = '1.5.3' From 9442be8d47c04867d4699fef16852bff0be1796c Mon Sep 17 00:00:00 2001 From: Michael <886344+codingo@users.noreply.github.com> Date: Sun, 8 Oct 2017 15:41:17 +1000 Subject: [PATCH 3/3] Update __version__.py --- lib/core/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/__version__.py b/lib/core/__version__.py index 190075d..37e37a0 100644 --- a/lib/core/__version__.py +++ b/lib/core/__version__.py @@ -2,5 +2,5 @@ # |V|H|o|s|t|S|c|a|n| Developed by @codingo_ & @__timk # +-+-+-+-+-+-+-+-+-+ https://github.com/codingo/VHostScan -__version__ = '1.5.3' +__version__ = '1.5.4'