0x01.安装Sqlcipher
Ubuntu下使用SQLCipher命令行对db加密
windows下的安装步骤忽略
自行搜索
0x02.解密数据库
通过sqlcipher打开加密数据库,解密后就可以直接通过SQL语句操作数据库.
➜ sqlcipher-master ./sqlcipher z-cipher.db
SQLCipher version 3.20.1 2017-08-24 16:21:36
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> PRAGMA key = 'xxxxxx';
sqlite> SELECT count(*) FROM sqlite_master;
Error: file is not a database
sqlite> PRAGMA cipher_page_size = 4096;
sqlite> SELECT count(*) FROM sqlite_master;
3
sqlite> .tables
_USER_ android_metadata
sqlite> SELECT count(*) FROM _USER_;
80
sqlite> ATTACH DATABASE &