From 9522cc61cb76e3b89e0272b4c74a0b22d9cf0918 Mon Sep 17 00:00:00 2001 From: Ajin Abraham Date: Sun, 24 Nov 2024 22:49:21 -0800 Subject: [PATCH] Fallback on get app name when androguard returns empty string --- mobsf/StaticAnalyzer/views/android/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobsf/StaticAnalyzer/views/android/app.py b/mobsf/StaticAnalyzer/views/android/app.py index 5a7e94bea..11e8a32e6 100644 --- a/mobsf/StaticAnalyzer/views/android/app.py +++ b/mobsf/StaticAnalyzer/views/android/app.py @@ -35,7 +35,9 @@ def get_app_name(a, app_dir, is_apk): if a: # Parsed Androguard APK Object try: - return a.get_app_name() + app_name = a.get_app_name() + if app_name: + return app_name except Exception: logger.warning('Failed to get app name from parsed APK object') # Look for app_name in values folder.