Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically acess Google chrome history

I want to index all the user actions and websites in google chrome. i understand that google chrome index all the data in sqlLite database. how can i Programmatically access the chrome web history in my own application

like image 448
Nithin K Anil Avatar asked Dec 22 '11 18:12

Nithin K Anil


People also ask

Can I access my Chrome history from another device?

in the upper-right hand corner of the browser > History > History. On the left side, click Tabs from other devices.

How do I extract history from Chrome?

Export Chrome History. Export your Chrome History as an Excel-readable CSV file or as a JSON file. To use this extension, click the puzzle piece in the top right, then click on Export Chrome History. This extension is limited by Chrome's 3 month limit - this is separate from your google account's history.

Can Chrome Extensions read history?

So, can the extension read the browser(Chrome) history from my phone? No, extensions can only access the current browser where they run.

How do I monitor Chrome activity?

Install the reporting extension Download the Chrome Reporting Extension MSI. Deploy the MSI package using your preferred software. Download the ADMX templates to turn on or off real-time reporting. Check that the %LOCALAPPDATA%\Google\ChromeReporting path was created to verify MSI installation.


1 Answers

You need to download the appropriate assembly from the SqLite downloads page

Once you add a reference to the SQLite assembly, its very similar to standard ADO.net

All the user history is stored in the History database located at the path in the connection string below

SQLiteConnection conn = new SQLiteConnection
    (@"Data Source=C:\Users\YourUserName\AppData\Local\Google\Chrome\User Data\Default\History");
conn.Open();
SQLiteCommand cmd = new SQLiteCommand();
cmd.Connection = conn;
//  cmd.CommandText = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;";
//  Use the above query to get all the table names
cmd.CommandText = "Select * From urls";
SQLiteDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
Console.WriteLine(dr[1].ToString());
}
like image 86
Ta01 Avatar answered Sep 22 '22 16:09

Ta01