req = requests.get(self.base_url + "rekall_profiles/v1.0") self.assertEqual(req.status_code, 500) known_profile = "F8E2A8B5C9B74BF4A6E4A48F180099942" unknown_profile = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" req = requests.get(self.base_url + "rekall_profiles/v1.0/nt/GUID/" + unknown_profile) self.assertEqual(req.status_code, 404) req = requests.get(self.base_url + "rekall_profiles/v1.0/nt/GUID/" + known_profile) self.assertEqual(req.status_code, 200) pb = rdf_rekall_types.RekallProfile.protobuf() json_format.Parse(req.content.lstrip(")]}'\n"), pb) profile = rdf_rekall_types.RekallProfile.FromSerializedString( pb.SerializeToString()) self.assertEqual(profile.name, "nt/GUID/F8E2A8B5C9B74BF4A6E4A48F180099942") self.assertEqual(profile.version, "v1.0") self.assertEqual(profile.data[:2], "\x1f\x8b") def main(args): test_lib.main(args) if __name__ == "__main__": flags.StartMain(main)
def PoolClient(): from grr_response_client import poolclient SetConfigOptions() flags.StartMain(poolclient.main)
def DistEntry(): """The main entry point for packages.""" flags.StartMain(main)
def Client(): from grr_response_client import client SetConfigOptions() flags.StartMain(client.main)
def FleetspeakClient(): from grr_response_client import grr_fs_client SetConfigOptions() flags.StartMain(grr_fs_client.main)
def DistEntry(): """This is called from the package entry point.""" flags.StartMain(main)
def ClientBuild(): from grr_response_client import client_build SetConfigOptions() flags.StartMain(client_build.main)
def EndToEndTests(): from grr.tools import end_to_end_tests SetConfigOptions() flags.StartMain(end_to_end_tests.main)
def Worker(): from grr.worker import worker SetConfigOptions() flags.StartMain(worker.main)
def GrrServer(): from grr.tools import grr_server SetConfigOptions() flags.StartMain(grr_server.main)
def GrrFrontend(): from grr.tools import frontend SetConfigOptions() flags.StartMain(frontend.main)
def ConfigUpdater(): from grr.tools import config_updater SetConfigOptions() flags.StartMain(config_updater.main)
def Console(): from grr.tools import console SetConfigOptions() flags.StartMain(console.main)
def DataServer(): from grr.server.data_server import data_server SetConfigOptions() flags.StartMain(data_server.main)
def AdminUI(): from grr.gui import admin_ui SetConfigOptions() flags.StartMain(admin_ui.main)
def GRRFuse(): from grr.tools import fuse_mount SetConfigOptions() flags.StartMain(fuse_mount.main)