Skip to content

Commit

Permalink
Fixes and bump version to 20240301 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydp committed Mar 1, 2024
1 parent d154447 commit c96b8ab
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
run: >-
gh release create
'${{ github.ref_name }}'
--verify-tag
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
Expand Down
14 changes: 8 additions & 6 deletions dfindexeddb/indexeddb/chromium.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def FromStream(
The decoded key.
"""
decoder = utils.LevelDBDecoder(stream)
key_prefix = KeyPrefix.FromDecoder(decoder)
key_prefix = KeyPrefix.FromDecoder(decoder, base_offset=base_offset)
return cls.FromDecoder(
decoder=decoder, key_prefix=key_prefix, base_offset=base_offset)

Expand Down Expand Up @@ -1027,7 +1027,7 @@ def FromDecoder(
definitions.KeyPrefixType.OBJECT_STORE_DATA):
raise errors.ParserError('Invalid KeyPrefix for ObjectStoreDataKey')
offset = decoder.stream.tell()
encoded_user_key = IDBKey.FromDecoder(decoder, base_offset)
encoded_user_key = IDBKey.FromDecoder(decoder, offset)
return cls(
offset=base_offset + offset,
key_prefix=key_prefix, encoded_user_key=encoded_user_key)
Expand All @@ -1054,7 +1054,7 @@ def FromDecoder(
) -> ExistsEntryKey:
"""Decodes the exists entry key."""
offset = decoder.stream.tell()
encoded_user_key = IDBKey.FromDecoder(decoder, base_offset)
encoded_user_key = IDBKey.FromDecoder(decoder, offset)

return cls(
offset=base_offset + offset,
Expand Down Expand Up @@ -1085,15 +1085,17 @@ def FromDecoder(cls, decoder: utils.LevelDBDecoder, key_prefix: KeyPrefix,
base_offset: int = 0) -> IndexDataKey:
"""Decodes the index data key."""
offset = decoder.stream.tell()
encoded_user_key = IDBKey.FromDecoder(decoder, base_offset)
encoded_user_key = IDBKey.FromDecoder(decoder, offset)

if decoder.NumRemainingBytes() > 0:
_, sequence_number = decoder.DecodeVarint()
else:
sequence_number = None

if decoder.NumRemainingBytes() > 0:
encoded_primary_key = IDBKey.FromDecoder(decoder, base_offset)
encoded_primary_key_offset = decoder.stream.tell()
encoded_primary_key = IDBKey.FromDecoder(
decoder, encoded_primary_key_offset)
else:
encoded_primary_key = None

Expand Down Expand Up @@ -1126,7 +1128,7 @@ def FromDecoder(
) -> BlobEntryKey:
"""Decodes the blob entry key."""
offset = decoder.stream.tell()
user_key = IDBKey.FromDecoder(decoder, base_offset)
user_key = IDBKey.FromDecoder(decoder, offset)

return cls(key_prefix=key_prefix, user_key=user_key,
offset=base_offset + offset)
Expand Down
2 changes: 1 addition & 1 deletion dfindexeddb/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
"""Version information for dfIndexeddb."""

__version__ = "20240229"
__version__ = "20240301"


def GetVersion():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dfindexeddb"
version = "20240229"
version = "20240301"
requires-python = ">=3.8"
description = "dfindexeddb is an experimental Python tool for performing digital forensic analysis of IndexedDB and leveldb files."
license = {file = "LICENSE"}
Expand Down

0 comments on commit c96b8ab

Please sign in to comment.