diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1aef0a..1c0f60a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/class_parser.py b/class_parser.py index 46ca794..cd130a5 100644 --- a/class_parser.py +++ b/class_parser.py @@ -225,7 +225,7 @@ DEBUG = False # The pytsk3 version. -VERSION = "20260702" +VERSION = "20260715" # These functions are used to manage library memory. FREE = "aff4_free" diff --git a/dpkg/changelog b/dpkg/changelog index 6831bcd..0e0771a 100644 --- a/dpkg/changelog +++ b/dpkg/changelog @@ -1,5 +1,5 @@ -pytsk3 (20260702-1) unstable; urgency=low +pytsk3 (20260715-1) unstable; urgency=low * Auto-generated - -- Joachim Metz Thu, 02 Jul 2026 11:29:06 -0100 + -- Joachim Metz Wed, 15 Jul 2026 10:47:20 -0100 diff --git a/pyproject.toml b/pyproject.toml index fd308fc..a6fd8a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" }, diff --git a/tsk3.cpp b/tsk3.cpp index 95e55ef..442654c 100644 --- a/tsk3.cpp +++ b/tsk3.cpp @@ -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."); @@ -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 @@ -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; diff --git a/tsk3.h b/tsk3.h index 809cfe2..305623b 100644 --- a/tsk3.h +++ b/tsk3.h @@ -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);