dbfp_pub/docs/README_DEV_FINGERPRINT

111 lines
3.2 KiB
Plaintext

=========================
Fingerprint Design Doc
==========================
-----------------------
FINGERPRINT DESIGN
-----------------------
Fingerprint Naming Convention
Fully Qualified Domain App Name + "__" + database name + "__" + "dbfp.json"
--------------------------
JSON FINGERPRINT FORMAT
--------------------------
[ _file-details ]
contains information regarding how and where this fingerprint was created:
"app-name": name of the application, usually reverse dns is best identifier
"app-ver": version of the application at the time of this scan
"db-name": name of the database
"format-ver": fingerprint format version, this is helpful for major revisions
"notes": any notes to be included with this fingerprint
"scan-date": time stamp of the database scan and fingerprint creation
"scanner-name": name of the fingerprint scanner tool (to be future proof)
"scanner-ver": version of the fingerprint scanner tool used to create this fingerprint
[ db-metadata ]
contains the exact create table strings, most create table strings are unique
[ db-metadata-hashes ]
contains hashing of the create table stings
[ tables ]
each table schema in a normalized (hash table) data type
-------------
EXAMPLE
-------------
{
"_file-details": {
"app-name": "cm.confide.android",
"app-ver": "",
"db-name": "confide.db",
"format-ver": "0.92",
"notes": "",
"scan-date": "2016-02-29_161058",
"scanner-name": "dbfp",
"scanner-ver": "1.00b"
},
"db-metadata": {
"android_metadata": "CREATE TABLE android_metadata (locale TEXT)",
"contacts": "CREATE TABLE contacts ( _id INTEGER PRIMARY KEY AUTOINCREMENT, userId INTEGER, firstName TEXT, lastName TEXT, signupDate DATETIME, verified BOOLEAN, email TEXT, phone TEXT )",
"sqlite_sequence": "CREATE TABLE sqlite_sequence(name,seq)"
},
"db-metadata-hashes": {
"android_metadata": "ba739eb03730e563915f2f76b26ced51",
"contacts": "3aaf8eb3bc00f3cf562b368341d4b84f",
"sqlite_sequence": "079355c84d8b3b1511a504e08aab7fd2"
},
"db-metadata-md5": "6ae62dd33c30775996db15fb90d2f99f",
"tables": {
"android_metadata": {
"locale": {
"datatype": "TEXT"
}
},
"contacts": {
"_id": {
"autoincrement": true,
"datatype": "INTEGER",
"primarykey": true
},
"email": {
"datatype": "TEXT"
},
"firstName": {
"datatype": "TEXT"
},
"lastName": {
"datatype": "TEXT"
},
"phone": {
"datatype": "TEXT"
},
"signupDate": {
"datatype": "DATETIME"
},
"userId": {
"datatype": "INTEGER"
},
"verified": {
"datatype": "BOOLEAN"
}
},
"sqlite_sequence": {
"name": {
"datatype": "INTEGER"
},
"seq": {
"datatype": "INTEGER"
}
}
}
}