mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-10 10:07:17 +00:00
Minor adjustments
This commit is contained in:
parent
da1982c4af
commit
8ed5e88be6
3 changed files with 5 additions and 6 deletions
|
|
@ -2379,14 +2379,13 @@ def getUnicode(value, encoding=None, noneToNull=False):
|
|||
return value
|
||||
elif isinstance(value, basestring):
|
||||
# Heuristics (if encoding not explicitly specified)
|
||||
candidates = filter(None, (encoding, kb.get("pageEncoding") if kb.get("originalPage") else None, conf.get("encoding"), UNICODE_ENCODING, sys.getfilesystemencoding()))
|
||||
if all(_ in value for _ in ('<', '>')):
|
||||
candidates = filter(None, (encoding, kb.get("pageEncoding") if kb.get("originalPage") else None, conf.get("encoding"), sys.getfilesystemencoding(), UNICODE_ENCODING))
|
||||
pass
|
||||
elif any(_ in value for _ in (":\\", '/', '.')) and '\n' not in value:
|
||||
candidates = filter(None, (encoding, sys.getfilesystemencoding(), kb.get("pageEncoding") if kb.get("originalPage") else None, UNICODE_ENCODING, conf.get("encoding")))
|
||||
elif conf.get("encoding") and '\n' not in value:
|
||||
candidates = filter(None, (encoding, conf.get("encoding"), kb.get("pageEncoding") if kb.get("originalPage") else None, sys.getfilesystemencoding(), UNICODE_ENCODING))
|
||||
else:
|
||||
candidates = filter(None, (encoding, kb.get("pageEncoding") if kb.get("originalPage") else None, UNICODE_ENCODING, conf.get("encoding"), sys.getfilesystemencoding()))
|
||||
|
||||
for candidate in candidates:
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.3.27"
|
||||
VERSION = "1.3.3.28"
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue