harshguptaiscf / androguard

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

AttributeError when dvm.save: DalvikCode instance has no attribute '_DalvikCode__padding' #90

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. hg pull && hg update
2. get DalvikVMFormat from an app
3. modify the name of a method 
4. save 

What is the expected output? 

Return the dex (with the modifications) into raw format

What do you see instead?

In [45]: d.save()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/opt/santoku/androguard/androlyze.py in <module>()
----> 1 d.save()

/opt/santoku/androguard/androguard/core/bytecodes/dvm.pyc in save(self)
   6998       buff = ""
   6999       for i in l :
-> 7000         idx = h[ i ]
   7001 
   7002         if idx != last_idx :

/opt/santoku/androguard/androguard/core/bytecodes/dvm.pyc in get_raw(self)
   6245         print "CODE_ITEM"
   6246         for i in self.code :
-> 6247             i.show()
   6248 
   6249     def get_obj(self) :

/opt/santoku/androguard/androguard/core/bytecodes/dvm.pyc in <genexpr>((i,))
   6245         print "CODE_ITEM"
   6246         for i in self.code :
-> 6247             i.show()
   6248 
   6249     def get_obj(self) :

/opt/santoku/androguard/androguard/core/bytecodes/dvm.pyc in get_raw(self)
   6155                 pack("=H", self.ins_size) + \
   6156                 pack("=H", self.outs_size) + \
-> 6157                 pack("=H", self.tries_size) + \
   6158                 pack("=I", self.debug_info_off) + \
   6159                 pack("=I", self.insns_size) + \

AttributeError: DalvikCode instance has no attribute '_DalvikCode__padding'

What version of the product are you using? On what operating system?

1.7

Please provide any additional information below.

Original issue reported on code.google.com by guillerm...@gmail.com on 15 Nov 2012 at 5:59

GoogleCodeExporter commented 8 years ago

Original comment by anthony....@gmail.com on 16 Nov 2012 at 6:55

GoogleCodeExporter commented 8 years ago

Original comment by anthony....@gmail.com on 25 Nov 2012 at 10:45

GoogleCodeExporter commented 8 years ago

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