tomliamlynch / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

Problem with parsing binary XML #91

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I trying to use androaxml.py for parsing binary XML file from my test .apk. 
(File is in attachement).

What is the expected output? What do you see instead?
I have an error like that:
Traceback (most recent call last):
  File "C:\Users\***\Dropbox\androguard-1.6\androaxml.py", line 70, in <module>
    main(options, arguments)
  File "C:\Users\***\Dropbox\androguard-1.6\androaxml.py", line 45, in main
    ap = apk.AXMLPrinter( open(options.input, "rb").read() )
  File "C:\Users\***\Dropbox\androguard-1.6\androguard\core\bytecodes\apk.py", line 965, in __init__
    self.buff += "<%s%s\n" % ( self.getPrefix( self.axml.getPrefix() ), self.axml.getName() )
  File "C:\Users\***\Dropbox\androguard-1.6\androguard\core\bytecodes\apk.py", line 837, in getName
    return self.sb.getRaw(self.m_name)
  File "C:\Users\***\Dropbox\androguard-1.6\androguard\core\bytecodes\apk.py", line 644, in getRaw
    data += unichr( self.getShort(self.m_strings, offset) )
  File "C:\Users\***\Dropbox\androguard-1.6\androguard\core\bytecodes\apk.py", line 655, in getShort
    value = array[offset/4].get_value()
IndexError: list index out of range

Well, in this case len(array)=32 and offset=34

What version of the product are you using? On what operating system?
Androguard 1.6 OS: Win7 x64, Python 2.7

Please provide any additional information below.
I think problem derived from AXMLPrinter2 which sources you ported into Python, 
because with AXMLPrinter2 I have similar problem :(

Do you have any ideas how to fix this issue?

Thank you.

Original issue reported on code.google.com by yuriy.le...@gmail.com on 25 Nov 2012 at 11:13

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by anthony....@gmail.com on 26 Nov 2012 at 8:02

GoogleCodeExporter commented 8 years ago

Original comment by anthony....@gmail.com on 28 Nov 2012 at 8:40