diff --git a/lib/takeover/web.py b/lib/takeover/web.py index 8fab16c3b..40a403dc0 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -263,8 +263,8 @@ class Web: with open(filename, "w+") as f: _ = decloak(os.path.join(paths.SQLMAP_SHELL_PATH, "stager.%s_" % self.webApi)) - _ = _.replace("WRITABLE_DIR", directory.replace('/', '\\\\') if Backend.isOs(OS.WINDOWS) else directory) - f.write(utf8encode(_)) + _ = _.replace("WRITABLE_DIR", utf8encode(directory.replace('/', '\\\\') if Backend.isOs(OS.WINDOWS) else directory)) + f.write(_) self.unionWriteFile(filename, self.webStagerFilePath, "text", forceCheck=True)