From 9ea72f9640ce8f2505c656051b34bcba44070520 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 25 Jun 2010 13:24:43 +0000 Subject: [PATCH] Minor bug fixes to -d --- lib/request/direct.py | 2 +- plugins/dbms/mysql/filesystem.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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