From 33ec59cfa24730afa5d0e40c6923e82168a15627 Mon Sep 17 00:00:00 2001 From: mephi42 Date: Thu, 15 Jul 2021 21:31:11 +0200 Subject: [PATCH] parseapk: fix pair length parsing, parse attributes According to the spec, block contains a "Sequence of uint64-length- prefixed ID-value pairs", so parse length first. --- parseapk/parse_apk.py | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/parseapk/parse_apk.py b/parseapk/parse_apk.py index 2348860..c22a92b 100644 --- a/parseapk/parse_apk.py +++ b/parseapk/parse_apk.py @@ -153,16 +153,19 @@ def parse_signing_block(data, magic_offset): current_offset = begin_offset + 8 while current_offset < magic_offset - 8: print "\t----- Pair -----" - pair_id = struct.unpack("