From 989271e9f8987768588e036b91a51ad68289bda1 Mon Sep 17 00:00:00 2001 From: sqlmapper Date: Wed, 15 Jul 2015 04:27:33 -0400 Subject: [PATCH 1/2] Update common.py --- lib/core/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index ca63be94e..a429d8daa 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -872,7 +872,7 @@ def dataToOutFile(filename, data): retVal = os.path.join(conf.filePath, filePathToSafeString(filename)) try: - with openFile(retVal, "wb") as f: + with open(retVal, "wb") as f: f.write(data) except IOError, ex: errMsg = "something went wrong while trying to write " From a401698d741f18c0c96e73f5e2b36ab2a55d16ac Mon Sep 17 00:00:00 2001 From: sqlmapper Date: Wed, 15 Jul 2015 04:31:13 -0400 Subject: [PATCH 2/2] Update filesystem.py --- plugins/generic/filesystem.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/generic/filesystem.py b/plugins/generic/filesystem.py index b069eabfe..a1df8d669 100644 --- a/plugins/generic/filesystem.py +++ b/plugins/generic/filesystem.py @@ -27,6 +27,7 @@ from lib.core.enums import EXPECTED from lib.core.enums import PAYLOAD from lib.core.exception import SqlmapUndefinedMethod from lib.request import inject +from binascii import a2b_hex class Filesystem: """ @@ -232,7 +233,7 @@ class Filesystem: fileContent = newFileContent if fileContent is not None: - fileContent = decodeHexValue(fileContent) + fileContent = a2b_hex(fileContent) if fileContent: localFilePath = dataToOutFile(remoteFile, fileContent)