Fun with URL History
Analysing Firefox URL history: why not?
You can obtain a list of unique URLs visited in Firefox by doing the following:
- Make a copy of places.sqlite, found in the Firefox/Mozilla profile directory
- Using any standard SQLite tool (for example, DB Browser for SQLite), run the query:
select url from moz_places;
- Export the results to CSV
- Now you can do interesting things to the exported CSV file, such as:
- find all occurrences of tinyurl.com:
cat moz_places.csv |sort |uniq |grep -i tinyurl.com
- see how many unique URLs you visited at Google:
cat moz_places.csv |sort |uniq |grep -i google.com |wc -l
- extract unique URLs from any random text:
cat * | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | sort -u
Another use case:
Find all occurrences of URLs from specific domains in browsing history and email. This can be done by concatenating the Firefox URL dump with your email archives, then grepping and sorting to find the URLs of interest:cat /mbox+ff_dumps_folder/* |grep -i example.com |sort |uniq
(Yes, I like using cat
like this, even though it’s a bit redundant.)
Found this post insightful, funny, or useful? Consider supporting us.
Comments ()