Advertisement
Guest User

Untitled

a guest
Dec 28th, 2021
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import os
  2. import shutil
  3. import sqlite3
  4.  
  5. PROFILE_DIR = r"C:\Users\[ insert your username here ]\AppData\Roaming\Mozilla\Firefox\Profiles\[ a bunch of hex digits ].default"
  6.  
  7. #Make a copy of the DB so we don't accidentally mangle the real one
  8. backup_path = "./tempdb.sqlite"
  9. shutil.copyfile(
  10. os.path.join(PROFILE_DIR, 'cookies.sqlite'),
  11. backup_path
  12. )
  13.  
  14. con = sqlite3.connect(backup_path)
  15. cur = con.cursor()
  16. cur.execute("SELECT sql, type DESC, name FROM moz_cookies ORDER BY tbl_name")
  17. print(cur.fetchone())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement