使用 .Net 的 SQLite 驱动程序并访问可以在我的计算机上找到的文件places.sqlite 。
Application Data/Mozilla/Firefox/Profiles/$this_varies/places.sqlite
在目标计算机上定位应该不难。
编辑 1:
这是从数据库中打印出 url 的代码片段:
using System.Data.SQLite; // downloaded from http://sourceforge.net/projects/adodotnetsqlite
namespace sqlite_test
{
class Program
{
static void Main(string[] args)
{
var path_to_db = @"C:\places.sqlite"; // copied here to avoid long path
SQLiteConnection sqlite_connection = new SQLiteConnection("Data Source=" + path_to_db + ";Version=3;New=True;Compress=True;");
SQLiteCommand sqlite_command = sqlite_connection.CreateCommand();
sqlite_connection.Open();
sqlite_command.CommandText = "select * from moz_places";
SQLiteDataReader sqlite_datareader = sqlite_command.ExecuteReader();
while (sqlite_datareader.Read())
{
// Prints out the url field from the table:
System.Console.WriteLine(sqlite_datareader["url"]);
}
}
}
}
编辑2:
作为提示。我真的必须为 firefox 推荐 SQLite Manager 插件。它对于使用 sqlite 数据库非常有用。