leechcorepyc 2.16.0__tar.gz → 2.16.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {leechcorepyc-2.16.0/leechcorepyc.egg-info → leechcorepyc-2.16.2}/PKG-INFO +1 -1
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/includes/leechcore.h +8 -7
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/Makefile +1 -1
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_fpga.c +29 -8
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechcore.h +8 -7
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechrpc_c.c +44 -24
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechrpc_h.h +3 -3
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/version.h +2 -2
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/version.h +3 -3
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcorepyc/__init__.py +4 -4
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcorepyc.c +1 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2/leechcorepyc.egg-info}/PKG-INFO +1 -1
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/setup.py +1 -1
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/MANIFEST.in +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/Makefile +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/README +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/files/dummy +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/includes/leechcore_device.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/includes/libpdbcrust.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/includes/vmmdll.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/includes/vmmyara.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_file.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_pmem.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_tmd.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_usb3380.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_vmm.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/device_vmware.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechcore.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechcore.rc +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechcore_device.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechcore_internal.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechrpc.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechrpc.idl +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechrpcclient.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/leechrpcshared.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/memmap.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/ob/ob.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/ob/ob_bytequeue.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/ob/ob_core.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/ob/ob_map.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/ob/ob_set.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/oscompatibility.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/oscompatibility.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/util.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore/util.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/Makefile +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/leechcore_device_rawtcp.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/oscompatibility.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/oscompatibility.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/plugin.rc +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/resource.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_ft601_driver_linux/Makefile +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_ft601_driver_linux/fpga_libusb.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_ft601_driver_linux/fpga_libusb.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_ft601_driver_linux/leechcore_ft601_driver_linux.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_ft601_driver_linux/leechcore_ft601_driver_linux.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcorepyc.egg-info/SOURCES.txt +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcorepyc.egg-info/dependency_links.txt +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcorepyc.egg-info/top_level.txt +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcorepyc_barrequest.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/oscompatibility.c +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/oscompatibility.h +0 -0
- {leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/setup.cfg +0 -0
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// (c) Ulf Frisk, 2020-2023
|
|
15
15
|
// Author: Ulf Frisk, pcileech@frizk.net
|
|
16
16
|
//
|
|
17
|
-
// Header Version: 2.16
|
|
17
|
+
// Header Version: 2.16.1
|
|
18
18
|
//
|
|
19
19
|
|
|
20
20
|
#ifndef __LEECHCORE_H__
|
|
@@ -437,12 +437,11 @@ BOOL LcCommand(
|
|
|
437
437
|
#define LC_CMD_FPGA_TLP_CONTEXT_RD 0x2000011b00000000 // R - get TLP user-defined context to be passed to callback function. [not remote].
|
|
438
438
|
#define LC_CMD_FPGA_TLP_FUNCTION_CALLBACK 0x2000011500000000 // W - set/unset TLP callback function (pbDataIn == PLC_TLP_CALLBACK). [not remote].
|
|
439
439
|
#define LC_CMD_FPGA_TLP_FUNCTION_CALLBACK_RD 0x2000011c00000000 // R - get TLP callback function. [not remote].
|
|
440
|
-
#define LC_CMD_FPGA_BAR_CONTEXT
|
|
441
|
-
#define LC_CMD_FPGA_BAR_CONTEXT_RD
|
|
442
|
-
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK
|
|
443
|
-
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD
|
|
444
|
-
#define LC_CMD_FPGA_BAR_INFO
|
|
445
|
-
|
|
440
|
+
#define LC_CMD_FPGA_BAR_CONTEXT 0x2000012000000000 // W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote].
|
|
441
|
+
#define LC_CMD_FPGA_BAR_CONTEXT_RD 0x2000012100000000 // R - get BAR user-defined context to be passed to callback function. [not remote].
|
|
442
|
+
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK 0x2000012200000000 // W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote].
|
|
443
|
+
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD 0x2000012300000000 // R - get BAR callback function. [not remote].
|
|
444
|
+
#define LC_CMD_FPGA_BAR_INFO 0x0000012400000000 // R - get BAR info (pbDataOut == LC_BAR_INFO[6]).
|
|
446
445
|
|
|
447
446
|
#define LC_CMD_FILE_DUMPHEADER_GET 0x0000020100000000 // R
|
|
448
447
|
|
|
@@ -572,8 +571,10 @@ typedef VOID(*PLC_TLP_FUNCTION_CALLBACK)(
|
|
|
572
571
|
|
|
573
572
|
typedef struct tdLC_BAR {
|
|
574
573
|
BOOL fValid;
|
|
574
|
+
BOOL fIO;
|
|
575
575
|
BOOL f64Bit;
|
|
576
576
|
BOOL fPrefetchable;
|
|
577
|
+
DWORD _Filler[3];
|
|
577
578
|
DWORD iBar;
|
|
578
579
|
QWORD pa;
|
|
579
580
|
QWORD cb;
|
|
@@ -6,7 +6,7 @@ CFLAGS += -I. -D LINUX -D _GNU_SOURCE -shared -fPIC -fvisibility=hidden -pthrea
|
|
|
6
6
|
# CFLAGS += -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=bounds-strict -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
|
|
7
7
|
# CFLAGS += -fsanitize=pointer-compare -fsanitize=pointer-subtract -fanalyzer
|
|
8
8
|
# DEBUG FLAGS ABOVE
|
|
9
|
-
CFLAGS += -fPIE -fPIC -pie -fstack-protector -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,noexecstack
|
|
9
|
+
CFLAGS += -fPIE -fPIC -pie -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,noexecstack
|
|
10
10
|
CFLAGS += -Wall -Wno-multichar -Wno-unused-result -Wno-unused-variable -Wno-unused-value -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
|
|
11
11
|
LDFLAGS += -g -ldl -shared
|
|
12
12
|
DEPS = leechcore.h
|
|
@@ -1855,6 +1855,19 @@ BOOL DeviceFPGA_Bar_Initialize(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA
|
|
|
1855
1855
|
pBar = &ctx->tlp_callback.Bar[i];
|
|
1856
1856
|
pBar->iBar = (DWORD)i;
|
|
1857
1857
|
dwBarSize = *(PDWORD)(pbDRP + 14 + i * 4);
|
|
1858
|
+
// IO BAR: IO BARs are not memory mapped and are treated differently here:
|
|
1859
|
+
if(dwBarSize & 1) {
|
|
1860
|
+
pBar->fIO = TRUE;
|
|
1861
|
+
pBar->pa = *(PDWORD)(pbBAR + i * 4) - 1;
|
|
1862
|
+
dwBarSize = ((dwBarSize & ~0x01) ^ 0xFFFFFFFF) + 1;
|
|
1863
|
+
pBar->cb = dwBarSize;
|
|
1864
|
+
if(!pBar->pa || !pBar->cb) { continue; }
|
|
1865
|
+
if((pBar->pa >= 0x10000) || (pBar->cb >= 0x10000)) { return FALSE; } // IO BARs must be < 64KB in size and address
|
|
1866
|
+
pBar->fValid = TRUE;
|
|
1867
|
+
fBAR = TRUE;
|
|
1868
|
+
continue;
|
|
1869
|
+
}
|
|
1870
|
+
// Memory BAR:
|
|
1858
1871
|
if(dwBarSize & 8) {
|
|
1859
1872
|
if(i % 2) { return FALSE; } // 64-bit prefetchable BARs not allowed in odd BARs
|
|
1860
1873
|
pBar->fPrefetchable = TRUE;
|
|
@@ -1867,7 +1880,7 @@ BOOL DeviceFPGA_Bar_Initialize(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA
|
|
|
1867
1880
|
if(qwBarSize >= 0x8000000000000000) { return FALSE; } // BAR too large.
|
|
1868
1881
|
pBar->cb = qwBarSize;
|
|
1869
1882
|
} else {
|
|
1870
|
-
dwBarSize = *(
|
|
1883
|
+
dwBarSize = *(PDWORD)(pbDRP + 14 + i * 4) & ~0xF;
|
|
1871
1884
|
dwBarSize = (dwBarSize ^ 0xFFFFFFFF) + 1;
|
|
1872
1885
|
if(dwBarSize >= 0x80000000) { return FALSE; } // BAR too large.
|
|
1873
1886
|
pBar->cb = dwBarSize;
|
|
@@ -1959,7 +1972,7 @@ VOID DeviceFPGA_Bar_RxTlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx,
|
|
|
1959
1972
|
PTLP_HDR_MRdWr32 hdrM32 = (PTLP_HDR_MRdWr32)hdrDwBuf;
|
|
1960
1973
|
PTLP_HDR_MRdWr64 hdrM64 = (PTLP_HDR_MRdWr64)hdrDwBuf;
|
|
1961
1974
|
// 1: initial checks and header parse:
|
|
1962
|
-
if((cbTlp < 12) || (pbTlp[0] &
|
|
1975
|
+
if((cbTlp < 12) || (pbTlp[0] & 0x9c) || (cbTlp & 3)) { return; } // TLP fast fail if not MRd/MWr/IORd/IOWr
|
|
1963
1976
|
hdrDwBuf[0] = _byteswap_ulong(*(PDWORD)(pbTlp + 0));
|
|
1964
1977
|
hdrDwBuf[1] = _byteswap_ulong(*(PDWORD)(pbTlp + 4));
|
|
1965
1978
|
hdrDwBuf[2] = _byteswap_ulong(*(PDWORD)(pbTlp + 8));
|
|
@@ -1972,12 +1985,13 @@ VOID DeviceFPGA_Bar_RxTlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx,
|
|
|
1972
1985
|
rq.bTag = hdrM32->Tag;
|
|
1973
1986
|
rq.bFirstBE = hdrM32->FirstBE;
|
|
1974
1987
|
rq.bLastBE = hdrM32->LastBE;
|
|
1975
|
-
rq.f64 = (hdr->TypeFmt == TLP_MRd64) || (hdr->TypeFmt == TLP_MWr64);
|
|
1976
|
-
rq.fRead = (hdr->TypeFmt == TLP_MRd32) || (hdr->TypeFmt == TLP_MRd64);
|
|
1988
|
+
rq.f64 = (hdr->TypeFmt == TLP_MRd64) || (hdr->TypeFmt == TLP_MWr64) || (hdr->TypeFmt == TLP_IOWr);
|
|
1989
|
+
rq.fRead = (hdr->TypeFmt == TLP_MRd32) || (hdr->TypeFmt == TLP_MRd64) || (hdr->TypeFmt == TLP_IORd);
|
|
1977
1990
|
rq.fReadReply = FALSE;
|
|
1978
1991
|
rq.fWrite = !rq.fRead;
|
|
1979
1992
|
// 3: specific TLP type handling:
|
|
1980
1993
|
switch(hdr->TypeFmt) {
|
|
1994
|
+
case TLP_IORd:
|
|
1981
1995
|
case TLP_MRd32:
|
|
1982
1996
|
qwTlpAddr = hdrM32->Address & ~3;
|
|
1983
1997
|
qwTlpSize = hdr->Length ? (hdr->Length << 2) : 0x1000;
|
|
@@ -1987,6 +2001,7 @@ VOID DeviceFPGA_Bar_RxTlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx,
|
|
|
1987
2001
|
qwTlpAddr = ((QWORD)hdrM64->AddressHigh << 32) + (hdrM64->AddressLow & ~3);
|
|
1988
2002
|
qwTlpSize = hdr->Length ? (hdr->Length << 2) : 0x1000;
|
|
1989
2003
|
break;
|
|
2004
|
+
case TLP_IOWr:
|
|
1990
2005
|
case TLP_MWr32:
|
|
1991
2006
|
qwTlpAddr = hdrM32->Address & ~3;
|
|
1992
2007
|
qwTlpSize = hdr->Length ? (hdr->Length << 2) : 0x1000;
|
|
@@ -2024,7 +2039,7 @@ VOID DeviceFPGA_Bar_RxTlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx,
|
|
|
2024
2039
|
ctx->tlp_callback.pfnBarCB(&rq);
|
|
2025
2040
|
}
|
|
2026
2041
|
// 6: if read, send reply:
|
|
2027
|
-
if((hdr->TypeFmt == TLP_MRd32) || (hdr->TypeFmt == TLP_MRd64)) {
|
|
2042
|
+
if((hdr->TypeFmt == TLP_MRd32) || (hdr->TypeFmt == TLP_MRd64) || (hdr->TypeFmt == TLP_IORd)) {
|
|
2028
2043
|
DeviceFPGA_Bar_TxTlp(ctxLC, ctx, hdrM32, &rq);
|
|
2029
2044
|
}
|
|
2030
2045
|
}
|
|
@@ -2369,7 +2384,11 @@ VOID DeviceFPGA_Async2_Read_RxTlpSingle_MRdCpl(_In_ PLC_CONTEXT ctxLC, _In_ PDEV
|
|
|
2369
2384
|
}
|
|
2370
2385
|
// CplD:
|
|
2371
2386
|
c = (hdr->Length << 2);
|
|
2372
|
-
|
|
2387
|
+
if(pTag->oMEM) {
|
|
2388
|
+
o = pTag->oMEM + hdrC->LowerAddress;
|
|
2389
|
+
} else {
|
|
2390
|
+
o = hdrC->LowerAddress - (pTag->pMEM->qwA & 0x7f);
|
|
2391
|
+
}
|
|
2373
2392
|
if(o > 0xfffc) {
|
|
2374
2393
|
cbAdjust = 0x10000 - o;
|
|
2375
2394
|
c -= cbAdjust;
|
|
@@ -2451,7 +2470,9 @@ DWORD DeviceFPGA_Async2_Read_RxTlpSingle(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CO
|
|
|
2451
2470
|
if(ctxLC->fPrintf[LC_PRINTF_VVV]) {
|
|
2452
2471
|
TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
|
|
2453
2472
|
}
|
|
2454
|
-
|
|
2473
|
+
if(ctx->tlp_callback.pBqRx) {
|
|
2474
|
+
ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
|
|
2475
|
+
}
|
|
2455
2476
|
DeviceFPGA_Async2_Read_RxTlpSingle_MRdCpl(ctxLC, ctx, pbTlp, cdwTlp << 2);
|
|
2456
2477
|
pdwData[iStartWord] = pdwData[iStartWord] | (0xffffffff >> (28 - (j << 2)));
|
|
2457
2478
|
return iStartWord;
|
|
@@ -2617,7 +2638,7 @@ PFPGA_NEWASYNC2_MEM_CONTEXT DeviceFPGA_Async2_Read_TxTlp(_In_ PLC_CONTEXT ctxLC,
|
|
|
2617
2638
|
// Ensure enough tags and byte credits are available:
|
|
2618
2639
|
if(fPrimary) {
|
|
2619
2640
|
if(ctx->async2.cbAvailCredits < 0x1000) { break; }
|
|
2620
|
-
if(ctx->fAlgorithmReadTiny) {
|
|
2641
|
+
if(ctx->fAlgorithmReadTiny || (pMEM->cb != 0x1000)) {
|
|
2621
2642
|
if(ctx->async2.cAvailTags < 32) { break; }
|
|
2622
2643
|
} else {
|
|
2623
2644
|
if(ctx->async2.cAvailTags == 0) { break; }
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// (c) Ulf Frisk, 2020-2023
|
|
15
15
|
// Author: Ulf Frisk, pcileech@frizk.net
|
|
16
16
|
//
|
|
17
|
-
// Header Version: 2.16
|
|
17
|
+
// Header Version: 2.16.1
|
|
18
18
|
//
|
|
19
19
|
|
|
20
20
|
#ifndef __LEECHCORE_H__
|
|
@@ -437,12 +437,11 @@ BOOL LcCommand(
|
|
|
437
437
|
#define LC_CMD_FPGA_TLP_CONTEXT_RD 0x2000011b00000000 // R - get TLP user-defined context to be passed to callback function. [not remote].
|
|
438
438
|
#define LC_CMD_FPGA_TLP_FUNCTION_CALLBACK 0x2000011500000000 // W - set/unset TLP callback function (pbDataIn == PLC_TLP_CALLBACK). [not remote].
|
|
439
439
|
#define LC_CMD_FPGA_TLP_FUNCTION_CALLBACK_RD 0x2000011c00000000 // R - get TLP callback function. [not remote].
|
|
440
|
-
#define LC_CMD_FPGA_BAR_CONTEXT
|
|
441
|
-
#define LC_CMD_FPGA_BAR_CONTEXT_RD
|
|
442
|
-
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK
|
|
443
|
-
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD
|
|
444
|
-
#define LC_CMD_FPGA_BAR_INFO
|
|
445
|
-
|
|
440
|
+
#define LC_CMD_FPGA_BAR_CONTEXT 0x2000012000000000 // W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote].
|
|
441
|
+
#define LC_CMD_FPGA_BAR_CONTEXT_RD 0x2000012100000000 // R - get BAR user-defined context to be passed to callback function. [not remote].
|
|
442
|
+
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK 0x2000012200000000 // W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote].
|
|
443
|
+
#define LC_CMD_FPGA_BAR_FUNCTION_CALLBACK_RD 0x2000012300000000 // R - get BAR callback function. [not remote].
|
|
444
|
+
#define LC_CMD_FPGA_BAR_INFO 0x0000012400000000 // R - get BAR info (pbDataOut == LC_BAR_INFO[6]).
|
|
446
445
|
|
|
447
446
|
#define LC_CMD_FILE_DUMPHEADER_GET 0x0000020100000000 // R
|
|
448
447
|
|
|
@@ -572,8 +571,10 @@ typedef VOID(*PLC_TLP_FUNCTION_CALLBACK)(
|
|
|
572
571
|
|
|
573
572
|
typedef struct tdLC_BAR {
|
|
574
573
|
BOOL fValid;
|
|
574
|
+
BOOL fIO;
|
|
575
575
|
BOOL f64Bit;
|
|
576
576
|
BOOL fPrefetchable;
|
|
577
|
+
DWORD _Filler[3];
|
|
577
578
|
DWORD iBar;
|
|
578
579
|
QWORD pa;
|
|
579
580
|
QWORD cb;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
/* this ALWAYS GENERATED file contains the RPC client stubs */
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
/* File created by MIDL compiler version 8.01.
|
|
6
|
+
/* File created by MIDL compiler version 8.01.0628 */
|
|
7
7
|
/* at Tue Jan 19 04:14:07 2038
|
|
8
8
|
*/
|
|
9
9
|
/* Compiler settings for leechrpc.idl:
|
|
10
|
-
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.
|
|
10
|
+
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.0628
|
|
11
11
|
protocol : all , ms_ext, c_ext, robust
|
|
12
12
|
error checks: allocation ref bounds_check enum stub_data
|
|
13
13
|
VC __declspec() decoration level:
|
|
@@ -56,46 +56,46 @@ typedef struct _leechrpc_MIDL_EXPR_FORMAT_STRING
|
|
|
56
56
|
} leechrpc_MIDL_EXPR_FORMAT_STRING;
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
static const RPC_SYNTAX_IDENTIFIER
|
|
59
|
+
static const RPC_SYNTAX_IDENTIFIER _RpcTransferSyntax_2_0 =
|
|
60
60
|
{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}};
|
|
61
61
|
|
|
62
|
-
static const RPC_SYNTAX_IDENTIFIER
|
|
62
|
+
static const RPC_SYNTAX_IDENTIFIER _NDR64_RpcTransferSyntax_1_0 =
|
|
63
63
|
{{0x71710533,0xbeba,0x4937,{0x83,0x19,0xb5,0xdb,0xef,0x9c,0xcc,0x36}},{1,0}};
|
|
64
64
|
|
|
65
65
|
#if defined(_CONTROL_FLOW_GUARD_XFG)
|
|
66
66
|
#define XFG_TRAMPOLINES(ObjectType)\
|
|
67
|
-
|
|
67
|
+
NDR_SHAREABLE unsigned long ObjectType ## _UserSize_XFG(unsigned long * pFlags, unsigned long Offset, void * pObject)\
|
|
68
68
|
{\
|
|
69
|
-
return ObjectType ## _UserSize(pFlags, Offset, pObject);\
|
|
69
|
+
return ObjectType ## _UserSize(pFlags, Offset, (ObjectType *)pObject);\
|
|
70
70
|
}\
|
|
71
|
-
|
|
71
|
+
NDR_SHAREABLE unsigned char * ObjectType ## _UserMarshal_XFG(unsigned long * pFlags, unsigned char * pBuffer, void * pObject)\
|
|
72
72
|
{\
|
|
73
|
-
return ObjectType ## _UserMarshal(pFlags, pBuffer, pObject);\
|
|
73
|
+
return ObjectType ## _UserMarshal(pFlags, pBuffer, (ObjectType *)pObject);\
|
|
74
74
|
}\
|
|
75
|
-
|
|
75
|
+
NDR_SHAREABLE unsigned char * ObjectType ## _UserUnmarshal_XFG(unsigned long * pFlags, unsigned char * pBuffer, void * pObject)\
|
|
76
76
|
{\
|
|
77
|
-
return ObjectType ## _UserUnmarshal(pFlags, pBuffer, pObject);\
|
|
77
|
+
return ObjectType ## _UserUnmarshal(pFlags, pBuffer, (ObjectType *)pObject);\
|
|
78
78
|
}\
|
|
79
|
-
|
|
79
|
+
NDR_SHAREABLE void ObjectType ## _UserFree_XFG(unsigned long * pFlags, void * pObject)\
|
|
80
80
|
{\
|
|
81
|
-
ObjectType ## _UserFree(pFlags, pObject);\
|
|
81
|
+
ObjectType ## _UserFree(pFlags, (ObjectType *)pObject);\
|
|
82
82
|
}
|
|
83
83
|
#define XFG_TRAMPOLINES64(ObjectType)\
|
|
84
|
-
|
|
84
|
+
NDR_SHAREABLE unsigned long ObjectType ## _UserSize64_XFG(unsigned long * pFlags, unsigned long Offset, void * pObject)\
|
|
85
85
|
{\
|
|
86
|
-
return ObjectType ## _UserSize64(pFlags, Offset, pObject);\
|
|
86
|
+
return ObjectType ## _UserSize64(pFlags, Offset, (ObjectType *)pObject);\
|
|
87
87
|
}\
|
|
88
|
-
|
|
88
|
+
NDR_SHAREABLE unsigned char * ObjectType ## _UserMarshal64_XFG(unsigned long * pFlags, unsigned char * pBuffer, void * pObject)\
|
|
89
89
|
{\
|
|
90
|
-
return ObjectType ## _UserMarshal64(pFlags, pBuffer, pObject);\
|
|
90
|
+
return ObjectType ## _UserMarshal64(pFlags, pBuffer, (ObjectType *)pObject);\
|
|
91
91
|
}\
|
|
92
|
-
|
|
92
|
+
NDR_SHAREABLE unsigned char * ObjectType ## _UserUnmarshal64_XFG(unsigned long * pFlags, unsigned char * pBuffer, void * pObject)\
|
|
93
93
|
{\
|
|
94
|
-
return ObjectType ## _UserUnmarshal64(pFlags, pBuffer, pObject);\
|
|
94
|
+
return ObjectType ## _UserUnmarshal64(pFlags, pBuffer, (ObjectType *)pObject);\
|
|
95
95
|
}\
|
|
96
|
-
|
|
96
|
+
NDR_SHAREABLE void ObjectType ## _UserFree64_XFG(unsigned long * pFlags, void * pObject)\
|
|
97
97
|
{\
|
|
98
|
-
ObjectType ## _UserFree64(pFlags, pObject);\
|
|
98
|
+
ObjectType ## _UserFree64(pFlags, (ObjectType *)pObject);\
|
|
99
99
|
}
|
|
100
100
|
#define XFG_BIND_TRAMPOLINES(HandleType, ObjectType)\
|
|
101
101
|
static void* ObjectType ## _bind_XFG(HandleType pObject)\
|
|
@@ -107,11 +107,13 @@ static void ObjectType ## _unbind_XFG(HandleType pObject, handle_t ServerHandle)
|
|
|
107
107
|
ObjectType ## _unbind((ObjectType) pObject, ServerHandle);\
|
|
108
108
|
}
|
|
109
109
|
#define XFG_TRAMPOLINE_FPTR(Function) Function ## _XFG
|
|
110
|
+
#define XFG_TRAMPOLINE_FPTR_DEPENDENT_SYMBOL(Symbol) Symbol ## _XFG
|
|
110
111
|
#else
|
|
111
112
|
#define XFG_TRAMPOLINES(ObjectType)
|
|
112
113
|
#define XFG_TRAMPOLINES64(ObjectType)
|
|
113
114
|
#define XFG_BIND_TRAMPOLINES(HandleType, ObjectType)
|
|
114
115
|
#define XFG_TRAMPOLINE_FPTR(Function) Function
|
|
116
|
+
#define XFG_TRAMPOLINE_FPTR_DEPENDENT_SYMBOL(Symbol) Symbol
|
|
115
117
|
#endif
|
|
116
118
|
|
|
117
119
|
|
|
@@ -147,8 +149,14 @@ static const RPC_CLIENT_INTERFACE LeechRpc___RpcClientInterface =
|
|
|
147
149
|
0x02000000
|
|
148
150
|
};
|
|
149
151
|
RPC_IF_HANDLE LeechRpc_v1_0_c_ifspec = (RPC_IF_HANDLE)& LeechRpc___RpcClientInterface;
|
|
152
|
+
#ifdef __cplusplus
|
|
153
|
+
namespace {
|
|
154
|
+
#endif
|
|
150
155
|
|
|
151
156
|
extern const MIDL_STUB_DESC LeechRpc_StubDesc;
|
|
157
|
+
#ifdef __cplusplus
|
|
158
|
+
}
|
|
159
|
+
#endif
|
|
152
160
|
|
|
153
161
|
static RPC_BINDING_HANDLE LeechRpc__MIDL_AutoBindHandle;
|
|
154
162
|
|
|
@@ -307,11 +315,11 @@ static const unsigned short LeechRpc_FormatStringOffsetTable[] =
|
|
|
307
315
|
/* this ALWAYS GENERATED file contains the RPC client stubs */
|
|
308
316
|
|
|
309
317
|
|
|
310
|
-
/* File created by MIDL compiler version 8.01.
|
|
318
|
+
/* File created by MIDL compiler version 8.01.0628 */
|
|
311
319
|
/* at Tue Jan 19 04:14:07 2038
|
|
312
320
|
*/
|
|
313
321
|
/* Compiler settings for leechrpc.idl:
|
|
314
|
-
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.
|
|
322
|
+
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.0628
|
|
315
323
|
protocol : all , ms_ext, c_ext, robust
|
|
316
324
|
error checks: allocation ref bounds_check enum stub_data
|
|
317
325
|
VC __declspec() decoration level:
|
|
@@ -332,6 +340,9 @@ static const unsigned short LeechRpc_FormatStringOffsetTable[] =
|
|
|
332
340
|
|
|
333
341
|
#include "ndr64types.h"
|
|
334
342
|
#include "pshpack8.h"
|
|
343
|
+
#ifdef __cplusplus
|
|
344
|
+
namespace {
|
|
345
|
+
#endif
|
|
335
346
|
|
|
336
347
|
|
|
337
348
|
typedef
|
|
@@ -730,6 +741,9 @@ static const __midl_frag2_t __midl_frag2 =
|
|
|
730
741
|
|
|
731
742
|
static const __midl_frag1_t __midl_frag1 =
|
|
732
743
|
(NDR64_UINT32) 0 /* 0x0 */;
|
|
744
|
+
#ifdef __cplusplus
|
|
745
|
+
}
|
|
746
|
+
#endif
|
|
733
747
|
|
|
734
748
|
|
|
735
749
|
#include "poppack.h"
|
|
@@ -741,6 +755,9 @@ static const FormatInfoRef LeechRpc_Ndr64ProcTable[] =
|
|
|
741
755
|
};
|
|
742
756
|
|
|
743
757
|
|
|
758
|
+
#ifdef __cplusplus
|
|
759
|
+
namespace {
|
|
760
|
+
#endif
|
|
744
761
|
static const MIDL_STUB_DESC LeechRpc_StubDesc =
|
|
745
762
|
{
|
|
746
763
|
(void *)& LeechRpc___RpcClientInterface,
|
|
@@ -755,7 +772,7 @@ static const MIDL_STUB_DESC LeechRpc_StubDesc =
|
|
|
755
772
|
1, /* -error bounds_check flag */
|
|
756
773
|
0x60001, /* Ndr library version */
|
|
757
774
|
0,
|
|
758
|
-
|
|
775
|
+
0x8010274, /* MIDL Version 8.1.628 */
|
|
759
776
|
0,
|
|
760
777
|
0,
|
|
761
778
|
0, /* notify & notify_flag routine table */
|
|
@@ -764,6 +781,9 @@ static const MIDL_STUB_DESC LeechRpc_StubDesc =
|
|
|
764
781
|
(void *)& LeechRpc_ProxyInfo, /* proxy/server info */
|
|
765
782
|
0
|
|
766
783
|
};
|
|
784
|
+
#ifdef __cplusplus
|
|
785
|
+
}
|
|
786
|
+
#endif
|
|
767
787
|
|
|
768
788
|
static const MIDL_SYNTAX_INFO LeechRpc_SyntaxInfo [ 2 ] =
|
|
769
789
|
{
|
|
@@ -794,7 +814,7 @@ static const MIDL_STUBLESS_PROXY_INFO LeechRpc_ProxyInfo =
|
|
|
794
814
|
&LeechRpc_StubDesc,
|
|
795
815
|
leechrpc__MIDL_ProcFormatString.Format,
|
|
796
816
|
LeechRpc_FormatStringOffsetTable,
|
|
797
|
-
(RPC_SYNTAX_IDENTIFIER*)&
|
|
817
|
+
(RPC_SYNTAX_IDENTIFIER*)&_RpcTransferSyntax_2_0,
|
|
798
818
|
2,
|
|
799
819
|
(MIDL_SYNTAX_INFO*)LeechRpc_SyntaxInfo
|
|
800
820
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
/* File created by MIDL compiler version 8.01.
|
|
6
|
+
/* File created by MIDL compiler version 8.01.0628 */
|
|
7
7
|
/* at Tue Jan 19 04:14:07 2038
|
|
8
8
|
*/
|
|
9
9
|
/* Compiler settings for leechrpc.idl:
|
|
10
|
-
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.
|
|
10
|
+
Oicf, W1, Zp8, env=Win64 (32b run), target_arch=ARM64 8.01.0628
|
|
11
11
|
protocol : all , ms_ext, c_ext, robust
|
|
12
12
|
error checks: allocation ref bounds_check enum stub_data
|
|
13
13
|
VC __declspec() decoration level:
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
#endif
|
|
40
40
|
|
|
41
41
|
#ifndef DECLSPEC_XFGVIRT
|
|
42
|
-
#if _CONTROL_FLOW_GUARD_XFG
|
|
42
|
+
#if defined(_CONTROL_FLOW_GUARD_XFG)
|
|
43
43
|
#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
|
|
44
44
|
#else
|
|
45
45
|
#define DECLSPEC_XFGVIRT(base, func)
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#define VERSION_MAJOR 2
|
|
5
5
|
#define VERSION_MINOR 16
|
|
6
|
-
#define VERSION_REVISION
|
|
7
|
-
#define VERSION_BUILD
|
|
6
|
+
#define VERSION_REVISION 2
|
|
7
|
+
#define VERSION_BUILD 53
|
|
8
8
|
|
|
9
9
|
#define VER_FILE_DESCRIPTION_STR "LeechCore Memory Acquisition Library"
|
|
10
10
|
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
#endif
|
|
5
5
|
|
|
6
6
|
#define VERSION_MAJOR 2
|
|
7
|
-
#define VERSION_MINOR
|
|
8
|
-
#define VERSION_REVISION
|
|
9
|
-
#define VERSION_BUILD
|
|
7
|
+
#define VERSION_MINOR 16
|
|
8
|
+
#define VERSION_REVISION 1
|
|
9
|
+
#define VERSION_BUILD 52
|
|
10
10
|
|
|
11
11
|
#define VER_FILE_DESCRIPTION_STR "LeechCorePlugin : RAWTCP"
|
|
12
12
|
#define VER_FILE_VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION, VERSION_BUILD
|
|
@@ -67,10 +67,10 @@ LC_CMD_FPGA_TLP_TOSTRING = 0x0000011200000000 # RW - convert
|
|
|
67
67
|
LC_CMD_FPGA_TLP_CONTEXT = 0x2000011400000000 # W - set/unset TLP user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote].
|
|
68
68
|
LC_CMD_FPGA_TLP_CONTEXT_RD = 0x2000011b00000000 # R - get TLP user-defined context to be passed to callback function. [not remote].
|
|
69
69
|
LC_CMD_FPGA_TLP_FUNCTION_CALLBACK = 0x2000011500000000 # W - set/unset TLP callback function (pbDataIn == PLC_TLP_CALLBACK). [not remote].
|
|
70
|
-
LC_CMD_FPGA_BAR_CONTEXT =
|
|
71
|
-
LC_CMD_FPGA_BAR_CONTEXT_RD =
|
|
72
|
-
LC_CMD_FPGA_BAR_FUNCTION_CALLBACK =
|
|
73
|
-
LC_CMD_FPGA_BAR_INFO =
|
|
70
|
+
LC_CMD_FPGA_BAR_CONTEXT = 0x2000012000000000 # W - set/unset BAR user-defined context to be passed to callback function. (pbDataIn == LPVOID user context). [not remote].
|
|
71
|
+
LC_CMD_FPGA_BAR_CONTEXT_RD = 0x2000012100000000 # R - get BAR user-defined context to be passed to callback function. [not remote].
|
|
72
|
+
LC_CMD_FPGA_BAR_FUNCTION_CALLBACK = 0x2000012200000000 # W - set/unset BAR callback function (pbDataIn == PLC_BAR_CALLBACK). [not remote].
|
|
73
|
+
LC_CMD_FPGA_BAR_INFO = 0x0000012400000000 # R - get BAR info (pbDataOut == LC_BAR_INFO[6]).
|
|
74
74
|
LC_CMD_FILE_DUMPHEADER_GET = 0x0000020100000000 # R
|
|
75
75
|
LC_CMD_STATISTICS_GET = 0x4000010000000000 # R
|
|
76
76
|
LC_CMD_MEMMAP_GET = 0x4000020000000000 # R - MEMMAP as LPSTR
|
|
@@ -251,6 +251,7 @@ BOOL LcPy_BarInfoFetch(PyObj_LeechCore* self)
|
|
|
251
251
|
PyDict_SetItemString_DECREF(pyDictEntry, "i_bar", PyLong_FromUnsignedLongLong(pBarInfo[i].iBar));
|
|
252
252
|
PyDict_SetItemString_DECREF(pyDictEntry, "base", PyLong_FromUnsignedLongLong(pBarInfo[i].pa));
|
|
253
253
|
PyDict_SetItemString_DECREF(pyDictEntry, "size", PyLong_FromUnsignedLongLong(pBarInfo[i].cb));
|
|
254
|
+
PyDict_SetItemString_DECREF(pyDictEntry, "is_io", PyBool_FromLong((long)pBarInfo[i].fIO));
|
|
254
255
|
PyDict_SetItemString_DECREF(pyDictEntry, "is_64_bit", PyBool_FromLong((long)pBarInfo[i].f64Bit));
|
|
255
256
|
PyDict_SetItemString_DECREF(pyDictEntry, "is_prefetchable", PyBool_FromLong((long)pBarInfo[i].fPrefetchable));
|
|
256
257
|
PyList_Append(pyList, pyDictEntry);
|
|
@@ -19,7 +19,7 @@ leechcorepyc = Extension(
|
|
|
19
19
|
|
|
20
20
|
setup(
|
|
21
21
|
name='leechcorepyc',
|
|
22
|
-
version='2.16.
|
|
22
|
+
version='2.16.2', # VERSION_END
|
|
23
23
|
description='LeechCore for Python',
|
|
24
24
|
long_description='LeechCore for Python : native extension for physical memory access',
|
|
25
25
|
url='https://github.com/ufrisk/LeechCore',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{leechcorepyc-2.16.0 → leechcorepyc-2.16.2}/leechcore_device_rawtcp/leechcore_device_rawtcp.c
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|