1616try :
1717 from cryptography .hazmat .primitives .ciphers import Cipher , algorithms , modes
1818except ImportError :
19- sys .stderr .write ("cryptography is missing, run 'pip install --user cryptography' to install it!" )
19+ sys .stderr .write ("cryptography is missing, run 'pip install --user cryptography' to install it!\n " )
2020 sys .exit (1 )
2121try :
2222 import pytsk3
2323except ImportError :
24- sys .stderr .write ("pytsk3 is missing, run 'pip install --user pytsk3' to install it!" )
24+ sys .stderr .write ("pytsk3 is missing, run 'pip install --user pytsk3' to install it!\n " )
2525 sys .exit (1 )
2626
2727HEX_CORE_STORAGE_TYPE_GUID = '53746F72-6167-11AA-AA11-00306543ECAC'
@@ -50,7 +50,7 @@ def guid_to_hex(guid):
5050def try_read_fp (fp , bytes_to_read ):
5151 out = fp .read (bytes_to_read )
5252 if len (out ) != bytes_to_read :
53- sys .stderr .write ("Error reading out of bounds of file, exiting." )
53+ sys .stderr .write ("Error reading out of bounds of file, exiting.\n " )
5454 sys .exit (1 )
5555
5656 return out
@@ -72,7 +72,7 @@ def parse_partition_table(fp):
7272 sector_size = 0x1000
7373
7474 if not sector_size :
75- sys .stderr .write (f"[!] Invalid sector size { sector_size } (not 512 or 4096 bytes). Exiting." )
75+ sys .stderr .write (f"[!] Invalid sector size { sector_size } (not 512 or 4096 bytes). Exiting.\n " )
7676 sys .exit (1 )
7777
7878 fp .seek (2 * sector_size ) # go to sector 2
@@ -335,7 +335,7 @@ def main():
335335
336336 core_storage_volumes = get_all_partitions_of_type (partition_dict , HEX_CORE_STORAGE_TYPE_GUID )
337337 if core_storage_volumes == []:
338- sys .stderr .write ("[!] No CoreStorage volumes found, exiting. " )
338+ sys .stderr .write ("[!] No CoreStorage volumes found, exiting\n " )
339339 sys .exit (1 )
340340 boot_volumes = get_all_partitions_of_type (partition_dict , HEX_APPLE_BOOT_STORAGE_TYPE_GUID )
341341
0 commit comments