[sqlite] Verifying a file is valid SQLite3

2014-11-16 Thread RSmith
Could someone kindly tell me the byte-pattern, offset and length into an SQLite3 file that might suffice to verify that it is indeed 
an SQLite3 file.


I am not very concerned with false positives (as nobody can control all the files in the World), but rather interested in absolute 
negatives, i.e. if you do not find these exact bytes as this exact offset, then it definitely isn't an SQLite3 file.


If this is documented somewhere, a link would suffice - thanks!




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Verifying a file is valid SQLite3

2014-11-16 Thread RSmith

Nvm - found it - thanks.

It seems the SQlite search engine is better than the Google one - Page ref (in 
case anyone else is interested):
https://www.sqlite.org/fileformat2.html#database_header
Specifically point 1.2.1


On 2014/11/16 15:03, RSmith wrote:
Could someone kindly tell me the byte-pattern, offset and length into an SQLite3 file that might suffice to verify that it is 
indeed an SQLite3 file.


I am not very concerned with false positives (as nobody can control all the files in the World), but rather interested in absolute 
negatives, i.e. if you do not find these exact bytes as this exact offset, then it definitely isn't an SQLite3 file.


If this is documented somewhere, a link would suffice - thanks!




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Verifying a file is valid SQLite3

2014-11-16 Thread J Decker
OOC I searched 'sqlite file format' and found...
http://www.sqlite.org/fileformat.html
testing the first string bytes will be enough... it's enough for png,
etc...
can validate thate page lengths vs the real length, which is what sqlite
uses to determine 'CORRUPT' plus some...

On Sun, Nov 16, 2014 at 5:03 AM, RSmith rsm...@rsweb.co.za wrote:

 Could someone kindly tell me the byte-pattern, offset and length into an
 SQLite3 file that might suffice to verify that it is indeed an SQLite3 file.

 I am not very concerned with false positives (as nobody can control all
 the files in the World), but rather interested in absolute negatives, i.e.
 if you do not find these exact bytes as this exact offset, then it
 definitely isn't an SQLite3 file.

 If this is documented somewhere, a link would suffice - thanks!




 ___
 sqlite-users mailing list
 sqlite-users@sqlite.org
 http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users