Rick (medlir) wrote,
Rick
medlir

fhdump.pl

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

http://www.medlir.com/code/fhdump.pl

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
Subscribe

  • Facebook is down...

    So what's going on over here? :D

  • Ahh, time.... you slippery thing you.

    Amazingly enough, it's been almost exactly two whole years... AGAIN... since I last posted. What is it with July? Hey, I know, let's do another big…

  • Random Rant

    People I Want to Smack #237 Anyone who, when filling out a profile on a social or personals site, puts down that they "like to have fun". Seriously?…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments