mirror of https://github.com/CIRCL/PyCIRCLean
Turn off copying for certain mimes in filecheck
parent
18857da7ca
commit
484c71fc86
|
@ -205,18 +205,22 @@ class File(FileBase):
|
|||
self.add_file_string('Symlink to {}'.format(symlink_path))
|
||||
else:
|
||||
self.add_file_string('Inode file')
|
||||
self.should_copy = False
|
||||
|
||||
def unknown(self):
|
||||
"""Main type should never be unknown."""
|
||||
self.add_file_string('Unknown file')
|
||||
self.should_copy = False
|
||||
|
||||
def example(self):
|
||||
"""Used in examples, should never be returned by libmagic."""
|
||||
self.add_file_string('Example file')
|
||||
self.should_copy = False
|
||||
|
||||
def multipart(self):
|
||||
"""Used in web apps, should never be returned by libmagic"""
|
||||
self.add_file_string('Multipart file')
|
||||
self.should_copy = False
|
||||
|
||||
# ##### Treated as malicious, no reason to have it on a USB key ######
|
||||
def message(self):
|
||||
|
|
|
@ -321,6 +321,7 @@ class KittenGroomerBase(object):
|
|||
dst_path, filename = os.path.split(dst)
|
||||
self.safe_mkdir(dst_path)
|
||||
shutil.copy(src, dst)
|
||||
self.set_property('copied', True)
|
||||
except Exception as e:
|
||||
self.add_error(e, '')
|
||||
|
||||
|
|
Loading…
Reference in New Issue