Skip to content

Commit

Permalink
handle bin names in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed Nov 29, 2024
1 parent f8fa4a0 commit d093a5d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mobsf/MobSF/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import sys
from shutil import which
from pathlib import Path
from platform import system
from concurrent.futures import ThreadPoolExecutor

from mobsf.MobSF.utils import (
Expand Down Expand Up @@ -72,13 +73,21 @@ def get_executable_hashes():
downloaded_tools,
manage_py,
]
aapts = [find_aapt('aapt'), find_aapt('aapt2')]
aapt = 'aapt'
aapt2 = 'aapt2'
if system() == 'Windows':
aapt = 'aapt.exe'
aapt2 = 'aapt2.exe'
aapts = [find_aapt(aapt), find_aapt(aapt2)]
exec_loc.extend(Path(a) for a in aapts if a)
# External binaries used directly by MobSF
system_bins = [
'aapt',
'aapt.exe',
'aapt2',
'aapt2.exe',
'adb',
'adb.exe',
'which',
'wkhtmltopdf',
'httptools',
Expand Down

0 comments on commit d093a5d

Please sign in to comment.