mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
Fix for an Issue #532
This commit is contained in:
parent
1f2e5a91b5
commit
45c88b36c6
|
@ -525,6 +525,7 @@ class Dump(object):
|
|||
self._write("| %s%s" % (value, blank), newline=False, console=console)
|
||||
|
||||
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 ("application", "image")):
|
||||
if not os.path.isdir(dumpDbPath):
|
||||
|
@ -537,6 +538,8 @@ class Dump(object):
|
|||
with open(filepath, "wb") as f:
|
||||
_ = safechardecode(value, True)
|
||||
f.write(_)
|
||||
except magic.MagicException, err:
|
||||
logger.debug(str(err))
|
||||
|
||||
if conf.dumpFormat == DUMP_FORMAT.CSV:
|
||||
if field == fields:
|
||||
|
|
Loading…
Reference in New Issue
Block a user