So, I was watching a friend buy something, and noticed that everything in the fields was saved data. After some research, I discovered that Firefox stored data in sqlite databases, which could be read with python. So, after some research and programming, I created a program that connects to the database, dumps the data and writes it to a file. Take a look:
#!/usr/bin/python
'''
Form Field Jack for Firefox (currently only tested on Ubuntu)
v1.0 Feb 6, 2013
Authored by Live Wire
'''
import glob
import sqlite3 as sql
output = open("field_history_output.txt","w")
ffFormFields = "/home/drew/.mozilla/firefox/*.default/formhistory.sqlite"
def findFile(path):
return glob.glob(path)
def main():
fieldsSQL = findFile(ffFormFields) #returns as array
con = sql.connect(fieldsSQL[0])
cur = con.cursor()
cur.execute("select * from moz_formhistory;")
rawSQLData = cur.fetchall()
strSQLData = str(rawSQLData) #converts to string data
output.write(strSQLData) #writes to file
if __name__=="__main__":
main()
This is one of my first actual programs in python, please let me know what you think! Also working on a parser for the output, sorry its kinda messy. Also working on porting it to windows systems, as this only works on Linux right now. Next comes the cookies database, which is working, but still rough.
Any comments welcome!