Describe the bug
Sqlmap returns connection error if there's single character hex sequence in target response
To Reproduce
Expected behavior
decode response page correctly
The error is in
|
page = re.sub(b"&#x([0-9a-f]{1,2});", lambda _: decodeHex(_.group(1) if len(_.group(1)) == 2 else "0%s" % _.group(1)), page) |
page = re.sub(b"&#x([0-9a-f]{1,2});", lambda _: decodeHex(_.group(1) if len(_.group(1)) == 2 else "0%s" % _.group(1)), page)
I think there should be binary format in "0%s" % _.group(1) - something like
b"0%s" % _.group(1)
Describe the bug
Sqlmap returns connection error if there's single character hex sequence in target response
To Reproduce
Expected behavior
decode response page correctly
The error is in
sqlmap/lib/request/basic.py
Line 342 in c382321
page = re.sub(b"&#x([0-9a-f]{1,2});", lambda _: decodeHex(_.group(1) if len(_.group(1)) == 2 else "0%s" % _.group(1)), page)I think there should be binary format in "0%s" % _.group(1) - something like
b"0%s" % _.group(1)