From 02f6425db8d23fcb001afad0f15e45ffb57ff650 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 2 Jun 2009 14:24:48 +0000 Subject: [PATCH] Work-around to avoid a TypeError traceback when reading a file content on MySQL/MSSQL --- plugins/generic/filesystem.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/generic/filesystem.py b/plugins/generic/filesystem.py index 22ff224f2..f476c5cd5 100644 --- a/plugins/generic/filesystem.py +++ b/plugins/generic/filesystem.py @@ -65,6 +65,14 @@ class Filesystem: def __unhexString(self, hexStr): unhexStr = "" + if ( len(hexStr) % 2 ) != 0: + errMsg = "for some reasons sqlmap retrieved an odd-length " + errMsg += "hexadecimal string which it is not able to convert " + errMsg += "to raw string" + logger.error(errMsg) + + return hexStr + if isinstance(hexStr, (list, tuple, set)): for chunk in hexStr: if isinstance(chunk, (list, tuple, set)):