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

Skip to content

Commit 41834e7

Browse files
committed
working on #8 - still not usable though
1 parent 2a2d7e8 commit 41834e7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

lib/core/dump.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
from lib.core.settings import UNICODE_ENCODING
3838
from thirdparty.magic import magic
3939

40+
from extra.safe2bin.safe2bin import safechardecode
41+
4042
class Dump(object):
4143
"""
4244
This class defines methods used to parse and output the results
@@ -479,13 +481,11 @@ def dbTableValues(self, tableValues):
479481
self._write("| %s%s" % (value, blank), newline=False, console=console)
480482

481483
#if len(value) > 10 and r'\x' in value:
482-
#mimetype = magic.from_buffer(value, mime=True)
483-
#if mimetype.startswith("application") or mimetype.startswith("image"):
484-
#with open("%s%s%s" % (dumpDbPath, os.sep, "%s-%d.bin" % (column, randomInt(8))), "wb") as f:
485-
#from extra.safe2bin.safe2bin import safechardecode
486-
#_ = _.encode(UNICODE_ENCODING)
487-
#_ = safechardecode(value)
488-
#f.write(_)
484+
# mimetype = magic.from_buffer(value, mime=True)
485+
# if mimetype.startswith("application") or mimetype.startswith("image"):
486+
# with codecs.open("%s%s%s" % (dumpDbPath, os.sep, "%s-%d.bin" % (column, randomInt(8))), "wb", UNICODE_ENCODING) as f:
487+
# _ = safechardecode(value)
488+
# f.write(_)
489489

490490
if conf.dumpFormat == DUMP_FORMAT.CSV:
491491
if field == fields:

0 commit comments

Comments
 (0)