mirror of
https://github.com/androguard/androguard.git
synced 2024-11-23 05:00:11 +00:00
Fix test case
This commit is contained in:
parent
db87703967
commit
293d85b29e
@ -380,6 +380,7 @@ class AXMLParser:
|
||||
self.axml_tampered = False
|
||||
self.buff = io.BufferedReader(io.BytesIO(raw_buff))
|
||||
self.buff_size = self.buff.raw.getbuffer().nbytes
|
||||
self.packerwarning = False
|
||||
|
||||
# Minimum is a single ARSCHeader, which would be a strange edge case...
|
||||
if self.buff_size < 8:
|
||||
@ -824,7 +825,10 @@ class AXMLParser:
|
||||
if name <= len(self.m_resourceIDs):
|
||||
attr = self.m_resourceIDs[name]
|
||||
if attr in public.SYSTEM_RESOURCES['attributes']['inverse']:
|
||||
res = 'android:' + public.SYSTEM_RESOURCES['attributes']['inverse'][attr]
|
||||
res = public.SYSTEM_RESOURCES['attributes']['inverse'][attr].replace("_",
|
||||
":")
|
||||
if res != self.sb[name]:
|
||||
self.packerwarning = True
|
||||
|
||||
if not res or res == ":":
|
||||
# Attach the HEX Number, so for multiple missing attributes we do not run
|
||||
@ -1047,7 +1051,7 @@ class AXMLPrinter:
|
||||
|
||||
:returns: True if packer detected, False otherwise
|
||||
"""
|
||||
return self.packerwarning
|
||||
return self.packerwarning or self.axml.packerwarning
|
||||
|
||||
def _get_attribute_value(self, index):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user