Skip to content

Commit

Permalink
style: Automatic code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 2, 2024
1 parent cad5a8c commit 8f45b71
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions analyzer/windows/modules/packages/crx.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

from lib.common.abstracts import Package
from lib.common.exceptions import CuckooPackageError
from lib.common.zip_utils import (
extract_zip,
get_infos,
upload_extracted_files,
)
from lib.common.zip_utils import extract_zip, get_infos, upload_extracted_files

log = logging.getLogger(__name__)

Expand All @@ -31,7 +27,7 @@ class CRX(Package):
def start(self, path):
extracted_path = os.path.join(os.environ["TEMP"], "sample")
file_names = []
blank_url = "http://about:blank" # prevent loading list of files in injected directory
blank_url = "http://about:blank" # prevent loading list of files in injected directory
try:
zipinfos = get_infos(path)
extract_zip(zip_path=path, extract_path=extracted_path, recursion_depth=0)
Expand All @@ -45,11 +41,11 @@ def start(self, path):
raise CuckooPackageError("Empty CRX archive")

upload_extracted_files(extracted_path, file_names)

chrome = self.get_path("chrome.exe")
args = [
f'--load-extension={extracted_path}',
]
f"--load-extension={extracted_path}",
]
args.append('"{}"'.format(blank_url))
args = " ".join(args)
return self.execute(chrome, args, path)

0 comments on commit 8f45b71

Please sign in to comment.