<s> """<STR_LIT>""" <EOL> import volatility . plugins . common as common <EOL> import volatility . utils as utils <EOL> START_MARKER = "<STR_LIT>" <EOL> END_MARKER = "<STR_LIT>" <EOL> CHUNK_SIZE = <NUM_LIT> <EOL> __author__ = "<STR_LIT>" <EOL> __copyright__ = "<STR_LIT>" <EOL> __license__ = "<STR_LIT>" <EOL> class RSAKey ( common . AbstractWindowsCommand ) : <EOL> """<STR_LIT>""" <EOL> def calculate ( self ) : <EOL> """<STR_LIT>""" <EOL> mem = utils . load_as ( self . _config , astype = "<STR_LIT>" ) <EOL> addrs = list ( mem . get_available_addresses ( ) ) <EOL> assert len ( addrs ) == <NUM_LIT:1> , "<STR_LIT>" <EOL> mem_start , mem_size = addrs [ <NUM_LIT:0> ] <EOL> for offset in xrange ( <NUM_LIT:0> , mem_size , CHUNK_SIZE ) : <EOL> chunk = mem . zread ( offset , CHUNK_SIZE ) <EOL> if START_MARKER in chunk and END_MARKER in chunk : <EOL> key = [ ] <EOL> in_key = False <EOL> for line in chunk . splitlines ( ) : <EOL> if START_MARKER in line and not in_key : <EOL> in_key = True <EOL> key . append ( line ) <EOL> elif END_MARKER in line and in_key : <EOL> in_key = False <EOL> key . append ( line ) <EOL> elif in_key : <EOL> key . append ( line ) <EOL> if len ( key ) != <NUM_LIT:0> : <EOL> yield "<STR_LIT:\n>" . join ( key ) <EOL> def render_text ( self , outfd , data ) : <EOL> """<STR_LIT>""" <EOL> for key in data : <EOL> outfd . writeln ( key ) </s>
