token=token, overwrite=flags.FLAGS.overwrite_artifact) except artifact_registry.ArtifactDefinitionError as e: print "Error %s. You may need to set --overwrite_artifact." % e elif flags.FLAGS.subparser_name == "delete_artifacts": artifact_list = flags.FLAGS.artifact if not artifact_list: raise ValueError("No artifact to delete given.") artifact_registry.DeleteArtifactsFromDatastore(artifact_list, token=token) print "Artifacts %s deleted." % artifact_list elif flags.FLAGS.subparser_name == "download_missing_rekall_profiles": print "Downloading missing Rekall profiles." s = rekall_profile_server.GRRRekallProfileServer() s.GetMissingProfiles() elif flags.FLAGS.subparser_name == "set_global_notification": notification = aff4_users.GlobalNotification( type=flags.FLAGS.type, header=flags.FLAGS.header, content=flags.FLAGS.content, link=flags.FLAGS.link) if flags.FLAGS.show_from: notification.show_from = rdfvalue.RDFDatetime( ).ParseFromHumanReadable(flags.FLAGS.show_from) if flags.FLAGS.duration: notification.duration = rdfvalue.Duration().ParseFromHumanReadable( flags.FLAGS.duration)
def setUp(self): self.server = rekall_profile_server.GRRRekallProfileServer() super(ProfileServerTest, self).setUp()