Question

I have my web browsers set to save what I type into text boxes on forms. I have a lot of search terms stored in the text box of my browser and would like to get at it via a program of some sort before I clear these values out. There are far too many for me to go through one at a time.

The web browser must store this data somewhere, does anyone know where? Is it possible to retrieve these values? Firefox, more so than IE -- but either, if anyone knows a script that can extract these values? Thanks.

Was it helpful?

Solution

Firefox 3

In Firefox on Windows it's stored in a SQLite file, in:

C:\Documents and Settings\<Username>\Application Data
    \Mozilla\Firefox\Profiles\<UID>.default\formhistory.sqlite

Once you have the SQLite file, you can put together a script to read the data from it pretty quickly - here's a good primer to using SQLite with PHP 5 for example.

Firefox pre-version 3

Apparently SQLite has only been used for the saved form history since version 3. Version 2 still uses formhistory.dat, which is written using Mork.

From the wiki on Mork:

Also, despite being plain text, Mork is generally regarded as unintelligible to humans and as a hard format to write parsers for.

There has been an item files on Bugzilla asking for a more sane and readable format to be introduced, the filer even attempted to write a perl parser for his .dat files, with limited success.

OTHER TIPS

It seems that you can find the form history in the form of a sqlite database under USER_DIR/Mozilla/Firefox/Profiles//formhistory.sqlite

I didn't try to browse it with Sqlite but the filename seems to be explicit.

You can find several wrappers on the sqlite website to access it from the language of your choice.

Good Luck

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top