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

androguard fails to load jar files #8

Closed
GoogleCodeExporter opened this issue Apr 19, 2016 · 2 comments
Closed

androguard fails to load jar files #8

GoogleCodeExporter opened this issue Apr 19, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
a = androguard.AndroGuardS("attached jar file")
a.show
What is the expected output? What do you see instead?
should print information about the jar file, instead it dies accessing outside 
of a list - this actually helps with all jar files (classes) that I tried to 
load, except very simple ones.

Traceback (most recent call last):
  File "./bla.py", line 13, in <module>
    a = androguard.AndroguardS(sys.argv[1])
  File "/home/spjsschl/androguard/androguard.py", line 448, in __init__
    self.__orig_a = Androguard( [ filename ], raw )
  File "/home/spjsschl/androguard/androguard.py", line 240, in __init__
    self._analyze()
  File "/home/spjsschl/androguard/androguard.py", line 275, in _analyze
    self.__bc.append( (j[0], BC( jvm.JVMFormat(j[1]) ) ) )
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 2893, in __init__
    self._load_class()
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 2964, in _load_class
    mi = MethodInfo( self.__CM, self )
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 789, in __init__
    ai = AttributeInfo( self.__CM, buff )
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 2527, in __init__
    self._info = ATTRIBUTE_INFO_DESCR[ self.__name ](self.__CM, buff)
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 1545, in __init__
    self.__code = JavaCode( class_manager, buff.read( self.low_struct.get_value().code_length ) )
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 1202, in __init__
    r_function, v_function, r_buff, r_format, f_function = EXTRACT_INFORMATION_SIMPLE( op_value )
  File "/home/spjsschl/androguard//core/bytecodes/jvm.py", line 427, in EXTRACT_INFORMATION_SIMPLE
    r_function = JAVA_OPCODES[ op_value ][2]
IndexError: list index out of range

What version of the product are you using? On what operating system?
I am using the current mercurial version on ubuntu oneiric.


Original issue reported on code.google.com by spjss...@gmail.com on 22 Nov 2011 at 12:40

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by anthony....@gmail.com on 22 Nov 2011 at 10:27

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Original comment by anthony....@gmail.com on 26 Nov 2011 at 8:18

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant