114
114
unautoit_binary = os .path .join (CUCKOO_ROOT , integration_conf .UnAutoIt_extract .binary )
115
115
if integration_conf .Inno_extract .binary :
116
116
innoextact_binary = os .path .join (CUCKOO_ROOT , integration_conf .Inno_extract .binary )
117
- sevenzip_binary = "/usr/bin/7z"
117
+ sevenzip_binary = os . path . join ( CUCKOO_ROOT , "data/7zz" )
118
118
if integration_conf .SevenZip_unpack .binary :
119
119
tmp_sevenzip_binary = os .path .join (CUCKOO_ROOT , integration_conf .SevenZip_unpack .binary )
120
120
if path_exists (tmp_sevenzip_binary ):
121
121
sevenzip_binary = tmp_sevenzip_binary
122
+ # fallback
123
+ if not path_exists (sevenzip_binary ):
124
+ sevenzip_binary = "/usr/bin/7z"
122
125
123
126
if processing_conf .trid .enabled :
124
127
trid_binary = os .path .join (CUCKOO_ROOT , processing_conf .trid .identifier )
@@ -688,7 +691,7 @@ def msi_extract(file: str, *, filetype: str, **kwargs) -> ExtractorReturnType:
688
691
return
689
692
690
693
extracted_files = []
691
- # sudo apt install msitools or 7z
694
+ # sudo apt install msitools
692
695
with extractor_ctx (file , "MsiExtract" , prefix = "msidump_" , folder = tools_folder ) as ctx :
693
696
tempdir = ctx ["tempdir" ]
694
697
output = False
@@ -707,7 +710,7 @@ def msi_extract(file: str, *, filetype: str, **kwargs) -> ExtractorReturnType:
707
710
]
708
711
else :
709
712
output = run_tool (
710
- ["7z" , "e" , f"-o{ tempdir } " , "-y" , file ],
713
+ [sevenzip_binary , "e" , f"-o{ tempdir } " , "-y" , file ],
711
714
universal_newlines = True ,
712
715
stderr = subprocess .PIPE ,
713
716
)
0 commit comments