Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d43429

Browse files
committed
Fixes #3819
1 parent c3a95e8 commit 7d43429

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.7.19"
21+
VERSION = "1.3.7.20"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/generic/filesystem.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
from lib.core.common import isTechniqueAvailable
2222
from lib.core.common import readInput
2323
from lib.core.compat import xrange
24+
from lib.core.convert import encodeBase64
25+
from lib.core.convert import encodeHex
2426
from lib.core.convert import getText
2527
from lib.core.convert import getUnicode
2628
from lib.core.data import conf
@@ -134,8 +136,14 @@ def fileEncode(self, fileName, encoding, single, chunkSize=256):
134136
def fileContentEncode(self, content, encoding, single, chunkSize=256):
135137
retVal = []
136138

137-
if encoding:
138-
content = getText(codecs.encode(content, encoding)).replace("\n", "")
139+
if encoding == "hex":
140+
content = encodeHex(content)
141+
elif encoding == "base64":
142+
content = encodeBase64(content)
143+
else:
144+
content = codecs.encode(content, encoding)
145+
146+
content = getText(content).replace("\n", "")
139147

140148
if not single:
141149
if len(content) > chunkSize:

0 commit comments

Comments
 (0)