Version 2.22.8

This commit is contained in:
Ulf Frisk
2026-04-26 23:43:29 +02:00
parent 83809b42c3
commit 09b165091c
10 changed files with 20 additions and 15 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,8 +3,8 @@
#define VERSION_MAJOR 2
#define VERSION_MINOR 22
#define VERSION_REVISION 7
#define VERSION_BUILD 93
#define VERSION_REVISION 8
#define VERSION_BUILD 94
#define VER_FILE_DESCRIPTION_STR "LeechAgent Memory Acquisition Service"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD

View File

@@ -2129,9 +2129,12 @@ VOID DeviceFPGA_SynchOldAsync_RxTlpAsynchronous(_In_ PLC_CONTEXT ctxLC, _In_ PDE
/*
* Recover FTDI/FT601 RX path if FT_ReadPipe/FT_GetOverlappedResult reports
* FT_OTHER_ERROR. The normal TX path already recovers this by reopening the
* FTDI handle; async RX must also reset pending overlapped state and discard
* FT_OTHER_ERROR. Async RX must reset pending overlapped state and discard
* any partial receive buffer before the next read attempt.
* Should be called behind: ctx->Lock.
* -- ctx
* -- status
* -- return = TRUE if the connection was re-initialized, FALSE if not.
*/
static BOOL DeviceFPGA_FTDI_RxRecover(_In_ PDEVICE_CONTEXT_FPGA ctx, _In_ DWORD status)
{
@@ -2195,7 +2198,7 @@ BOOL DeviceFPGA_TxTlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx, _In
if((ctx->txbuf.cb >= ctx->perf.MAX_SIZE_TX) || (fFlush && ctx->txbuf.cb)) {
status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, ctx->txbuf.pb, ctx->txbuf.cb, &cbTxed, NULL);
if(status == FT_OTHER_ERROR) {
DeviceFPGA_ReInitializeFTDI(ctx); // try recovery if possible.
DeviceFPGA_FTDI_RxRecover(ctx, status); // try recovery if possible.
status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, ctx->txbuf.pb, ctx->txbuf.cb, &cbTxed, NULL);
}
ctx->txbuf.cb = 0;
@@ -2246,7 +2249,9 @@ BOOL DeviceFPGA_TxTlp_FastWrite_NoLock(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONT
if((ctx->txbuf_fastwrite.cb >= ctx->perf.MAX_SIZE_TX) || (fFlush && ctx->txbuf_fastwrite.cb)) {
status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, ctx->txbuf_fastwrite.pb, ctx->txbuf_fastwrite.cb, &cbTxed, NULL);
if(status == FT_OTHER_ERROR) {
DeviceFPGA_ReInitializeFTDI(ctx); // try recovery if possible.
EnterCriticalSection(&ctx->Lock);
DeviceFPGA_FTDI_RxRecover(ctx, status); // try recovery if possible.
LeaveCriticalSection(&ctx->Lock);
status = ctx->dev.pfnFT_WritePipe(ctx->dev.hFTDI, 0x02, ctx->txbuf_fastwrite.pb, ctx->txbuf_fastwrite.cb, &cbTxed, NULL);
}
ctx->txbuf_fastwrite.cb = 0;
@@ -2313,7 +2318,7 @@ VOID DeviceFPGA_Synch_RxTlpSynchronous(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONT
while(TRUE) {
// read data:
status = ctx->dev.pfnFT_ReadPipe(ctx->dev.hFTDI, 0x82, ctx->rxbuf.pb + ctx->rxbuf.cb, cbReadRxBuf - ctx->rxbuf.cb, &cbRx, NULL);
if(status == FT_OTHER_ERROR && ctx->perf.RETRY_ON_ERROR) {
if((status == FT_OTHER_ERROR) && ctx->perf.RETRY_ON_ERROR) {
DeviceFPGA_FTDI_RxRecover(ctx, status); // try recovery if possible.
status = ctx->dev.pfnFT_ReadPipe(ctx->dev.hFTDI, 0x82, ctx->rxbuf.pb + ctx->rxbuf.cb, ctx->rxbuf.cbMax - ctx->rxbuf.cb, &cbRx, NULL);
}

View File

@@ -1,4 +1,4 @@
// leechcore.c : core implementation of the the LeechCore physical memory acquisition library.
// leechcore.c : core implementation of the LeechCore physical memory acquisition library.
//
// (c) Ulf Frisk, 2020-2026
// Author: Ulf Frisk, pcileech@frizk.net

View File

@@ -14,7 +14,7 @@
// - such as decreasing reference count of sub-objects contained in the object
// that is to be deallocated.
//
// (c) Ulf Frisk, 2018-2025
// (c) Ulf Frisk, 2018-2026
// Author: Ulf Frisk, pcileech@frizk.net
//
#include "ob.h"
@@ -146,7 +146,7 @@ VOID Ob_XDECREF_NULL(_In_opt_ PVOID *ppOb)
BOOL Ob_VALID_TAG(_In_ PVOID pObIn, _In_ DWORD tag)
{
POB pOb = (POB)pObIn;
return pOb && (pOb->_magic2 == OB_HEADER_MAGIC) && (pOb->_magic1 == OB_HEADER_MAGIC) && (pOb->_tag = tag);
return pOb && (pOb->_magic2 == OB_HEADER_MAGIC) && (pOb->_magic1 == OB_HEADER_MAGIC) && (pOb->_tag == tag);
}
/*

View File

@@ -3,8 +3,8 @@
#define VERSION_MAJOR 2
#define VERSION_MINOR 22
#define VERSION_REVISION 7
#define VERSION_BUILD 93
#define VERSION_REVISION 8
#define VERSION_BUILD 94
#define VER_FILE_DESCRIPTION_STR "LeechCore Memory Acquisition Library"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD

View File

@@ -43,7 +43,7 @@ leechcorepyc = Extension(
setup(
name='leechcorepyc',
version='2.22.7', # VERSION_END
version='2.22.8', # VERSION_END
description='LeechCore for Python',
long_description='LeechCore for Python : native extension for physical memory access',
url='https://github.com/ufrisk/LeechCore',

View File

@@ -3,8 +3,8 @@
#define VERSION_MAJOR 2
#define VERSION_MINOR 22
#define VERSION_REVISION 7
#define VERSION_BUILD 93
#define VERSION_REVISION 8
#define VERSION_BUILD 94
#define VER_FILE_DESCRIPTION_STR "LeechCore Memory Acquisition Library : Python API"
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD