mvt 2.4.0__tar.gz → 2.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mvt-2.4.0 → mvt-2.4.2}/PKG-INFO +1 -1
- mvt-2.4.2/mvt/android/artifacts/artifact.py +36 -0
- mvt-2.4.2/mvt/android/artifacts/dumpsys_accessibility.py +47 -0
- mvt-2.4.2/mvt/android/artifacts/dumpsys_appops.py +150 -0
- mvt-2.4.2/mvt/android/artifacts/dumpsys_battery_daily.py +78 -0
- mvt-2.4.2/mvt/android/artifacts/dumpsys_battery_history.py +78 -0
- mvt-2.4.2/mvt/android/artifacts/dumpsys_dbinfo.py +83 -0
- mvt-2.4.2/mvt/android/artifacts/dumpsys_package_activities.py +84 -0
- mvt-2.4.0/mvt/android/modules/bugreport/receivers.py → mvt-2.4.2/mvt/android/artifacts/dumpsys_receivers.py +57 -51
- mvt-2.4.2/mvt/android/artifacts/getprop.py +60 -0
- {mvt-2.4.0/mvt/android/modules/androidqf → mvt-2.4.2/mvt/android/artifacts}/processes.py +27 -56
- {mvt-2.4.0/mvt/android/modules/adb → mvt-2.4.2/mvt/android/artifacts}/settings.py +5 -52
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/cli.py +62 -6
- mvt-2.4.2/mvt/android/cmd_check_androidqf.py +67 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/cmd_check_backup.py +7 -3
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/base.py +13 -2
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/dumpsys_accessibility.py +3 -14
- mvt-2.4.2/mvt/android/modules/adb/dumpsys_activities.py +45 -0
- mvt-2.4.2/mvt/android/modules/adb/dumpsys_appops.py +46 -0
- mvt-2.4.2/mvt/android/modules/adb/dumpsys_battery_daily.py +44 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/dumpsys_battery_history.py +3 -14
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/dumpsys_dbinfo.py +3 -16
- mvt-2.4.0/mvt/android/modules/adb/dumpsys_activities.py → mvt-2.4.2/mvt/android/modules/adb/dumpsys_receivers.py +6 -18
- mvt-2.4.2/mvt/android/modules/adb/getprop.py +43 -0
- mvt-2.4.2/mvt/android/modules/adb/processes.py +42 -0
- mvt-2.4.2/mvt/android/modules/adb/settings.py +58 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/androidqf/__init__.py +6 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/androidqf/base.py +23 -7
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/androidqf/dumpsys_accessibility.py +5 -31
- mvt-2.4.2/mvt/android/modules/androidqf/dumpsys_activities.py +50 -0
- mvt-2.4.2/mvt/android/modules/androidqf/dumpsys_appops.py +46 -0
- mvt-2.4.2/mvt/android/modules/androidqf/dumpsys_battery_daily.py +46 -0
- mvt-2.4.2/mvt/android/modules/androidqf/dumpsys_battery_history.py +46 -0
- mvt-2.4.2/mvt/android/modules/androidqf/dumpsys_dbinfo.py +46 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/androidqf/dumpsys_packages.py +2 -3
- mvt-2.4.2/mvt/android/modules/androidqf/dumpsys_receivers.py +49 -0
- mvt-2.4.2/mvt/android/modules/androidqf/getprop.py +45 -0
- mvt-2.4.2/mvt/android/modules/androidqf/processes.py +41 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/androidqf/settings.py +14 -25
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/androidqf/sms.py +9 -6
- mvt-2.4.2/mvt/android/modules/backup/helpers.py +60 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/accessibility.py +9 -32
- mvt-2.4.2/mvt/android/modules/bugreport/activities.py +56 -0
- mvt-2.4.2/mvt/android/modules/bugreport/appops.py +51 -0
- mvt-2.4.2/mvt/android/modules/bugreport/battery_daily.py +49 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/battery_history.py +6 -30
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/dbinfo.py +8 -35
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/getprop.py +4 -18
- mvt-2.4.2/mvt/android/modules/bugreport/receivers.py +51 -0
- mvt-2.4.2/mvt/android/parsers/dumpsys.py +131 -0
- mvt-2.4.2/mvt/android/utils.py +19 -0
- mvt-2.4.2/mvt/common/artifact.py +28 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/help.py +2 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/indicators.py +1 -1
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/version.py +1 -1
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/data/ios_models.json +17 -1
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/data/ios_versions.json +8 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/__init__.py +2 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/applications.py +2 -1
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/calls.py +1 -1
- mvt-2.4.2/mvt/ios/modules/mixed/global_preferences.py +63 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt.egg-info/PKG-INFO +1 -1
- {mvt-2.4.0 → mvt-2.4.2}/mvt.egg-info/SOURCES.txt +36 -7
- mvt-2.4.2/tests/android/test_artifact.py +20 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_accessibility.py +42 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_appops.py +47 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_battery_daily.py +37 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_battery_history.py +44 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_dbinfo.py +42 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_package_activities.py +44 -0
- mvt-2.4.2/tests/android/test_artifact_dumpsys_receivers.py +47 -0
- mvt-2.4.2/tests/android/test_artifact_getprop.py +41 -0
- mvt-2.4.2/tests/android/test_artifact_processes.py +38 -0
- mvt-2.4.2/tests/android_androidqf/test_dumpsys_battery_daily.py +24 -0
- mvt-2.4.2/tests/android_androidqf/test_dumpsys_battery_history.py +24 -0
- mvt-2.4.2/tests/android_androidqf/test_dumpsys_dbinfo.py +24 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_dumpsysaccessbility.py +6 -1
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_dumpsysappops.py +6 -1
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_dumpsyspackages.py +8 -1
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_dumpsysreceivers.py +6 -1
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_getprop.py +25 -8
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_processes.py +7 -5
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_androidqf/test_settings.py +6 -1
- mvt-2.4.2/tests/android_androidqf/test_sms.py +91 -0
- mvt-2.4.2/tests/android_bugreport/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/common/test_utils.py +1 -1
- mvt-2.4.2/tests/ios_backup/__init__.py +4 -0
- mvt-2.4.2/tests/ios_backup/test_global_preferences.py +20 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_tcc.py +1 -1
- mvt-2.4.2/tests/ios_fs/__init__.py +4 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_fs/test_filesystem.py +16 -8
- mvt-2.4.2/tests/test_check_android_androidqf.py +65 -0
- mvt-2.4.2/tests/test_check_android_backup.py +72 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/utils.py +25 -0
- mvt-2.4.0/mvt/android/cmd_check_androidqf.py +0 -39
- mvt-2.4.0/mvt/android/modules/adb/dumpsys_appops.py +0 -85
- mvt-2.4.0/mvt/android/modules/adb/dumpsys_battery_daily.py +0 -64
- mvt-2.4.0/mvt/android/modules/adb/dumpsys_receivers.py +0 -88
- mvt-2.4.0/mvt/android/modules/adb/getprop.py +0 -67
- mvt-2.4.0/mvt/android/modules/adb/processes.py +0 -90
- mvt-2.4.0/mvt/android/modules/androidqf/dumpsys_activities.py +0 -73
- mvt-2.4.0/mvt/android/modules/androidqf/dumpsys_appops.py +0 -94
- mvt-2.4.0/mvt/android/modules/androidqf/dumpsys_receivers.py +0 -107
- mvt-2.4.0/mvt/android/modules/androidqf/getprop.py +0 -84
- mvt-2.4.0/mvt/android/modules/bugreport/activities.py +0 -77
- mvt-2.4.0/mvt/android/modules/bugreport/appops.py +0 -104
- mvt-2.4.0/mvt/android/modules/bugreport/battery_daily.py +0 -90
- mvt-2.4.0/mvt/android/parsers/__init__.py +0 -15
- mvt-2.4.0/mvt/android/parsers/dumpsys.py +0 -544
- mvt-2.4.0/mvt/android/parsers/getprop.py +0 -26
- mvt-2.4.0/tests/android/test_dumpsys_parser.py +0 -62
- mvt-2.4.0/tests/android_androidqf/test_sms.py +0 -23
- mvt-2.4.0/tests/test_check_android_androidqf.py +0 -20
- {mvt-2.4.0 → mvt-2.4.2}/LICENSE +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/README.md +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/__init__.py +0 -0
- {mvt-2.4.0/mvt/android/modules → mvt-2.4.2/mvt/android/artifacts}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/cmd_check_adb.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/cmd_check_bugreport.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/cmd_download_apks.py +0 -0
- {mvt-2.4.0/mvt/common → mvt-2.4.2/mvt/android/modules}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/chrome_history.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/dumpsys_full.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/files.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/logcat.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/packages.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/root_binaries.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/selinux_status.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/sms.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/adb/whatsapp.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/backup/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/backup/base.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/backup/sms.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/base.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/modules/bugreport/packages.py +0 -0
- {mvt-2.4.0/mvt/ios/modules → mvt-2.4.2/mvt/android/parsers}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/android/parsers/backup.py +0 -0
- {mvt-2.4.0/tests → mvt-2.4.2/mvt/common}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/cmd_check_iocs.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/command.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/logo.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/module.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/options.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/updates.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/url.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/utils.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/common/virustotal.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/cli.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/cmd_check_backup.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/cmd_check_fs.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/decrypt.py +0 -0
- {mvt-2.4.0/tests/android → mvt-2.4.2/mvt/ios/modules}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/backup/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/backup/backup_info.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/backup/configuration_profiles.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/backup/manifest.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/backup/profile_events.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/base.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/analytics.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/analytics_ios_versions.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/cache_files.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/filesystem.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/net_netusage.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/safari_favicon.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/shutdownlog.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/version_history.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/webkit_base.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/webkit_indexeddb.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/webkit_localstorage.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/fs/webkit_safariviewservice.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/calendar.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/chrome_favicon.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/chrome_history.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/contacts.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/firefox_favicon.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/firefox_history.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/idstatuscache.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/interactionc.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/locationd.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/net_datausage.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/osanalytics_addaily.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/safari_browserstate.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/safari_history.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/shortcuts.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/sms.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/sms_attachments.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/tcc.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/webkit_resource_load_statistics.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/webkit_session_resource_log.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/mixed/whatsapp.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/modules/net_base.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt/ios/versions.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt.egg-info/dependency_links.txt +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt.egg-info/entry_points.txt +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt.egg-info/requires.txt +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/mvt.egg-info/top_level.txt +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/setup.cfg +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/setup.py +0 -0
- {mvt-2.4.0/tests/android_androidqf → mvt-2.4.2/tests}/__init__.py +0 -0
- {mvt-2.4.0/tests/common → mvt-2.4.2/tests/android}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/android/test_backup_module.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/android/test_backup_parser.py +0 -0
- {mvt-2.4.0/tests/android_bugreport → mvt-2.4.2/tests/android_adb}/__init__.py +0 -0
- {mvt-2.4.0/tests/ios_backup → mvt-2.4.2/tests/android_androidqf}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/android_bugreport/test_bugreport.py +0 -0
- {mvt-2.4.0/tests/ios_fs → mvt-2.4.2/tests/common}/__init__.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/common/test_indicators.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/conftest.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_backup_info.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_calendar.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_datausage.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_manifest.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_safari_browserstate.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_sms.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/ios_backup/test_webkit_resource_load_statistics.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/test_check_android_bugreport.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/test_check_ios_backup.py +0 -0
- {mvt-2.4.0 → mvt-2.4.2}/tests/test_ios_versions.py +0 -0
{mvt-2.4.0 → mvt-2.4.2}/PKG-INFO
RENAMED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
from mvt.common.artifact import Artifact
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AndroidArtifact(Artifact):
|
|
10
|
+
@staticmethod
|
|
11
|
+
def extract_dumpsys_section(dumpsys: str, separator: str) -> str:
|
|
12
|
+
"""
|
|
13
|
+
Extract a section from a full dumpsys file.
|
|
14
|
+
|
|
15
|
+
:param dumpsys: content of the full dumpsys file (string)
|
|
16
|
+
:param separator: content of the first line separator (string)
|
|
17
|
+
:return: section extracted (string)
|
|
18
|
+
"""
|
|
19
|
+
lines = []
|
|
20
|
+
in_section = False
|
|
21
|
+
for line in dumpsys.splitlines():
|
|
22
|
+
if line.strip() == separator:
|
|
23
|
+
in_section = True
|
|
24
|
+
continue
|
|
25
|
+
|
|
26
|
+
if not in_section:
|
|
27
|
+
continue
|
|
28
|
+
|
|
29
|
+
if line.strip().startswith(
|
|
30
|
+
"------------------------------------------------------------------------------"
|
|
31
|
+
):
|
|
32
|
+
break
|
|
33
|
+
|
|
34
|
+
lines.append(line)
|
|
35
|
+
|
|
36
|
+
return "\n".join(lines)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
from .artifact import AndroidArtifact
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DumpsysAccessibilityArtifact(AndroidArtifact):
|
|
10
|
+
def check_indicators(self) -> None:
|
|
11
|
+
if not self.indicators:
|
|
12
|
+
return
|
|
13
|
+
|
|
14
|
+
for result in self.results:
|
|
15
|
+
ioc = self.indicators.check_app_id(result["package_name"])
|
|
16
|
+
if ioc:
|
|
17
|
+
result["matched_indicator"] = ioc
|
|
18
|
+
self.detected.append(result)
|
|
19
|
+
continue
|
|
20
|
+
|
|
21
|
+
def parse(self, content: str) -> None:
|
|
22
|
+
"""
|
|
23
|
+
Parse the Dumpsys Accessibility section/
|
|
24
|
+
Adds results to self.results (List[Dict[str, str]])
|
|
25
|
+
|
|
26
|
+
:param content: content of the accessibility section (string)
|
|
27
|
+
"""
|
|
28
|
+
in_services = False
|
|
29
|
+
for line in content.splitlines():
|
|
30
|
+
if line.strip().startswith("installed services:"):
|
|
31
|
+
in_services = True
|
|
32
|
+
continue
|
|
33
|
+
|
|
34
|
+
if not in_services:
|
|
35
|
+
continue
|
|
36
|
+
|
|
37
|
+
if line.strip() == "}":
|
|
38
|
+
break
|
|
39
|
+
|
|
40
|
+
service = line.split(":")[1].strip()
|
|
41
|
+
|
|
42
|
+
self.results.append(
|
|
43
|
+
{
|
|
44
|
+
"package_name": service.split("/")[0],
|
|
45
|
+
"service": service,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing import Any, Dict, List, Union
|
|
8
|
+
|
|
9
|
+
from mvt.common.utils import convert_datetime_to_iso
|
|
10
|
+
|
|
11
|
+
from .artifact import AndroidArtifact
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class DumpsysAppopsArtifact(AndroidArtifact):
|
|
15
|
+
"""
|
|
16
|
+
Parser for dumpsys app ops info
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
def serialize(self, record: dict) -> Union[dict, list]:
|
|
20
|
+
records = []
|
|
21
|
+
for perm in record["permissions"]:
|
|
22
|
+
if "entries" not in perm:
|
|
23
|
+
continue
|
|
24
|
+
|
|
25
|
+
for entry in perm["entries"]:
|
|
26
|
+
if "timestamp" in entry:
|
|
27
|
+
records.append(
|
|
28
|
+
{
|
|
29
|
+
"timestamp": entry["timestamp"],
|
|
30
|
+
"module": self.__class__.__name__,
|
|
31
|
+
"event": entry["access"],
|
|
32
|
+
"data": f"{record['package_name']} access to "
|
|
33
|
+
f"{perm['name']}: {entry['access']}",
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return records
|
|
38
|
+
|
|
39
|
+
def check_indicators(self) -> None:
|
|
40
|
+
for result in self.results:
|
|
41
|
+
if self.indicators:
|
|
42
|
+
ioc = self.indicators.check_app_id(result.get("package_name"))
|
|
43
|
+
if ioc:
|
|
44
|
+
result["matched_indicator"] = ioc
|
|
45
|
+
self.detected.append(result)
|
|
46
|
+
continue
|
|
47
|
+
|
|
48
|
+
for perm in result["permissions"]:
|
|
49
|
+
if (
|
|
50
|
+
perm["name"] == "REQUEST_INSTALL_PACKAGES"
|
|
51
|
+
and perm["access"] == "allow"
|
|
52
|
+
):
|
|
53
|
+
self.log.info(
|
|
54
|
+
"Package %s with REQUEST_INSTALL_PACKAGES " "permission",
|
|
55
|
+
result["package_name"],
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
def parse(self, output: str) -> None:
|
|
59
|
+
self.results: List[Dict[str, Any]] = []
|
|
60
|
+
perm = {}
|
|
61
|
+
package = {}
|
|
62
|
+
entry = {}
|
|
63
|
+
uid = None
|
|
64
|
+
in_packages = False
|
|
65
|
+
|
|
66
|
+
for line in output.splitlines():
|
|
67
|
+
if line.startswith(" Uid 0:"):
|
|
68
|
+
in_packages = True
|
|
69
|
+
|
|
70
|
+
if not in_packages:
|
|
71
|
+
continue
|
|
72
|
+
|
|
73
|
+
if line.startswith(" Uid "):
|
|
74
|
+
uid = line[6:-1]
|
|
75
|
+
if entry:
|
|
76
|
+
perm["entries"].append(entry)
|
|
77
|
+
entry = {}
|
|
78
|
+
if package:
|
|
79
|
+
if perm:
|
|
80
|
+
package["permissions"].append(perm)
|
|
81
|
+
|
|
82
|
+
perm = {}
|
|
83
|
+
self.results.append(package)
|
|
84
|
+
package = {}
|
|
85
|
+
continue
|
|
86
|
+
|
|
87
|
+
if line.startswith(" Package "):
|
|
88
|
+
if entry:
|
|
89
|
+
perm["entries"].append(entry)
|
|
90
|
+
entry = {}
|
|
91
|
+
|
|
92
|
+
if package:
|
|
93
|
+
if perm:
|
|
94
|
+
package["permissions"].append(perm)
|
|
95
|
+
|
|
96
|
+
perm = {}
|
|
97
|
+
self.results.append(package)
|
|
98
|
+
|
|
99
|
+
package = {
|
|
100
|
+
"package_name": line[12:-1],
|
|
101
|
+
"permissions": [],
|
|
102
|
+
"uid": uid,
|
|
103
|
+
}
|
|
104
|
+
continue
|
|
105
|
+
|
|
106
|
+
if package and line.startswith(" ") and line[6] != " ":
|
|
107
|
+
if entry:
|
|
108
|
+
perm["entries"].append(entry)
|
|
109
|
+
entry = {}
|
|
110
|
+
if perm:
|
|
111
|
+
package["permissions"].append(perm)
|
|
112
|
+
perm = {}
|
|
113
|
+
|
|
114
|
+
perm["name"] = line.split()[0]
|
|
115
|
+
perm["entries"] = []
|
|
116
|
+
if len(line.split()) > 1:
|
|
117
|
+
perm["access"] = line.split()[1][1:-2]
|
|
118
|
+
|
|
119
|
+
continue
|
|
120
|
+
|
|
121
|
+
if line.startswith(" "):
|
|
122
|
+
# Permission entry like:
|
|
123
|
+
# Reject: [fg-s]2021-05-19 22:02:52.054 (-314d1h25m2s33ms)
|
|
124
|
+
if entry:
|
|
125
|
+
perm["entries"].append(entry)
|
|
126
|
+
entry = {}
|
|
127
|
+
|
|
128
|
+
entry["access"] = line.split(":")[0].strip()
|
|
129
|
+
entry["type"] = line[line.find("[") + 1 : line.find("]")]
|
|
130
|
+
|
|
131
|
+
try:
|
|
132
|
+
entry["timestamp"] = convert_datetime_to_iso(
|
|
133
|
+
datetime.strptime(
|
|
134
|
+
line[line.find("]") + 1 : line.find("(")].strip(),
|
|
135
|
+
"%Y-%m-%d %H:%M:%S.%f",
|
|
136
|
+
)
|
|
137
|
+
)
|
|
138
|
+
except ValueError:
|
|
139
|
+
# Invalid date format
|
|
140
|
+
pass
|
|
141
|
+
|
|
142
|
+
if line.strip() == "":
|
|
143
|
+
break
|
|
144
|
+
|
|
145
|
+
if entry:
|
|
146
|
+
perm["entries"].append(entry)
|
|
147
|
+
if perm:
|
|
148
|
+
package["permissions"].append(perm)
|
|
149
|
+
if package:
|
|
150
|
+
self.results.append(package)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
from typing import Union
|
|
7
|
+
|
|
8
|
+
from .artifact import AndroidArtifact
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DumpsysBatteryDailyArtifact(AndroidArtifact):
|
|
12
|
+
"""
|
|
13
|
+
Parser for dumpsys dattery daily updates.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def serialize(self, record: dict) -> Union[dict, list]:
|
|
17
|
+
return {
|
|
18
|
+
"timestamp": record["from"],
|
|
19
|
+
"module": self.__class__.__name__,
|
|
20
|
+
"event": "battery_daily",
|
|
21
|
+
"data": f"Recorded update of package {record['package_name']} "
|
|
22
|
+
f"with vers {record['vers']}",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
def check_indicators(self) -> None:
|
|
26
|
+
if not self.indicators:
|
|
27
|
+
return
|
|
28
|
+
|
|
29
|
+
for result in self.results:
|
|
30
|
+
ioc = self.indicators.check_app_id(result["package_name"])
|
|
31
|
+
if ioc:
|
|
32
|
+
result["matched_indicator"] = ioc
|
|
33
|
+
self.detected.append(result)
|
|
34
|
+
continue
|
|
35
|
+
|
|
36
|
+
def parse(self, output: str) -> None:
|
|
37
|
+
daily = None
|
|
38
|
+
daily_updates = []
|
|
39
|
+
for line in output.splitlines():
|
|
40
|
+
if line.startswith(" Daily from "):
|
|
41
|
+
if len(daily_updates) > 0:
|
|
42
|
+
self.results.extend(daily_updates)
|
|
43
|
+
daily_updates = []
|
|
44
|
+
|
|
45
|
+
timeframe = line[13:].strip()
|
|
46
|
+
date_from, date_to = timeframe.strip(":").split(" to ", 1)
|
|
47
|
+
daily = {"from": date_from[0:10], "to": date_to[0:10]}
|
|
48
|
+
continue
|
|
49
|
+
|
|
50
|
+
if not daily:
|
|
51
|
+
continue
|
|
52
|
+
|
|
53
|
+
if not line.strip().startswith("Update "):
|
|
54
|
+
continue
|
|
55
|
+
|
|
56
|
+
line = line.strip().replace("Update ", "")
|
|
57
|
+
package_name, vers = line.split(" ", 1)
|
|
58
|
+
vers_nr = vers.split("=", 1)[1]
|
|
59
|
+
|
|
60
|
+
already_seen = False
|
|
61
|
+
for update in daily_updates:
|
|
62
|
+
if package_name == update["package_name"] and vers_nr == update["vers"]:
|
|
63
|
+
already_seen = True
|
|
64
|
+
break
|
|
65
|
+
|
|
66
|
+
if not already_seen:
|
|
67
|
+
daily_updates.append(
|
|
68
|
+
{
|
|
69
|
+
"action": "update",
|
|
70
|
+
"from": daily["from"],
|
|
71
|
+
"to": daily["to"],
|
|
72
|
+
"package_name": package_name,
|
|
73
|
+
"vers": vers_nr,
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
if len(daily_updates) > 0:
|
|
78
|
+
self.results.extend(daily_updates)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
from .artifact import AndroidArtifact
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DumpsysBatteryHistoryArtifact(AndroidArtifact):
|
|
10
|
+
"""
|
|
11
|
+
Parser for dumpsys dattery history events.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
def check_indicators(self) -> None:
|
|
15
|
+
if not self.indicators:
|
|
16
|
+
return
|
|
17
|
+
|
|
18
|
+
for result in self.results:
|
|
19
|
+
ioc = self.indicators.check_app_id(result["package_name"])
|
|
20
|
+
if ioc:
|
|
21
|
+
result["matched_indicator"] = ioc
|
|
22
|
+
self.detected.append(result)
|
|
23
|
+
continue
|
|
24
|
+
|
|
25
|
+
def parse(self, data: str) -> None:
|
|
26
|
+
for line in data.splitlines():
|
|
27
|
+
if line.startswith("Battery History "):
|
|
28
|
+
continue
|
|
29
|
+
|
|
30
|
+
if line.strip() == "":
|
|
31
|
+
break
|
|
32
|
+
|
|
33
|
+
time_elapsed = line.strip().split(" ", 1)[0]
|
|
34
|
+
|
|
35
|
+
event = ""
|
|
36
|
+
if line.find("+job") > 0:
|
|
37
|
+
event = "start_job"
|
|
38
|
+
uid = line[line.find("+job") + 5 : line.find(":")]
|
|
39
|
+
service = line[line.find(":") + 1 :].strip('"')
|
|
40
|
+
package_name = service.split("/")[0]
|
|
41
|
+
elif line.find("-job") > 0:
|
|
42
|
+
event = "end_job"
|
|
43
|
+
uid = line[line.find("-job") + 5 : line.find(":")]
|
|
44
|
+
service = line[line.find(":") + 1 :].strip('"')
|
|
45
|
+
package_name = service.split("/")[0]
|
|
46
|
+
elif line.find("+running +wake_lock=") > 0:
|
|
47
|
+
uid = line[line.find("+running +wake_lock=") + 21 : line.find(":")]
|
|
48
|
+
event = "wake"
|
|
49
|
+
service = (
|
|
50
|
+
line[line.find("*walarm*:") + 9 :].split(" ")[0].strip('"').strip()
|
|
51
|
+
)
|
|
52
|
+
if service == "" or "/" not in service:
|
|
53
|
+
continue
|
|
54
|
+
|
|
55
|
+
package_name = service.split("/")[0]
|
|
56
|
+
elif (line.find("+top=") > 0) or (line.find("-top") > 0):
|
|
57
|
+
if line.find("+top=") > 0:
|
|
58
|
+
event = "start_top"
|
|
59
|
+
top_pos = line.find("+top=")
|
|
60
|
+
else:
|
|
61
|
+
event = "end_top"
|
|
62
|
+
top_pos = line.find("-top=")
|
|
63
|
+
colon_pos = top_pos + line[top_pos:].find(":")
|
|
64
|
+
uid = line[top_pos + 5 : colon_pos]
|
|
65
|
+
service = ""
|
|
66
|
+
package_name = line[colon_pos + 1 :].strip('"')
|
|
67
|
+
else:
|
|
68
|
+
continue
|
|
69
|
+
|
|
70
|
+
self.results.append(
|
|
71
|
+
{
|
|
72
|
+
"time_elapsed": time_elapsed,
|
|
73
|
+
"event": event,
|
|
74
|
+
"uid": uid,
|
|
75
|
+
"package_name": package_name,
|
|
76
|
+
"service": service,
|
|
77
|
+
}
|
|
78
|
+
)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
import re
|
|
7
|
+
|
|
8
|
+
from .artifact import AndroidArtifact
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DumpsysDBInfoArtifact(AndroidArtifact):
|
|
12
|
+
"""
|
|
13
|
+
Parser for dumpsys DBInfo service
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def check_indicators(self) -> None:
|
|
17
|
+
if not self.indicators:
|
|
18
|
+
return
|
|
19
|
+
|
|
20
|
+
for result in self.results:
|
|
21
|
+
path = result.get("path", "")
|
|
22
|
+
for part in path.split("/"):
|
|
23
|
+
ioc = self.indicators.check_app_id(part)
|
|
24
|
+
if ioc:
|
|
25
|
+
result["matched_indicator"] = ioc
|
|
26
|
+
self.detected.append(result)
|
|
27
|
+
continue
|
|
28
|
+
|
|
29
|
+
def parse(self, output: str) -> None:
|
|
30
|
+
rxp = re.compile(
|
|
31
|
+
r".*\[([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3})\].*\[Pid:\((\d+)\)\](\w+).*sql\=\"(.+?)\""
|
|
32
|
+
) # pylint: disable=line-too-long
|
|
33
|
+
rxp_no_pid = re.compile(
|
|
34
|
+
r".*\[([0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3})\][ ]{1}(\w+).*sql\=\"(.+?)\""
|
|
35
|
+
) # pylint: disable=line-too-long
|
|
36
|
+
|
|
37
|
+
pool = None
|
|
38
|
+
in_operations = False
|
|
39
|
+
for line in output.splitlines():
|
|
40
|
+
if line.startswith("Connection pool for "):
|
|
41
|
+
pool = line.replace("Connection pool for ", "").rstrip(":")
|
|
42
|
+
|
|
43
|
+
if not pool:
|
|
44
|
+
continue
|
|
45
|
+
|
|
46
|
+
if line.strip() == "Most recently executed operations:":
|
|
47
|
+
in_operations = True
|
|
48
|
+
continue
|
|
49
|
+
|
|
50
|
+
if not in_operations:
|
|
51
|
+
continue
|
|
52
|
+
|
|
53
|
+
if not line.startswith(" "):
|
|
54
|
+
in_operations = False
|
|
55
|
+
pool = None
|
|
56
|
+
continue
|
|
57
|
+
|
|
58
|
+
matches = rxp.findall(line)
|
|
59
|
+
if not matches:
|
|
60
|
+
matches = rxp_no_pid.findall(line)
|
|
61
|
+
if not matches:
|
|
62
|
+
continue
|
|
63
|
+
|
|
64
|
+
match = matches[0]
|
|
65
|
+
self.results.append(
|
|
66
|
+
{
|
|
67
|
+
"isodate": match[0],
|
|
68
|
+
"action": match[1],
|
|
69
|
+
"sql": match[2],
|
|
70
|
+
"path": pool,
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
else:
|
|
74
|
+
match = matches[0]
|
|
75
|
+
self.results.append(
|
|
76
|
+
{
|
|
77
|
+
"isodate": match[0],
|
|
78
|
+
"pid": match[1],
|
|
79
|
+
"action": match[2],
|
|
80
|
+
"sql": match[3],
|
|
81
|
+
"path": pool,
|
|
82
|
+
}
|
|
83
|
+
)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Mobile Verification Toolkit (MVT)
|
|
2
|
+
# Copyright (c) 2021-2023 Claudio Guarnieri.
|
|
3
|
+
# Use of this software is governed by the MVT License 1.1 that can be found at
|
|
4
|
+
# https://license.mvt.re/1.1/
|
|
5
|
+
|
|
6
|
+
from .artifact import AndroidArtifact
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DumpsysPackageActivitiesArtifact(AndroidArtifact):
|
|
10
|
+
def check_indicators(self) -> None:
|
|
11
|
+
if not self.indicators:
|
|
12
|
+
return
|
|
13
|
+
|
|
14
|
+
for activity in self.results:
|
|
15
|
+
ioc = self.indicators.check_app_id(activity["package_name"])
|
|
16
|
+
if ioc:
|
|
17
|
+
activity["matched_indicator"] = ioc
|
|
18
|
+
self.detected.append(activity)
|
|
19
|
+
continue
|
|
20
|
+
|
|
21
|
+
def parse(self, content: str):
|
|
22
|
+
"""
|
|
23
|
+
Parse the Dumpsys Package section for activities
|
|
24
|
+
Adds results to self.results
|
|
25
|
+
|
|
26
|
+
:param content: content of the package section (string)
|
|
27
|
+
"""
|
|
28
|
+
self.results = []
|
|
29
|
+
|
|
30
|
+
in_activity_resolver_table = False
|
|
31
|
+
in_non_data_actions = False
|
|
32
|
+
intent = None
|
|
33
|
+
for line in content.splitlines():
|
|
34
|
+
if line.startswith("Activity Resolver Table:"):
|
|
35
|
+
in_activity_resolver_table = True
|
|
36
|
+
continue
|
|
37
|
+
|
|
38
|
+
if not in_activity_resolver_table:
|
|
39
|
+
continue
|
|
40
|
+
|
|
41
|
+
if line.startswith(" Non-Data Actions:"):
|
|
42
|
+
in_non_data_actions = True
|
|
43
|
+
continue
|
|
44
|
+
|
|
45
|
+
if not in_non_data_actions:
|
|
46
|
+
continue
|
|
47
|
+
|
|
48
|
+
# If we hit an empty line, the Non-Data Actions section should be
|
|
49
|
+
# finished.
|
|
50
|
+
if line.strip() == "":
|
|
51
|
+
break
|
|
52
|
+
|
|
53
|
+
# We detect the action name.
|
|
54
|
+
if (
|
|
55
|
+
line.startswith(" " * 6)
|
|
56
|
+
and not line.startswith(" " * 8)
|
|
57
|
+
and ":" in line
|
|
58
|
+
):
|
|
59
|
+
intent = line.strip().replace(":", "")
|
|
60
|
+
continue
|
|
61
|
+
|
|
62
|
+
# If we are not in an intent block yet, skip.
|
|
63
|
+
if not intent:
|
|
64
|
+
continue
|
|
65
|
+
|
|
66
|
+
# If we are in a block but the line does not start with 8 spaces
|
|
67
|
+
# it means the block ended a new one started, so we reset and
|
|
68
|
+
# continue.
|
|
69
|
+
if not line.startswith(" " * 8):
|
|
70
|
+
intent = None
|
|
71
|
+
continue
|
|
72
|
+
|
|
73
|
+
# If we got this far, we are processing receivers for the
|
|
74
|
+
# activities we are interested in.
|
|
75
|
+
activity = line.strip().split(" ")[1]
|
|
76
|
+
package_name = activity.split("/")[0]
|
|
77
|
+
|
|
78
|
+
self.results.append(
|
|
79
|
+
{
|
|
80
|
+
"intent": intent,
|
|
81
|
+
"package_name": package_name,
|
|
82
|
+
"activity": activity,
|
|
83
|
+
}
|
|
84
|
+
)
|