When running this:
import hashlib
hash1 = hashlib.md5(b'admin:Pentester Academy:asdds').hexdigest()
hash2 = hashlib.md5(b'GET:/lab/webapp/digest/1').hexdigest()
nonce = "526f295f84bcafc67598cd8e760a9cc5"
response_unhashed = (bytes("{}:{}:{}".format(hash1, nonce, hash2)), encoding='utf-8')
response_md5hashed = hashlib.md5(response_unhashed).hexdigest()
print(response_md5hashed)
I get this...
Traceback (most recent call last):
File "C:\Users\Adrian\Desktop\Infosec\Notes\Programming\example.py", line 7
response_unhashed = (bytes("{}:{}:{}".format(hash1, nonce, hash2)), encoding='utf-8')
^
SyntaxError: invalid syntax
Where's the syntax error? Checked some of the bytes() and format() documentation but couldn't find any clues.