From 3eec5a90f2fc069b1e6a31244a26924addbf881f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E9=A3=8E=E9=A3=98=E7=84=B6?= <207426719@qq.com> Date: Mon, 30 Jul 2018 10:42:38 +0800 Subject: [PATCH] Update exceptions.py Will be generated when using dirhunt for ip with https certificate ssl.CertificateError: hostname XXXX doesn't match either of Anomaly. For example dirhunt https://42.186.69.33/venus/projects/_/users --- dirhunt/exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dirhunt/exceptions.py b/dirhunt/exceptions.py index 7f46a2e..82242c7 100644 --- a/dirhunt/exceptions.py +++ b/dirhunt/exceptions.py @@ -2,7 +2,9 @@ import functools import sys import traceback +import ssl +ssl.match_hostname = lambda cert, hostname: True class DirHuntError(Exception): body = '' @@ -44,4 +46,4 @@ def wrapped(*args, **kwargs): except Exception as e: traceback.print_exc() raise e - return wrapped \ No newline at end of file + return wrapped