Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import shutil
- import sqlite3
- PROFILE_DIR = r"C:\Users\[ insert your username here ]\AppData\Roaming\Mozilla\Firefox\Profiles\[ a bunch of hex digits ].default"
- #Make a copy of the DB so we don't accidentally mangle the real one
- backup_path = "./tempdb.sqlite"
- shutil.copyfile(
- os.path.join(PROFILE_DIR, 'cookies.sqlite'),
- backup_path
- )
- con = sqlite3.connect(backup_path)
- cur = con.cursor()
- cur.execute("SELECT sql, type DESC, name FROM moz_cookies ORDER BY tbl_name")
- print(cur.fetchone())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement