So with all the hubbub about AOL releasing users' search query data, it got me wondering what my own Google search queries said about me.  But I have almost 1500 saved search queries in Firefox for Google.  There was no way I was going to copy and paste them all out, and I wasn't sure of a better way to do it.  I found formhistory.dat in my profile dir was where it was stored, but it's stored in Mork format, which if you Google around, is like a bastard red-headed step-child that needs to be beaten.  Apologies to bastard red-headed step-children.  :D  So anyway, looked at Mozilla's docs on the Mork format.  Found that jwz had written an old perl script to decode Mork for history.db along with some others who wrote python scripts for history.db parsing of the Mork format.  None of which seemed to work on formhistory.dat.  And so, I wrote quick and probably badly written and inefficient perl script to rip my Google search queries out of formhistory.dat

More specifically, reads in the file, removes all the pointless $00's from the data, and cleans it up in general.  Then finds the (x=q) line since Google's textbox is named "q" and records the value for x while also saving all the (id=data) lines to a hash, then searches all the index lines for that x value which tells which of the data lines have values for "q", and transfers all the corresponding data from the hash to an array, which gets sorted and dumped to fhdump.txt in the current directory.

Other forms could easily contain a textbox named "q" as well, so the results could contain values from other forms, but it was good enough for my curiosity.  As expected, my saved search queries contained various search terms that could be considered bizarre or incriminating when taken out of context much like a lot of the AOL search queries.  Grain of salt is definitely needed.  :P  Names, addresses, etc all included.  Especially because it contains search terms from Google Maps, driving directions, and more.  So yeah, just a little tidbit created out of boredom.  :P