private void Execute(ISender client, DoLoadRegistryKey message) { GetRegistryKeysResponse responsePacket = new GetRegistryKeysResponse(); try { RegistrySeeker seeker = new RegistrySeeker(); seeker.BeginSeeking(message.RootKeyName); responsePacket.Matches = seeker.Matches; responsePacket.IsError = false; } catch (Exception e) { responsePacket.IsError = true; responsePacket.ErrorMsg = e.Message; } responsePacket.RootKey = message.RootKeyName; client.Send(responsePacket); }
public static void HandleGetRegistryKey(DoLoadRegistryKey packet, Networking.Client client) { GetRegistryKeysResponse responsePacket = new GetRegistryKeysResponse(); try { RegistrySeeker seeker = new RegistrySeeker(); seeker.BeginSeeking(packet.RootKeyName); responsePacket.Matches = seeker.Matches; responsePacket.IsError = false; } catch (Exception e) { responsePacket.IsError = true; responsePacket.ErrorMsg = e.Message; } responsePacket.RootKey = packet.RootKeyName; client.Send(responsePacket); }