Use r string for regex
This commit is contained in:
parent
c36c75ac48
commit
077ad19255
@ -42,7 +42,7 @@ class FritzBox:
|
|||||||
|
|
||||||
logging.debug(f"Calculate v2 challenge: {challenge}")
|
logging.debug(f"Calculate v2 challenge: {challenge}")
|
||||||
chall_regex = re.compile(
|
chall_regex = re.compile(
|
||||||
"2\$(?P<iter1>[0-9a-zA-Z]+)\$(?P<salt1>[0-9a-zA-Z]+)\$(?P<iter2>[0-9a-zA-Z]+)\$(?P<salt2>[0-9a-zA-Z]+)")
|
r"2\$(?P<iter1>[0-9a-zA-Z]+)\$(?P<salt1>[0-9a-zA-Z]+)\$(?P<iter2>[0-9a-zA-Z]+)\$(?P<salt2>[0-9a-zA-Z]+)")
|
||||||
|
|
||||||
chall_parts = chall_regex.match(challenge).groupdict()
|
chall_parts = chall_regex.match(challenge).groupdict()
|
||||||
salt1: bytes = bytes.fromhex(chall_parts["salt1"])
|
salt1: bytes = bytes.fromhex(chall_parts["salt1"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user