<s> """<STR_LIT>""" <EOL> from grr . lib import flow <EOL> from grr . lib . rdfvalues import client as rdf_client <EOL> from grr . lib . rdfvalues import structs as rdf_structs <EOL> from grr . proto import flows_pb2 <EOL> class DumpProcessMemoryArgs ( rdf_structs . RDFProtoStruct ) : <EOL> protobuf = flows_pb2 . DumpProcessMemoryArgs <EOL> class DumpProcessMemory ( flow . GRRFlow ) : <EOL> """<STR_LIT>""" <EOL> category = "<STR_LIT>" <EOL> behaviours = flow . GRRFlow . behaviours + "<STR_LIT>" <EOL> args_type = DumpProcessMemoryArgs <EOL> @ flow . StateHandler ( next_state = [ "<STR_LIT>" ] ) <EOL> def Start ( self ) : <EOL> """<STR_LIT>""" <EOL> for pid in self . args . pids : <EOL> self . CallClient ( <EOL> "<STR_LIT>" , <EOL> rdf_client . DumpProcessMemoryRequest ( pid = pid , <EOL> pause = self . args . pause ) , <EOL> next_state = "<STR_LIT>" ) <EOL> @ flow . StateHandler ( next_state = [ "<STR_LIT>" ] ) <EOL> def DownloadImage ( self , responses ) : <EOL> if not responses . success : <EOL> self . Error ( "<STR_LIT>" % responses . status ) <EOL> self . CallFlow ( "<STR_LIT>" , <EOL> pathspecs = [ responses . First ( ) ] , <EOL> next_state = "<STR_LIT>" ) <EOL> @ flow . StateHandler ( next_state = [ "<STR_LIT>" ] ) <EOL> def DeleteFile ( self , responses ) : <EOL> self . CallClient ( "<STR_LIT>" , <EOL> responses . First ( ) . pathspec , <EOL> next_state = "<STR_LIT>" ) </s>
