<s> import sys , hashlib <EOL> PATH_INSTALL = "<STR_LIT>" <EOL> sys . path . append ( PATH_INSTALL ) <EOL> from androguard . session import Session <EOL> TEST = '<STR_LIT>' <EOL> s = Session ( ) <EOL> with open ( TEST , "<STR_LIT:r>" ) as fd : <EOL> digest , d , dx = s . addDEX ( TEST , fd . read ( ) ) <EOL> for method in d . get_methods ( ) : <EOL> g = dx . get_method ( method ) <EOL> if method . get_code ( ) == None : <EOL> continue <EOL> idx = <NUM_LIT:0> <EOL> for i in g . basic_blocks . get ( ) : <EOL> for ins in i . get_instructions ( ) : <EOL> op_value = ins . get_op_value ( ) <EOL> if op_value == <NUM_LIT> or op_value == <NUM_LIT> : <EOL> special_ins = i . get_special_ins ( idx ) <EOL> if special_ins != None : <EOL> print "<STR_LIT>" % idx , ins , special_ins , ins . get_name ( <EOL> ) , ins . get_output ( ) , special_ins . get_values ( ) <EOL> if op_value == <NUM_LIT> : <EOL> special_ins = i . get_special_ins ( idx ) <EOL> if special_ins != None : <EOL> print "<STR_LIT>" % idx , ins , special_ins , ins . get_name ( <EOL> ) , ins . get_output ( ) , repr ( special_ins . get_data ( ) ) <EOL> idx += ins . get_length ( ) </s>
