<s> import sys <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> print method . get_class_name ( ) , method . get_name ( ) , method . get_descriptor ( ) <EOL> code = method . get_code ( ) <EOL> if code != None : <EOL> bc = code . get_bc ( ) <EOL> idx = <NUM_LIT:0> <EOL> for i in bc . get_instructions ( ) : <EOL> print "<STR_LIT:\t>" , "<STR_LIT>" % idx , i . get_name ( ) , i . get_output ( ) <EOL> idx += i . get_length ( ) <EOL> for method in d . get_methods ( ) : <EOL> print method . get_class_name ( ) , method . get_name ( ) , method . get_descriptor ( ) <EOL> idx = <NUM_LIT:0> <EOL> for i in method . get_instructions ( ) : <EOL> print "<STR_LIT:\t>" , "<STR_LIT>" % idx , i . get_name ( ) , i . get_output ( ) <EOL> idx += i . get_length ( ) </s>
