remove setup_hook_httpntlmauth from built-in hooks

This commit is contained in:
debugtalk
2018-05-14 15:09:11 +08:00
parent d8c1a66971
commit c9354b5293
2 changed files with 7 additions and 7 deletions

View File

@@ -87,3 +87,10 @@ def hook_print(msg):
def modify_headers_os_platform(request, os_platform):
request["headers"]["os_platform"] = os_platform
def setup_hook_httpntlmauth(request):
if "httpntlmauth" in request:
from requests_ntlm import HttpNtlmAuth
auth_account = request.pop("httpntlmauth")
request["auth"] = HttpNtlmAuth(
auth_account["username"], auth_account["password"])