Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3.8 compatibility issue: TypeError: Missing required parameter 'digestmod'. #13

Closed
CaledoniaProject opened this issue May 3, 2020 · 6 comments

Comments

@CaledoniaProject
Copy link

dnstool no longer runs with python 3.8

[-] Connecting to host...
[-] Binding to host
Traceback (most recent call last):
  File "./dnstool.py", line 536, in <module>
    main()
  File "./dnstool.py", line 364, in main
    if not c.bind():
  File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 563, in bind
    response = self.do_ntlm_bind(controls)
  File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 1302, in do_ntlm_bind
    request = bind_operation(self.version, 'SICILY_RESPONSE_NTLM', ntlm_client, result['server_creds'])
  File "/usr/local/lib/python3.8/dist-packages/ldap3/operation/bind.py", line 81, in bind_operation
    server_creds = name.create_authenticate_message()
  File "/usr/local/lib/python3.8/dist-packages/ldap3/utils/ntlm.py", line 379, in create_authenticate_message
    nt_challenge_response = self.compute_nt_response()
  File "/usr/local/lib/python3.8/dist-packages/ldap3/utils/ntlm.py", line 485, in compute_nt_response
    response_key_nt = self.ntowf_v2()
  File "/usr/local/lib/python3.8/dist-packages/ldap3/utils/ntlm.py", line 497, in ntowf_v2
    return hmac.new(password_digest, (self.user_name.upper() + self.user_domain).encode('utf-16-le')).digest()
  File "/usr/lib/python3.8/hmac.py", line 153, in new
    return HMAC(key, msg, digestmod)
  File "/usr/lib/python3.8/hmac.py", line 51, in __init__
    raise TypeError("Missing required parameter 'digestmod'.")
TypeError: Missing required parameter 'digestmod'.
@CaledoniaProject
Copy link
Author

fortra/impacket#702

@dirkjanm
Copy link
Owner

dirkjanm commented May 3, 2020

This is an issue in the ldap3 library, removing any previous versions and installing the latest should fix it.

@Bobby-Wan
Copy link

Bobby-Wan commented Jun 9, 2020

Upgraded impacket, removed old ldap3 version, reinstalled, nothing fixes the issue in the hmac.py file. The problem occurs when i try to run jupyter notebook from a virtual environment.
Anything new on the topic ?

@Moonpiiie
Copy link

This is an issue in the ldap3 library, removing any previous versions and installing the latest should fix it.

Could you please tell me how to remove the previous ldap3?

@samuelfaindani
Copy link

Traceback (most recent call last):
File "", line 1, in
File "D:\apps\med-app\models\user.py", line 56, in verify_password
return check_password_hash(self.password, pwd)
File "D:\apps\med-app\venv-med\lib\site-packages\werkzeug\security.py", line 219, in check_password_hash
return hmac.compare_digest(_hash_internal(method, salt, password)[0], hashval)
File "D:\apps\med-app\venv-med\lib\site-packages\werkzeug\security.py", line 167, in _hash_internal
return hmac.new(salt, password, method).hexdigest(), method
File "C:\Users\samue\AppData\Local\Programs\Python\Python39\lib\hmac.py", line 170, in new
return HMAC(key, msg, digestmod)
File "C:\Users\samue\AppData\Local\Programs\Python\Python39\lib\hmac.py", line 56, in init
raise TypeError("Missing required parameter 'digestmod'.")
TypeError: Missing required parameter 'digestmod'.

HOW TO FIX THIS IN FLASK APPLICATION, PLEASE HELP

@Muzec0318
Copy link

This is an issue in the ldap3 library, removing any previous versions and installing the latest should fix it.

Could you please tell me how to remove the previous ldap3?

sudo rm -rf /usr/lib/python3/dist-packages/ldap3*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants