From fda900afc886051a87aa06516e04ad2a026e7b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Tue, 17 May 2016 11:50:34 +0200 Subject: [PATCH] Cleanup unused mimetypes --- bin/filecheck.py | 18 ++++++------------ bin/generic.py | 18 ++++++------------ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/bin/filecheck.py b/bin/filecheck.py index b36f285..41f1534 100644 --- a/bin/filecheck.py +++ b/bin/filecheck.py @@ -245,13 +245,15 @@ class KittenGroomerFileCheck(KittenGroomerBase): ''' This main type is unknown, that should not happen ''' self.cur_file.log_string += 'Unknown file' - # ##### Threated as malicious, no reason to have it on a USB key ###### def example(self): - '''Way to process example file''' + '''Used in examples, should never be returned by libmagic''' self.cur_file.log_string += 'Example file' - self.cur_file.make_dangerous() - self._safe_copy() + def multipart(self): + '''Used in web apps, should never be returned by libmagic''' + self.cur_file.log_string += 'Multipart file' + + # ##### Threated as malicious, no reason to have it on a USB key ###### def message(self): '''Way to process message file''' self.cur_file.log_string += 'Message file' @@ -264,14 +266,6 @@ class KittenGroomerFileCheck(KittenGroomerBase): self.cur_file.make_dangerous() self._safe_copy() - def multipart(self): - '''Way to process multipart file''' - self.cur_file.log_string += 'Multipart file' - self.cur_file.make_dangerous() - self._safe_copy() - - ####################### - # ##### Converted ###### def text(self): for r in mimes_rtf: diff --git a/bin/generic.py b/bin/generic.py index af860df..d368755 100644 --- a/bin/generic.py +++ b/bin/generic.py @@ -187,13 +187,15 @@ class KittenGroomer(KittenGroomerBase): ''' This main type is unknown, that should not happen ''' self.cur_file.log_string += 'Unknown file' - # ##### Threated as malicious, no reason to have it on a USB key ###### def example(self): - '''Way to process example file''' + '''Used in examples, should never be returned by libmagic''' self.cur_file.log_string += 'Example file' - self.cur_file.make_dangerous() - self._safe_copy() + def multipart(self): + '''Used in web apps, should never be returned by libmagic''' + self.cur_file.log_string += 'Multipart file' + + # ##### Threated as malicious, no reason to have it on a USB key ###### def message(self): '''Way to process message file''' self.cur_file.log_string += 'Message file' @@ -206,14 +208,6 @@ class KittenGroomer(KittenGroomerBase): self.cur_file.make_dangerous() self._safe_copy() - def multipart(self): - '''Way to process multipart file''' - self.cur_file.log_string += 'Multipart file' - self.cur_file.make_dangerous() - self._safe_copy() - - ####################### - # ##### Converted ###### def text(self): ''' LibreOffice should be able to open all the files '''