All of a sudden PY2 _configparser doesn't support \tkey = value

This commit is contained in:
Miroslav Stampar 2021-01-12 15:57:12 +01:00
parent 66a3118f81
commit a697e6c307
2 changed files with 7 additions and 4 deletions

View File

@ -216,7 +216,7 @@ class UnicodeRawConfigParser(_configparser.RawConfigParser):
fp.write("[%s]\n" % _configparser.DEFAULTSECT)
for (key, value) in self._defaults.items():
fp.write("\t%s = %s" % (key, getUnicode(value, UNICODE_ENCODING)))
fp.write("%s = %s" % (key, getUnicode(value, UNICODE_ENCODING)))
fp.write("\n")
@ -226,9 +226,9 @@ class UnicodeRawConfigParser(_configparser.RawConfigParser):
for (key, value) in self._sections[section].items():
if key != "__name__":
if value is None:
fp.write("\t%s\n" % (key))
fp.write("%s\n" % (key))
elif not isListLike(value):
fp.write("\t%s = %s\n" % (key, getUnicode(value, UNICODE_ENCODING)))
fp.write("%s = %s\n" % (key, getUnicode(value, UNICODE_ENCODING)))
fp.write("\n")

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.5.1.21"
VERSION = "1.5.1.22"
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)
@ -813,6 +813,9 @@ RESTAPI_DEFAULT_ADDRESS = "127.0.0.1"
# Default REST-JSON API server listen port
RESTAPI_DEFAULT_PORT = 8775
# Unsupported options by REST-JSON API server
RESTAPI_UNSUPPORTED_OPTIONS = {"sqlShell", "wizard"}
# Use "Supplementary Private Use Area-A"
INVALID_UNICODE_PRIVATE_AREA = False