androguard / androguard/apk-parser
parsing APK crashes if targetSdkVersion is set to a string value
- Vorherrschende Sprache
- Python
- Sterne
- 8
- Forks
- 3
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Describe what you wanted to do
Inspect these APKs:
https://github.com/googlesamples/android-testdpc/releases/download/6.0.0-preview/TestDPC_6000.apk
https://github.com/googlesamples/android-testdpc/releases/download/5.0.0-preview/TestDPC_5000.apk
https://github.com/googlesamples/android-testdpc/releases/download/v3.0.2/TestDPC_N_3002.apk
https://github.com/googlesamples/android-testdpc/releases/download/v3.0.3/TestDPC_N_3003.apk
https://github.com/googlesamples/android-testdpc/releases/download/5.0.1-preview/TestDPC_5001.apk
### Describe what you expected
This should work:
```python
from androguard.core.apk import APK
apk = APK('TestDPC_6000.apk')
```
### Describe what actually happened
```
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.9/dist-packages/androguard/core/apk/__init__.py", line 294, in __init__
self._apk_analysis()
File "/usr/local/lib/python3.9/dist-packages/androguard/core/apk/__init__.py", line 371, in _apk_analysis
self.permission_module = androconf.load_api_specific_resource_module(
File "/usr/local/lib/python3.9/dist-packages/androguard/core/androconf.py", line 261, in load_api_specific_resource_module
ret = loader[resource_name](api)
File "/usr/local/lib/python3.9/dist-packages/androguard/core/api_specific_resources/__init__.py", line 36, in load_permissions
apilevel = int(apilevel)
ValueError: invalid literal for int() with base 10: 'Q'
```
### System Information
- Androguard Version: 4.1.1 and 3.4.0~a2
- Python Version: 3.11.2
- Operating System: Debian
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.