Extract Plugin¶
-
class
chepy_forensics.
Chepy_Forensics
(*data)¶ -
embedded_files
(extract_path: str = None)¶ Search for embedded files and extract them
This method does not change the state.
Parameters: extract_path (str, optional) – Path to extract files to. Defaults to None. Returns: The Chepy object. Return type: ChepyPlugin Examples
>>> Chepy("/tmp/stego_50.jpg").load_file().embedded_files(extract_path="/tmp/embedded") [+] Start search on 10757 bytes (10.5 KB) [+] End of search -- offset=10757 (10.5 KB) [+] File at 0 size=10541 (10.3 KB): JPEG picture: 430x425 pixels => /tmp/embedded/file-0001.jpg [+] File at 10541 size=201 (201 bytes): ZIP archive => /tmp/embedded/file-0002.zip
-
file_magic
()¶ Get the file magic
This method does require python-magic or python-magic-bin to be installed.
Returns: The Chepy object. Return type: ChepyPlugin
-
get_metadata
()¶ Get metadata from a file
Parameters: set_state (bool, optional) – Save the output to state. Defaults to False. Returns: The Chepy object. Return type: ChepyPlugin Examples
>>> Chepy("logo.png").load_file().get_metadata().o {'Bits/pixel': '32', 'Compression': 'deflate', 'Compression rate': '138.6x', 'Creation date': '2019-11-30 21:40:30', 'Endianness': 'Big endian', 'Image DPI height': '3780 DPI', 'Image DPI width': '3780 DPI', 'Image height': '1080 pixels', 'Image width': '1920 pixels', 'MIME type': 'image/png', 'Pixel format': 'RGBA'}
-