mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Fixes #3637
This commit is contained in:
@@ -18,6 +18,7 @@ from lib.core.common import checkFile
|
||||
from lib.core.common import dataToDumpFile
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.common import getText
|
||||
from lib.core.common import isListLike
|
||||
from lib.core.common import isMultiThreadMode
|
||||
from lib.core.common import normalizeUnicode
|
||||
@@ -613,8 +614,8 @@ class Dump(object):
|
||||
|
||||
if len(value) > MIN_BINARY_DISK_DUMP_SIZE and r'\x' in value:
|
||||
try:
|
||||
mimetype = magic.from_buffer(value, mime=True)
|
||||
if any(mimetype.startswith(_) for _ in (b"application", b"image")):
|
||||
mimetype = getText(magic.from_buffer(value, mime=True))
|
||||
if any(mimetype.startswith(_) for _ in ("application", "image")):
|
||||
if not os.path.isdir(dumpDbPath):
|
||||
os.makedirs(dumpDbPath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user