This repository has been archived on 2024-12-31. You can view files and clone it, but cannot push or open issues or pull requests.
TrollRAT/TrollRATActions/TrollRATActionsPlugin.cs
Leurak bdabc234b7 Add plugin support
- Moved included payloads and actions into plugins
 - List of loaded plugins in the web client
 - Removed non-clear stuff from the roadmap
2016-07-16 13:11:54 +02:00

52 lines
1.4 KiB
C#

using System;
using System.ComponentModel.Composition;
using System.Runtime.InteropServices;
using TrollRAT;
using TrollRAT.Plugins;
using TrollRAT.Payloads;
namespace TrollRATActions
{
[Export(typeof(ITrollRATPlugin))]
public class TrollRATPayloadsPlugin : ITrollRATPlugin
{
public string Name => "TrollRAT Actions";
public void onLoad()
{
}
}
public class PayloadActionClearScreen : SimplePayloadAction
{
[DllImport("user32.dll")]
static extern bool RedrawWindow(IntPtr hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, int flags);
public override string execute(Payload payload)
{
RedrawWindow(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, 133);
return "void(0);";
}
public override string getIcon(Payload payload) { return null; }
public override string getTitle(Payload payload) { return "Clear Screen"; }
}
public class PayloadActionClearWindows : SimplePayloadAction
{
[DllImport("Plugins\\TrollRATNative.dll")]
static extern void clearWindows();
public override string execute(Payload payload)
{
clearWindows();
return "void(0);";
}
public override string getIcon(Payload payload) { return null; }
public override string getTitle(Payload payload) { return "Close open Windows"; }
}
}