Closed GoogleCodeExporter closed 8 years ago
class CheckSumMeth :
def __init__(self, m1, sim) :
self.m1 = m1
self.sim = sim
self.buff = ""
self.entropy = 0.0
self.signature = None
code = m1.m.get_code()
This is called in androguard/elsim/elsim/elsim_dalvik.py add_attribute:
fm = func_meth( self.m, self.sim )
will raise exception.
is it code = m1.get_code() ?
Original comment by V.E.O.T...@gmail.com
on 19 Oct 2012 at 11:37
class CheckSumBB :
def __init__(self, basic_block, sim) :
self.basic_block = basic_block
self.buff = ""
for i in self.basic_block.bb.get_instructions() :
self.buff += dvm.clean_name_instruction( i )
self.buff += dvm.static_operand_instruction( i )
#self.hash = hashlib.sha256( self.buff + "%d%d" % (len(basic_block.childs), len(basic_block.fathers)) ).hexdigest()
self.hash = hashlib.sha256( self.buff ).hexdigest()
def get_buff(self) :
return self.buff
def get_hash(self) :
return self.hash
def filter_checksum_bb_basic( basic_block, sim ) :
return CheckSumBB( basic_block, sim )
filter_checksum_bb_basic is called in androguard/elsim/elsim/elsim_dalvik.py
add_attribute:
bb[ i.name ] = func_checksum_bb( i )
Arguments number seems incorrect?
and sim is never used in CheckSumBB, why not:
def filter_checksum_bb_basic( basic_block) :
return CheckSumBB( basic_block)
class CheckSumBB :
def __init__(self, basic_block) :
Original comment by V.E.O.T...@gmail.com
on 19 Oct 2012 at 11:43
Original comment by anthony....@gmail.com
on 16 Nov 2012 at 6:49
Original issue reported on code.google.com by
V.E.O.T...@gmail.com
on 19 Oct 2012 at 11:20