Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"IndexError: list index out of range" in calling get_arsc_info #50

Open
emanuelb opened this issue May 17, 2020 · 0 comments
Open

"IndexError: list index out of range" in calling get_arsc_info #50

emanuelb opened this issue May 17, 2020 · 0 comments

Comments

@emanuelb
Copy link

Running get_arsc_info function from pyaxmlparser.arscutil on resources.arsc from repo at:
https://github.com/appknox/pyaxmlparser/blob/master/tests/test_apk/resources.arsc
will return:

Traceback (most recent call last):
  File "/tmp/arsctest.py", line 12, in <module>
    print(get_arsc_info(rsc))
  File "/usr/lib/python3/dist-packages/pyaxmlparser/arscutil.py", line 636, in get_arsc_info
    tmp_buff = getattr(arscobj, "get_" + ttype + "_resources")(
  File "/usr/lib/python3/dist-packages/pyaxmlparser/arscparser.py", line 439, in get_bool_resources
    buff += '<bool name="%s">%s</bool>\n' % (i[0], i[1])
IndexError: list index out of range

code to reproduce:

from pyaxmlparser.arscparser import ARSCParser
from pyaxmlparser.arscutil   import get_arsc_info
rsc_file = 'resources.arsc'
rsc = ARSCParser(open(rsc_file, 'rb').read())
print('rsc=\n')
print(rsc)
print('rsc.get_strings_resources()=\n')
print(rsc.get_strings_resources())
print('get_arsc_info(rsc)=\n')
print(get_arsc_info(rsc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant