Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Dict attr NameLoad ListLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Num FunctionDef arguments args NameParam defaults body If AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign NameStore BinOpSub Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr attr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareGt NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Str NameLoad Continue Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Str keyword Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Call NameLoad NameLoad keyword ListLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Str keyword Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad ListLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str keyword Str keyword AttributeLoad NameLoad attr attr NameLoad If CompareEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str keyword Str keyword AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body For TupleStore NameStore NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad ListLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Return Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore BoolOpOr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Dict Assign NameStore Num With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str keyword Num keyword AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Num keyword AttributeLoad NameLoad attr NameStore body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListComp TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListComp NameLoad comprehension TupleStore NameStore NameStore NameStore NameLoad keyword AttributeLoad NameLoad attr AugAssignAdd NameStore Call NameLoad NameLoad AugAssignAdd NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Num If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Break Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Dict attr NameLoad ListLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Dict If UnaryOpNot AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad BinOpMult AttributeLoad AttributeLoad NameLoad attr attr Num While UnaryOpNot Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Break If NameLoad body Assign NameStore Call NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Raise NameLoad decorator_list Call AttributeLoad NameLoad attr decorator_list
N/A N/A Cron job to process hunt results.
 N/A logging grr.lib aff4 grr.lib flow grr.lib output_plugin grr.lib rdfvalue grr.lib stats grr.lib utils grr.lib.aff4_objects cronjobs grr.lib.hunts results hunts_results grr.lib.rdfvalues structs rdf_structs grr.proto flows_pb2 ProcessHuntResultCollectionsCronFlowArgs N/A N/A rdf_structs RDFProtoStruct N/A N/A protobuf N/A flows_pb2 ProcessHuntResultsCronFlowArgs N/A ResultsProcessingError N/A Exception N/A N/A This exception is raised when errors happen during results processing. __init__ N/A N/A self N/A N/A N/A N/A self exceptions_by_hunt N/A N/A N/A N/A N/A super ResultsProcessingError self __init__ N/A RegisterSubException N/A N/A self hunt_urn plugin_name exception N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A self exceptions_by_hunt setdefault hunt_urn N/A setdefault plugin_name N/A append exception N/A __repr__ N/A N/A self N/A N/A N/A messages N/A N/A N/A hunt_urn exceptions_by_plugin N/A N/A N/A self exceptions_by_hunt items N/A N/A N/A plugin_name exception N/A N/A exceptions_by_plugin items N/A N/A N/A N/A messages append N/A Exception for hunt %s (plugin %s): %s N/A hunt_urn plugin_name exception N/A N/A N/A join messages N/A N/A ProcessHuntResultCollectionsCronFlow N/A N/A cronjobs SystemCronFlow N/A N/A Periodic cron flow that processes hunt results.

  The ProcessHuntResultCollectionsCronFlow reads hunt results stored in
  HuntResultCollections and feeds runs output plugins on them.
   N/A frequency N/A N/A rdfvalue Duration 5m N/A lifetime N/A N/A rdfvalue Duration 40m N/A allow_overruns True N/A args_type ProcessHuntResultCollectionsCronFlowArgs N/A DEFAULT_BATCH_SIZE 5000 CheckIfRunningTooLong N/A N/A self N/A N/A N/A N/A N/A N/A self state args max_running_time N/A N/A elapsed N/A N/A N/A N/A N/A N/A N/A rdfvalue RDFDatetime Now AsSecondsFromEpoch N/A N/A N/A self start_time AsSecondsFromEpoch N/A N/A elapsed N/A N/A N/A self state args max_running_time N/A N/A True N/A False N/A LoadPlugins N/A N/A self metadata_obj N/A N/A N/A output_plugins N/A N/A metadata_obj Get N/A N/A metadata_obj Schema OUTPUT_PLUGINS N/A used_plugins N/A N/A unused_plugins N/A N/A N/A _ N/A plugin_def state N/A N/A N/A output_plugins data iteritems N/A N/A N/A N/A hasattr plugin_def GetPluginForState N/A N/A N/A N/A logging error Invalid plugin_def: %s plugin_def N/A N/A N/A N/A used_plugins append N/A plugin_def N/A N/A plugin_def GetPluginForState state N/A N/A output_plugins used_plugins N/A RunPlugins N/A N/A self hunt_urn plugins results exceptions_by_plugin N/A N/A N/A N/A plugin_def plugin plugins N/A N/A N/A N/A N/A N/A plugin ProcessResponses results N/A plugin_status N/A N/A output_plugin OutputPluginBatchProcessingStatus plugin_descriptor plugin_def status SUCCESS batch_size N/A len results N/A N/A N/A N/A stats STATS IncrementCounter hunt_results_ran_through_plugin delta N/A len results fields N/A N/A plugin_def plugin_name N/A N/A N/A Exception N/A e N/A N/A N/A N/A logging exception e N/A plugin_status N/A N/A output_plugin OutputPluginBatchProcessingStatus plugin_descriptor plugin_def status ERROR summary N/A N/A utils SmartStr e batch_size N/A len results N/A N/A N/A N/A N/A exceptions_by_plugin setdefault plugin_def N/A append e N/A N/A N/A N/A N/A N/A aff4 FACTORY Open N/A N/A hunt_urn Add OutputPluginsStatus PluginStatusCollection mode w token N/A self token Add plugin_status N/A N/A N/A plugin_status status N/A N/A plugin_status Status ERROR N/A N/A N/A N/A N/A N/A N/A aff4 FACTORY Open N/A N/A hunt_urn Add OutputPluginsErrors PluginStatusCollection mode w token N/A self token Add plugin_status N/A FlushPlugins N/A N/A self hunt_urn plugins exceptions_by_plugin N/A N/A N/A N/A plugin_def plugin plugins N/A N/A N/A N/A N/A N/A plugin Flush N/A N/A N/A Exception N/A e N/A N/A N/A N/A logging exception Error flushing hunt results: hunt %s, plugin %s hunt_urn N/A str plugin N/A N/A N/A self Log N/A Error processing hunt results (hunt %s, plugin %s): %s N/A hunt_urn N/A str plugin e N/A N/A N/A N/A N/A exceptions_by_plugin setdefault plugin_def N/A append e N/A ProcessOneHunt N/A N/A self exceptions_by_hunt N/A N/A N/A Reads results for one hunt and process them. N/A N/A hunt_results_urn results N/A N/A N/A hunts_results HuntResultQueue ClaimNotificationsForCollection start_time N/A N/A self args start_processing_time token N/A self token lease_time N/A self lifetime N/A N/A N/A logging debug Found %d results for hunt %s N/A len results hunt_results_urn N/A N/A results N/A N/A 0 N/A hunt_urn N/A N/A rdfvalue RDFURN N/A N/A hunt_results_urn Dirname N/A batch_size N/A N/A N/A N/A self state args batch_size N/A self DEFAULT_BATCH_SIZE N/A metadata_urn N/A N/A hunt_urn Add ResultsMetadata N/A exceptions_by_plugin N/A N/A num_processed_for_hunt 0 N/A N/A N/A N/A aff4 FACTORY OpenWithLock hunt_results_urn aff4_type HuntResultCollection lease_time 600 token N/A self token collection_obj N/A N/A N/A N/A N/A aff4 FACTORY OpenWithLock metadata_urn lease_time 600 token N/A self token metadata_obj N/A N/A N/A all_plugins used_plugins N/A N/A self LoadPlugins metadata_obj N/A num_processed N/A int N/A N/A metadata_obj Get N/A N/A metadata_obj Schema NUM_PROCESSED_RESULTS N/A batch N/A N/A utils Grouper results batch_size N/A N/A results N/A list N/A N/A collection_obj MultiResolve N/A N/A ts suffix N/A N/A _ ts suffix batch N/A N/A N/A self RunPlugins hunt_urn used_plugins results exceptions_by_plugin N/A N/A N/A N/A hunts_results HuntResultQueue DeleteNotifications N/A record_id N/A N/A record_id _ _ batch token N/A self token N/A num_processed N/A len batch N/A num_processed_for_hunt N/A len batch N/A N/A N/A self HeartBeat N/A N/A N/A collection_obj UpdateLease 600 N/A N/A N/A metadata_obj Set N/A N/A N/A metadata_obj Schema NUM_PROCESSED_RESULTS num_processed N/A N/A N/A metadata_obj UpdateLease 600 N/A N/A N/A self CheckIfRunningTooLong N/A N/A N/A N/A logging warning Run too long, stopping. N/A N/A N/A N/A self FlushPlugins hunt_urn used_plugins exceptions_by_plugin N/A N/A N/A metadata_obj Set N/A N/A N/A metadata_obj Schema OUTPUT_PLUGINS all_plugins N/A N/A N/A metadata_obj Set N/A N/A N/A metadata_obj Schema NUM_PROCESSED_RESULTS num_processed N/A exceptions_by_plugin N/A N/A N/A plugin exceptions N/A N/A exceptions_by_plugin items N/A N/A N/A N/A N/A N/A N/A N/A exceptions_by_hunt setdefault hunt_urn N/A setdefault plugin N/A extend exceptions N/A N/A N/A logging debug Processed %d results. num_processed_for_hunt N/A N/A len results N/A Start N/A N/A self N/A N/A N/A N/A self start_time N/A N/A N/A N/A rdfvalue RDFDatetime Now N/A exceptions_by_hunt N/A N/A N/A N/A N/A N/A self state args max_running_time N/A N/A N/A N/A N/A self state args max_running_time N/A N/A rdfvalue Duration N/A %ds N/A int N/A N/A N/A ProcessHuntResultCollectionsCronFlow lifetime seconds 0.6 N/A N/A N/A N/A self CheckIfRunningTooLong N/A N/A count N/A N/A self ProcessOneHunt exceptions_by_hunt N/A N/A count N/A N/A N/A exceptions_by_hunt N/A N/A e N/A ResultsProcessingError N/A N/A hunt_urn exceptions_by_plugin N/A N/A exceptions_by_hunt items N/A N/A N/A plugin exceptions N/A N/A exceptions_by_plugin items N/A N/A exception exceptions N/A N/A N/A N/A e RegisterSubException hunt_urn plugin exception N/A e N/A N/A N/A flow StateHandler N/A