Skip to content

Add support for SQLite databases - #964

Open
clark-ja wants to merge 1 commit into
ReFirmLabs:masterfrom
clark-ja:sqlite-database
Open

clark-ja wants to merge 1 commit into
ReFirmLabs:masterfrom
clark-ja:sqlite-database

Conversation

@clark-ja

Copy link
Copy Markdown
Contributor

This PR is part of adding support back to previously supported formats (#829). Specifically, for SQlite v2 and v3 support.

A version 3 header is validated on a page size that is a power of two of at least 512 bytes, on read and write format versions that exist, and on the three payload fraction fields, which have fixed values that nothing else is likely to reproduce. The page count and page size give the size of the database, which is reported when the pages it describes are actually present: an older library may leave that count stale.

A version 2 database begins with a line of text and a binary header that is not documented anywhere reliable, so that one is reported on the text alone, with no size.

binwalk v2.3.4 matched both versions; the Rust rewrite has neither.

A version 3 header is validated on a page size that is a power of two of
at least 512 bytes, on read and write format versions that exist, and on
the three payload fraction fields, which have fixed values that nothing
else is likely to reproduce. The page count and page size give the size
of the database, which is reported when the pages it describes are
actually present: an older library may leave that count stale.

A version 2 database begins with a line of text and a binary header that
is not documented anywhere reliable, so that one is reported on the text
alone, with no size.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant