diff --git a/lib/request/direct.py b/lib/request/direct.py index dd9725375..0c2f63b99 100644 --- a/lib/request/direct.py +++ b/lib/request/direct.py @@ -72,7 +72,7 @@ def direct(query, content=True): out = list(output)[0][0] if isinstance(out, str): out = utf8decode(out) - return out + return getUnicode(out) else: return list(output) else: diff --git a/plugins/dbms/mysql/filesystem.py b/plugins/dbms/mysql/filesystem.py index 11ffe9fb7..35fede0de 100644 --- a/plugins/dbms/mysql/filesystem.py +++ b/plugins/dbms/mysql/filesystem.py @@ -66,7 +66,7 @@ class Filesystem(GenericFilesystem): length = inject.getValue("SELECT LENGTH(%s) FROM %s" % (self.tblField, self.fileTblName), sort=False, resumeValue=False, charsetType=2) - if not length.isdigit() or not len(length) or length in ( "0", "1" ): + if length is None or not length.isdigit() or not len(length) or length in ( "0", "1" ): errMsg = "unable to retrieve the content of the " errMsg += "file '%s'" % rFile raise sqlmapNoneDataException, errMsg