androguard / androguard/apk-parser

parsing APK crashes if targetSdkVersion is set to a string value

オープン
#3 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
8
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。