Skip to content

Commit 02f6425

Browse files
committed
Work-around to avoid a TypeError traceback when reading a file content on MySQL/MSSQL
1 parent 93ee4a0 commit 02f6425

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/generic/filesystem.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ def __unbase64String(self, base64Str):
6565
def __unhexString(self, hexStr):
6666
unhexStr = ""
6767

68+
if ( len(hexStr) % 2 ) != 0:
69+
errMsg = "for some reasons sqlmap retrieved an odd-length "
70+
errMsg += "hexadecimal string which it is not able to convert "
71+
errMsg += "to raw string"
72+
logger.error(errMsg)
73+
74+
return hexStr
75+
6876
if isinstance(hexStr, (list, tuple, set)):
6977
for chunk in hexStr:
7078
if isinstance(chunk, (list, tuple, set)):

0 commit comments

Comments
 (0)