En windows: copy $env:APPDATA\Mozilla\Firefox\Profiles\*.default-release\cookies.sqlite .
En ubuntu: cp ~/.mozilla/firefox/*.default-release/cookies.sqlite .
En mac os: cp ~/Library/Application\ Support/Firefox/Profiles/*.default-release/cookies.sqlite .
#!/usr/bin/env python3# Sample Script to extract cookies offile from FireFox sqlite database # Created by PlainText importargparseimportsqlite3defmain(dbpath,host,cookie):conn=sqlite3.connect(dbpath)cursor=conn.cursor()if(host==""andcookie==""):query="SELECT * FROM moz_cookies"elif(host!=""andcookie==""):query="SELECT * FROM moz_cookies WHERE host LIKE '%{}%'".format(host)elif(host==""andcookie!=""):query="SELECT * FROM moz_cookies WHERE name LIKE '%{}%'".format(cookie)elif(host!=""andcookie!=""):query="SELECT * FROM moz_cookies WHERE name LIKE '%{}%' AND host LIKE '%{}%'".format(cookie,host)cursor.execute(query)records=cursor.fetchall()rowCount=len(records)if(rowCount>0):forrowinrecords:print(row)else:print("[-] No cookie found with the selected options.")conn.close()if__name__=="__main__":parser=argparse.ArgumentParser()parser.add_argument("--dbpath","-d",required=True,help="The path to the sqlite cookies database")parser.add_argument("--host","-o",required=False,help="The host for the cookie",default="")parser.add_argument("--cookie","-c",required=False,help="The name of the cookie",default="")args=parser.parse_args()main(args.dbpath,args.host,args.cookie)