From 7c7aff12c654cd54113b7141f018c40d6707ea66 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 30 Oct 2012 01:26:19 +0100 Subject: [PATCH] Update for an Issue #225 --- lib/core/common.py | 1 + lib/takeover/web.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 893715c8e..b8e06be90 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -786,6 +786,7 @@ def readInput(message, default=None, checkBatch=True): kb.prependFlag = False try: data = raw_input() or default + data = getUnicode(data, system=True) if data else data except: time.sleep(0.05) # Reference: http://www.gossamer-threads.com/lists/python/python/781893 kb.prependFlag = True diff --git a/lib/takeover/web.py b/lib/takeover/web.py index e2aa4c543..7963eae39 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -33,6 +33,7 @@ from lib.core.common import randomStr from lib.core.common import readInput from lib.core.common import singleTimeWarnMessage from lib.core.convert import hexencode +from lib.core.convert import utf8encode from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger @@ -263,7 +264,7 @@ class Web: with open(filename, "w+") as f: _ = decloak(os.path.join(paths.SQLMAP_SHELL_PATH, "stager.%s_" % self.webApi)) _ = _.replace("WRITABLE_DIR", localPath.replace('/', '\\\\') if Backend.isOs(OS.WINDOWS) else localPath) - f.write(_) + f.write(utf8encode(_)) self.unionWriteFile(filename, self.webStagerFilePath, "text")