7
7
8
8
from lib .common .abstracts import Package
9
9
from lib .common .exceptions import CuckooPackageError
10
- from lib .common .zip_utils import (
11
- extract_zip ,
12
- get_infos ,
13
- upload_extracted_files ,
14
- )
10
+ from lib .common .zip_utils import extract_zip , get_infos , upload_extracted_files
15
11
16
12
log = logging .getLogger (__name__ )
17
13
@@ -31,7 +27,7 @@ class CRX(Package):
31
27
def start (self , path ):
32
28
extracted_path = os .path .join (os .environ ["TEMP" ], "sample" )
33
29
file_names = []
34
- blank_url = "http://about:blank" # prevent loading list of files in injected directory
30
+ blank_url = "http://about:blank" # prevent loading list of files in injected directory
35
31
try :
36
32
zipinfos = get_infos (path )
37
33
extract_zip (zip_path = path , extract_path = extracted_path , recursion_depth = 0 )
@@ -45,11 +41,11 @@ def start(self, path):
45
41
raise CuckooPackageError ("Empty CRX archive" )
46
42
47
43
upload_extracted_files (extracted_path , file_names )
48
-
44
+
49
45
chrome = self .get_path ("chrome.exe" )
50
46
args = [
51
- f' --load-extension={ extracted_path } ' ,
52
- ]
47
+ f" --load-extension={ extracted_path } " ,
48
+ ]
53
49
args .append ('"{}"' .format (blank_url ))
54
50
args = " " .join (args )
55
51
return self .execute (chrome , args , path )
0 commit comments