From 6b5db1f959ac1ba8229f0b2b1cab18c2693e082b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 1 Apr 2019 09:47:36 +0200 Subject: [PATCH] Fixes #3560 --- lib/core/settings.py | 2 +- lib/takeover/web.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 0d0b2afd1..f6373c3aa 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.3.3.80" +VERSION = "1.3.4.0" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/takeover/web.py b/lib/takeover/web.py index 27e522ad5..95c3e50fd 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -100,6 +100,12 @@ class Web: if content is not None: stream = io.BytesIO(content) # string content + # Reference: https://github.com/sqlmapproject/sqlmap/issues/3560 + # Reference: https://stackoverflow.com/a/4677542 + stream.seek(0, os.SEEK_END) + stream.len = stream.tell() + stream.seek(0, os.SEEK_SET) + return self._webFileStreamUpload(stream, destFileName, directory) def _webFileStreamUpload(self, stream, destFileName, directory):