mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-06-23 16:19:02 -04:00
⚾ fix scanner.py
scanner.py uses an internal api from androguard, that internal api changed in androguard 4.1.4. This makes sure scanner handles this change correctly.
This commit is contained in:
@@ -690,7 +690,13 @@ def scan_binary(apkfile, allow_debuggable=False):
|
||||
logging.info(_('Scanning APK for extra signing blocks.'))
|
||||
a = common.get_androguard_APK(str(apkfile))
|
||||
a.parse_v2_v3_signature()
|
||||
for b in a._v2_blocks:
|
||||
|
||||
v2_block_ids = (
|
||||
a._v2_blocks.keys()
|
||||
if isinstance(a._v2_blocks, dict)
|
||||
else [b.id for b in a._v2_blocks]
|
||||
)
|
||||
for b in v2_block_ids:
|
||||
if b in APK_SIGNING_BLOCK_IDS:
|
||||
logging.debug(
|
||||
f"Problem: found extra signing block '{APK_SIGNING_BLOCK_IDS[b]}'"
|
||||
|
||||
Reference in New Issue
Block a user