leechcorepyc 2.19.0__tar.gz → 2.19.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.
Files changed (91) hide show
  1. {leechcorepyc-2.19.0/leechcorepyc.egg-info → leechcorepyc-2.19.2}/PKG-INFO +1 -1
  2. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_fpga.c +28 -6
  3. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/ob/ob_bytequeue.c +16 -12
  4. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/version.h +2 -2
  5. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2/leechcorepyc.egg-info}/PKG-INFO +1 -1
  6. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/setup.py +1 -1
  7. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/MANIFEST.in +0 -0
  8. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/Makefile +0 -0
  9. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/README +0 -0
  10. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/files/dummy +0 -0
  11. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/includes/leechcore.h +0 -0
  12. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/includes/leechcore_device.h +0 -0
  13. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/includes/libpdbcrust.h +0 -0
  14. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/includes/vmmdll.h +0 -0
  15. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/includes/vmmyara.h +0 -0
  16. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/Makefile +0 -0
  17. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_file.c +0 -0
  18. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_hibr.c +0 -0
  19. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_pmem.c +0 -0
  20. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_tmd.c +0 -0
  21. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_usb3380.c +0 -0
  22. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_vmm.c +0 -0
  23. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/device_vmware.c +0 -0
  24. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechcore.c +0 -0
  25. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechcore.h +0 -0
  26. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechcore.rc +0 -0
  27. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechcore_device.h +0 -0
  28. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechcore_internal.h +0 -0
  29. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechrpc.h +0 -0
  30. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechrpc.idl +0 -0
  31. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechrpc_c.c +0 -0
  32. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechrpc_h.h +0 -0
  33. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechrpcclient.c +0 -0
  34. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/leechrpcshared.c +0 -0
  35. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/memmap.c +0 -0
  36. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/ob/ob.h +0 -0
  37. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/ob/ob_core.c +0 -0
  38. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/ob/ob_map.c +0 -0
  39. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/ob/ob_set.c +0 -0
  40. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/oscompatibility.c +0 -0
  41. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/oscompatibility.h +0 -0
  42. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/util.c +0 -0
  43. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore/util.h +0 -0
  44. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_qemu/Makefile +0 -0
  45. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_qemu/leechcore_device_qemu.c +0 -0
  46. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/Makefile +0 -0
  47. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/leechcore_device_rawtcp.c +0 -0
  48. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/oscompatibility.c +0 -0
  49. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/oscompatibility.h +0 -0
  50. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/plugin.rc +0 -0
  51. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/resource.h +0 -0
  52. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_device_rawtcp/version.h +0 -0
  53. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/Makefile +0 -0
  54. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/fpga_libusb.c +0 -0
  55. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/fpga_libusb.h +0 -0
  56. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/leechcore_ft601_driver_linux.c +0 -0
  57. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcore_ft601_driver_linux/leechcore_ft601_driver_linux.h +0 -0
  58. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc/__init__.py +0 -0
  59. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc.c +0 -0
  60. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc.egg-info/SOURCES.txt +0 -0
  61. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc.egg-info/dependency_links.txt +0 -0
  62. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc.egg-info/top_level.txt +0 -0
  63. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc.h +0 -0
  64. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/leechcorepyc_barrequest.c +0 -0
  65. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/Makefile +0 -0
  66. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/lznt1.h +0 -0
  67. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/Array.h +0 -0
  68. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/Bitstream.h +0 -0
  69. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/CircularBuffer.h +0 -0
  70. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/HuffmanDecoder.h +0 -0
  71. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/HuffmanEncoder.h +0 -0
  72. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/LZNT1Dictionary.h +0 -0
  73. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/LZNT1Dictionary_SA.h +0 -0
  74. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/XpressDictionary.h +0 -0
  75. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/config.h +0 -0
  76. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/general.h +0 -0
  77. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/internal.h +0 -0
  78. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp/sorting.h +0 -0
  79. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/mscomp.h +0 -0
  80. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/xpress.h +0 -0
  81. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/include/xpress_huff.h +0 -0
  82. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/lznt1_compress.cpp +0 -0
  83. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/lznt1_decompress.cpp +0 -0
  84. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/mscomp.cpp +0 -0
  85. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/xpress_compress.cpp +0 -0
  86. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/xpress_decompress.cpp +0 -0
  87. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/xpress_huff_compress.cpp +0 -0
  88. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/ms-compress/src/xpress_huff_decompress.cpp +0 -0
  89. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/oscompatibility.c +0 -0
  90. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/oscompatibility.h +0 -0
  91. {leechcorepyc-2.19.0 → leechcorepyc-2.19.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: leechcorepyc
3
- Version: 2.19.0
3
+ Version: 2.19.2
4
4
  Summary: LeechCore for Python
5
5
  Home-page: https://github.com/ufrisk/LeechCore
6
6
  Author: Ulf Frisk
@@ -1850,9 +1850,15 @@ VOID DeviceFPGA_GetDeviceID_FpgaVersion(_In_ PDEVICE_CONTEXT_FPGA ctx)
1850
1850
  VOID DeviceFPGA_SetPerformanceProfile(_Inout_ PDEVICE_CONTEXT_FPGA ctx)
1851
1851
  {
1852
1852
  if((ctx->wFpgaID >= DEVICE_ID_DRIVER_SUPPLIED_0) && (ctx->wFpgaID <= DEVICE_ID_DRIVER_SUPPLIED_7)) {
1853
- if(ctx->dev.pfnLcSetPerformanceProfile && (0 == ctx->dev.pfnLcSetPerformanceProfile(&ctx->perf, DEVICE_PERFORMANCE_VERSION, ctx->wFpgaID))) {
1853
+ if(!ctx->dev.pfnLcSetPerformanceProfile) {
1854
+ printf("DEVICE: FPGA: ERROR! Unable to locate performance profile export.\n");
1854
1855
  return;
1855
1856
  }
1857
+ if((0 != ctx->dev.pfnLcSetPerformanceProfile(&ctx->perf, DEVICE_PERFORMANCE_VERSION, ctx->wFpgaID))) {
1858
+ printf("DEVICE: FPGA: ERROR! Unable to load performance profile - ensure leechcore.dll/so and leechcore_driver.dll/so are compatible!\n");
1859
+ return;
1860
+ }
1861
+ return; // driver-supplied performance profile loaded successfully!
1856
1862
  }
1857
1863
  memcpy(&ctx->perf, &PERFORMANCE_PROFILES[(ctx->wFpgaID <= DEVICE_ID_MAX) ? ctx->wFpgaID : 0], sizeof(DEVICE_PERFORMANCE));
1858
1864
  }
@@ -2214,6 +2220,22 @@ VOID DeviceFPGA_RxTlp_UserCallback(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_
2214
2220
  if(szTlpText) { LocalFree(szTlpText); }
2215
2221
  }
2216
2222
 
2223
+ /*
2224
+ * Queue a received TLP for user callback by the user-callback thread.
2225
+ */
2226
+ VOID DeviceFPGA_RxTlp_QueueUserCallback(_In_ PDEVICE_CONTEXT_FPGA ctx, _In_ SIZE_T cbTlp, _In_ PBYTE pbTlp)
2227
+ {
2228
+ DWORD hdrDwBuf;
2229
+ PTLP_HDR hdr = (PTLP_HDR)&hdrDwBuf;
2230
+ if(ctx->tlp_callback.fNoCpl && (cbTlp >= 4)) {
2231
+ hdrDwBuf = _byteswap_ulong(*(PDWORD)pbTlp);
2232
+ if((hdr->TypeFmt == TLP_Cpl) || (hdr->TypeFmt == TLP_CplD) || (hdr->TypeFmt == TLP_CplLk) || (hdr->TypeFmt == TLP_CplDLk)) {
2233
+ return;
2234
+ }
2235
+ }
2236
+ ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, cbTlp, pbTlp);
2237
+ }
2238
+
2217
2239
  VOID DeviceFPGA_Synch_RxTlpSynchronous(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_FPGA ctx, _In_opt_ DWORD dwBytesToRead)
2218
2240
  {
2219
2241
  DWORD status;
@@ -2267,7 +2289,7 @@ VOID DeviceFPGA_Synch_RxTlpSynchronous(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONT
2267
2289
  TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
2268
2290
  }
2269
2291
  if(ctx->tlp_callback.pBqRx) {
2270
- ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
2292
+ DeviceFPGA_RxTlp_QueueUserCallback(ctx, (SIZE_T)cdwTlp << 2, pbTlp);
2271
2293
  }
2272
2294
  if(ctx->hRxTlpCallbackFn) {
2273
2295
  ctx->hRxTlpCallbackFn(ctx->pMRdBufferX, pbTlp, cdwTlp << 2);
@@ -2575,7 +2597,7 @@ DWORD DeviceFPGA_Async2_Read_RxTlpSingle(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CO
2575
2597
  TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
2576
2598
  }
2577
2599
  if(ctx->tlp_callback.pBqRx) {
2578
- ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
2600
+ DeviceFPGA_RxTlp_QueueUserCallback(ctx, (SIZE_T)cdwTlp << 2, pbTlp);
2579
2601
  }
2580
2602
  DeviceFPGA_Async2_Read_RxTlpSingle_MRdCpl(ctxLC, ctx, pbTlp, cdwTlp << 2);
2581
2603
  pdwData[iStartWord] = pdwData[iStartWord] | (0xffffffff >> (28 - (j << 2)));
@@ -3024,7 +3046,7 @@ DWORD DeviceFPGA_SynchOldAsync_Tlp(_In_ PLC_CONTEXT ctxLC, _In_ PDEVICE_CONTEXT_
3024
3046
  TLP_Print(ctxLC, pbTlp, cdwTlp << 2, FALSE);
3025
3047
  }
3026
3048
  if(ctx->tlp_callback.pBqRx) {
3027
- ObByteQueue_Push(ctx->tlp_callback.pBqRx, 0, (SIZE_T)cdwTlp << 2, pbTlp);
3049
+ DeviceFPGA_RxTlp_QueueUserCallback(ctx, (SIZE_T)cdwTlp << 2, pbTlp);
3028
3050
  }
3029
3051
  if(ctx->hRxTlpCallbackFn) {
3030
3052
  ctx->hRxTlpCallbackFn(ctx->pMRdBufferX, pbTlp, cdwTlp << 2);
@@ -3133,8 +3155,8 @@ DWORD DeviceFPGA_Tlp_Callback_ThreadProc(_In_ PLC_CONTEXT ctxLC)
3133
3155
  if(ctx->tlp_callback.fThread) { return 1; }
3134
3156
  ctx->tlp_callback.fThread = TRUE;
3135
3157
  InterlockedIncrement(&ctxLC->dwHandleCount); // increment device handle count
3136
- if(!(ctx->tlp_callback.pBqRx = ObByteQueue_New(NULL, 0x00100000))) { goto fail; }
3137
- if(!(ctx->tlp_callback.pBqTx = ObByteQueue_New(NULL, 0x00100000))) { goto fail; }
3158
+ if(!(ctx->tlp_callback.pBqRx = ObByteQueue_New(NULL, 0x01000000))) { goto fail; } // 16MB
3159
+ if(!(ctx->tlp_callback.pBqTx = ObByteQueue_New(NULL, 0x00100000))) { goto fail; } // 1MB
3138
3160
  while(TRUE) {
3139
3161
  fActiveRun = FALSE;
3140
3162
  // Exit criteria?:
@@ -110,24 +110,28 @@ _Success_(return)
110
110
  BOOL _ObByteQueue_Push(_In_ POB_BYTEQUEUE pq, _In_opt_ QWORD qwTag, _In_ SIZE_T cb, _In_reads_bytes_(cb) PBYTE pb)
111
111
  {
112
112
  PBYTEQUEUE_PACKET p;
113
- if(cb >= 0x80000000) {
113
+ SIZE_T cboEoQ, cbEoQ, cbPkt = sizeof(BYTEQUEUE_PACKET) + cb;
114
+ if(pq->cb < cbPkt) {
114
115
  return FALSE;
115
116
  }
116
- if(pq->cPackets) {
117
+ if(!pq->cPackets) {
118
+ // 1st packet to be inserted at start-of-queue.
119
+ p = (PBYTEQUEUE_PACKET)pq->pb;
120
+ } else {
121
+ // Nth packet to be inserted at end-of-queue.
117
122
  p = (PBYTEQUEUE_PACKET)(pq->pb + pq->cboTail);
118
- if(pq->cb - sizeof(BYTEQUEUE_PACKET) - p->cb >= cb + sizeof(BYTEQUEUE_PACKET)) {
119
- p->cboNext = (DWORD)((SIZE_T)p - (SIZE_T)pq->pb + sizeof(BYTEQUEUE_PACKET) + p->cb);
123
+ cboEoQ = pq->cboTail + sizeof(BYTEQUEUE_PACKET) + p->cb;
124
+ cbEoQ = ((pq->cboHead < cboEoQ) ? pq->cb : pq->cboHead) - cboEoQ;
125
+ if(cbEoQ >= cbPkt) {
126
+ // Insert packet at next position in the circular buffer.
127
+ p->cboNext = (DWORD)cboEoQ;
120
128
  p = (PBYTEQUEUE_PACKET)(pq->pb + p->cboNext);
121
- } else if(pq->cboHead >= cb + sizeof(BYTEQUEUE_PACKET)) {
129
+ } else if((pq->cboTail > pq->cboHead) && (pq->cboHead >= cbPkt)) {
130
+ // Insert packet at start of the circular buffer.
122
131
  p->cboNext = 0;
123
- p = (PBYTEQUEUE_PACKET)pq->pb;
124
- } else {
125
- return FALSE;
126
- }
127
- } else {
128
- if(pq->cb >= cb + sizeof(BYTEQUEUE_PACKET)) {
129
- p = (PBYTEQUEUE_PACKET)pq->pb;
132
+ p = (PBYTEQUEUE_PACKET)(pq->pb + p->cboNext);
130
133
  } else {
134
+ // Not enough space.
131
135
  return FALSE;
132
136
  }
133
137
  }
@@ -3,8 +3,8 @@
3
3
 
4
4
  #define VERSION_MAJOR 2
5
5
  #define VERSION_MINOR 19
6
- #define VERSION_REVISION 0
7
- #define VERSION_BUILD 79
6
+ #define VERSION_REVISION 2
7
+ #define VERSION_BUILD 81
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: leechcorepyc
3
- Version: 2.19.0
3
+ Version: 2.19.2
4
4
  Summary: LeechCore for Python
5
5
  Home-page: https://github.com/ufrisk/LeechCore
6
6
  Author: Ulf Frisk
@@ -19,7 +19,7 @@ leechcorepyc = Extension(
19
19
 
20
20
  setup(
21
21
  name='leechcorepyc',
22
- version='2.19.0', # VERSION_END
22
+ version='2.19.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