Add support for detecting mbox files

This commit is contained in:
Sean Whalen
2019-09-22 12:41:07 -04:00
parent 1f196486d9
commit bf6bea1456
+14
View File
@@ -422,6 +422,20 @@ def get_filename_safe_string(string):
return string
def is_mbox(content):
"""
Checks if the given content is a MBOX mailbox file
Args:
content: Content to check
Returns:
bool: A flag the indicates if a file is a MBOX mailbox file
"""
return type(content) == bytes and content.startswith(
b"\xD0\x0D\xBB\xAD")
def is_outlook_msg(content):
"""
Checks if the given content is a Outlook msg OLE file