原帖地址:https://blog.csdn.net/yygydjkthh/article/details/37604309

0、使用命令对此数据库进行打开:
$ sqlite3 cookies.sqlite
进行入sqlite3命令行模式;

1、查看此文件中的数据库的名称:
sqlite> .databases
seq  name             file                                                      
---  ---------------  ----------------------------------------------------------
0    main             /home/ufo/.mozilla/firefox/cojs83dh.default/cookies.sqlite

2、再查看此文件中已经存在数据表:
sqlite> .tables
moz_cookies
可看到此文件中包含一个表,名为moz_cookies;

3、查看此表中的字段名称:
sqlite> .schema moz_cookies
CREATE TABLE moz_cookies (id INTEGER PRIMARY KEY, baseDomain TEXT, appId INTEGER DEFAULT 0, inBrowserElement INTEGER DEFAULT 0, name TEXT, value TEXT, host TEXT, path TEXT, expiry INTEGER, lastAccessed INTEGER, creationTime INTEGER, isSecure INTEGER, isHttpOnly INTEGER, CONSTRAINT moz_uniqueid UNIQUE (name, host, path, appId, inBrowserElement));
CREATE INDEX moz_basedomain ON moz_cookies (baseDomain, appId, inBrowserElement);

4、显示表内的数据条目:
sqlite> .mode line
以上这句表示输出表项的显示模式为每一个字段一行的模式进行显示;
以下语句将输出类似于以下内容的表项条目:
sqlite> select * from moz_cookies;
              id = 10
      baseDomain = bing.com
           appId = 0
inBrowserElement = 0
            name = SRCHUID
           value = V=2&GUID=AC1BDDF445C84528931CF2960245B9A9
            host = cn.bing.com
            path = /
          expiry = 1466758101
    lastAccessed = 1404991858781769
    creationTime = 1403686100491716
        isSecure = 0
      isHttpOnly = 0

              id = 11
      baseDomain = bing.com
           appId = 0
inBrowserElement = 0
            name = SRCHUSR
           value = AUTOREDIR=0&GEOVAR=&DOB=20140624
            host = .bing.com
            path = /
          expiry = 1466758101
    lastAccessed = 1404991858781769
    creationTime = 1403686100493026
        isSecure = 0
      isHttpOnly = 0

refer:
http://sqlite.org/about.html

 

posted on 2019-06-19 19:08  瓦楞球  阅读(1352)  评论(0编辑  收藏  举报