Skip to content

Commit

Permalink
Merge branch 'master' into intent-priority-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham authored Dec 18, 2024
2 parents 5329b79 + fbf5674 commit 04720ba
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 36 deletions.
13 changes: 13 additions & 0 deletions mobsf/MobSF/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@ def upstream_proxy(flaw_type):
return proxies, verify


def get_system_resources():
"""Get CPU and Memory Available."""
# Get number of physical cores
physical_cores = psutil.cpu_count(logical=False)
# Get number of logical processors (threads)
logical_processors = psutil.cpu_count(logical=True)
# Get total RAM
total_ram = psutil.virtual_memory().total / (1024 ** 3) # Convert bytes to GB
return physical_cores, logical_processors, total_ram


def print_version():
"""Print MobSF Version."""
logger.info(settings.BANNER)
Expand All @@ -122,6 +133,8 @@ def print_version():
dst_str = f' ({dist}) '
env_str = f'OS Environment: {os}{dst_str}{pltfm}'
logger.info(env_str)
cores, threads, ram = get_system_resources()
logger.info('CPU Cores: %s, Threads: %s, RAM: %.2f GB', cores, threads, ram)
find_java_binary()
check_basic_env()
thread = threading.Thread(target=check_update, name='check_update')
Expand Down
2 changes: 0 additions & 2 deletions mobsf/StaticAnalyzer/views/android/xapk.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ def handle_aab(app_dic):
if not apks.exists() and aab_path.exists():
# Convert AAB to APKS
subprocess.run(args, timeout=300)
# Remove AAB
aab_path.unlink()
# Extract APK from APKS
for apk_file in unzip(checksum, apks.as_posix(), app_dic['app_dir']):
full_path = app_dic['app_dir'] / apk_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,7 @@ <h5 class="description-header">{{ code_analysis.summary.suppressed }}</h5>
</div>
</section>
<!-- ===========================end virus total ================================== -->
{% endif %}
<a id="malware_permissions" class="anchor"></a>
<section class="content">
<div class="container-fluid">
Expand Down Expand Up @@ -1885,7 +1886,6 @@ <h5 class="description-header">{{ code_analysis.summary.suppressed }}</h5>
</div>
</section>
<!-- ===========================end malware permissions ================================== -->
{% endif %}
<style>
#chartdiv {
width: 100%;
Expand Down
66 changes: 33 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 04720ba

Please sign in to comment.