Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
strategy:
matrix:
python-version: ['3.14', '3.14t']
architecture: ['x86', 'x64']
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion class_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
DEBUG = False

# The pytsk3 version.
VERSION = "20260702"
VERSION = "20260715"

# These functions are used to manage library memory.
FREE = "aff4_free"
Expand Down
4 changes: 2 additions & 2 deletions dpkg/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytsk3 (20260702-1) unstable; urgency=low
pytsk3 (20260715-1) unstable; urgency=low

* Auto-generated

-- Joachim Metz <joachim.metz@gmail.com> Thu, 02 Jul 2026 11:29:06 -0100
-- Joachim Metz <joachim.metz@gmail.com> Wed, 15 Jul 2026 10:47:20 -0100
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 = "pytsk3"
version = "20260702"
version = "20260715"
description = "Python bindings for the SleuthKit"
authors = [
{ name = "Michael Cohen", email = "scudette@gmail.com" },
Expand Down
11 changes: 6 additions & 5 deletions tsk3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static int Img_Info_dest(Img_Info self) {

/* Img_Info constructor
*/
static Img_Info Img_Info_Con(Img_Info self, char *urn, TSK_IMG_TYPE_ENUM type) {
static Img_Info Img_Info_Con(Img_Info self, char *urn, TSK_IMG_TYPE_ENUM type, unsigned int sector_size) {

if(self == NULL) {
RaiseError(EInvalidParameter, "Invalid parameter: self.");
Expand All @@ -110,7 +110,7 @@ static Img_Info Img_Info_Con(Img_Info self, char *urn, TSK_IMG_TYPE_ENUM type) {

if(urn != NULL && urn[0] != 0) {
#ifdef TSK_VERSION_NUM
self->img = (Extended_TSK_IMG_INFO *) tsk_img_open_utf8(1, (const char **) &urn, type, 0);
self->img = (Extended_TSK_IMG_INFO *) tsk_img_open_utf8(1, (const char **) &urn, type, sector_size);
#else
self->img = (Extended_TSK_IMG_INFO *) tsk_img_open_utf8(1, (const char **) &urn, type);
#endif
Expand All @@ -129,19 +129,20 @@ static Img_Info Img_Info_Con(Img_Info self, char *urn, TSK_IMG_TYPE_ENUM type) {
RaiseError(ENoMemory, "Unable to allocate image.");
return NULL;
}

self->img->container = self;

#if defined( TSK_MULTITHREAD_LIB )
tsk_init_lock(&(self->img->base.cache_lock));
#endif

self->img->base.read = IMG_INFO_read;
self->img->base.close = IMG_INFO_close;
self->img->base.size = CALL(self, get_size);

#ifdef TSK_VERSION_NUM
self->img->base.sector_size = 512;
if( sector_size == 0 ) {
sector_size = 512;
}
self->img->base.sector_size = sector_size;
#endif
#if defined( TSK_VERSION_NUM ) && ( TSK_VERSION_NUM >= 0x040103ff )
self->img->base.itype = TSK_IMG_TYPE_EXTERNAL;
Expand Down
3 changes: 2 additions & 1 deletion tsk3.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ CCLASS(Img_Info, Object)

/* Open an image using the Sleuthkit.
*
* DEFAULT(sector_size) = 0;
* DEFAULT(type) = TSK_IMG_TYPE_DETECT;
* DEFAULT(url) = "";
*/
Img_Info METHOD(Img_Info, Con, ZString url, TSK_IMG_TYPE_ENUM type);
Img_Info METHOD(Img_Info, Con, ZString url, TSK_IMG_TYPE_ENUM type, unsigned int sector_size);

/* Read a random buffer from the image */
uint64_t METHOD(Img_Info, read, TSK_OFF_T off, OUT char *buf, size_t len);
Expand Down
Loading