You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> There are multiple ways to install the pyCTools library!
11
+
>
12
+
> ***Manual installation:**
13
+
>
14
+
> 1. Clone the repository and build the DLLs yourself.
15
+
> 2. Run the following to create the wheel file:
16
+
> ```bash
17
+
>cd tools python setup.py bdist_wheel
18
+
>```
19
+
> 3. The setup script will show you how to install the package locally with pip and how to create a virtual environment for testing.
20
+
>***Automatic installation:**
21
+
> Go to the [releases page](https://github.com/DefinetlyNotAI/PyCTools/releases) and selectthe version you wish to install, and click on it, then copy the top `pip`command that will allow you to install it
22
+
> [Auto installation support from v0.2.0-beta and above]
23
+
2
24
3
25
This project provides a cross-language toolkit for Windows process inspection and hardware random number generation, with both Python and C components. It includes:
4
26
@@ -7,65 +29,88 @@ This project provides a cross-language toolkit for Windows process inspection an
7
29
- **Example Python scripts**: Demonstrate usage of the library.
8
30
- **PowerShell build helper**: Automates DLL compilation for x86/x64.
9
31
32
+
> [!IMPORTANT]
33
+
> To get the `dist` binary folder, choose **one** of the following options:
>| Manual Build | Compile the binaries yourself using `cl.exe` or similar toolchains | Microsoft Visual Studio with MSVC installed |
38
+
>| Auto Build Script | Run the [`tool/compilerHelper.ps1`](tool/compilerHelper.ps1) PowerShell script | Visual Studio Build Tools + PowerShell |
39
+
>| Prebuilt Release Archive | Download precompiled binaries from the [releases page](https://github.com/DefinetlyNotAI/PyCTools/releases/) | None, make sure to use the latest available version |
40
+
>
41
+
> No matter what you decide, do still read the important notice about the `dist` from the [release](https://github.com/DefinetlyNotAI/PyCTools/releases/) OR check the [Wiki](https://github.com/DefinetlyNotAI/PyCTools/wiki#dll-discovery-and-dist-directory) page about the DLL discovery explanation.
42
+
10
43
## Directory Structure
11
44
12
-
```
13
-
example/
14
-
pyCTools/
15
-
hwrng.py # Python wrapper for hardware RNG DLL
16
-
processInspect.py # Python wrapper for process inspection DLL
17
-
hwrng_example.py # Example: hardware RNG usage
18
-
process_inspect_example.py # Example: process metrics usage
19
-
src/
20
-
hRng.c # C source for hardware RNG DLL
21
-
processInspect.c # C source for process inspection DLL
22
-
tool/
23
-
compilerHelper.ps1 # PowerShell script to build DLLs for x86/x64
24
-
dist/
25
-
x64/ # Compiled DLLs for 64-bit
26
-
x86/ # Compiled DLLs for 32-bit
27
-
```
28
-
29
-
## Building the DLLs
30
-
31
-
1. Open PowerShell and run `tool/compilerHelper.ps1`.
32
-
2. Select which `.c` files to compile.
33
-
3. The script will build both x86 and x64 DLLs and place them in `dist/x86` and `dist/x64`.
45
+
<details>
46
+
<summary>📁 Project Structure (click to expand)</summary>
47
+
48
+
root/
49
+
├── dist/ # Release artifacts for distribution
50
+
│ ├── rawBinaryZipped/ # Prebuilt binaries files (generated by `distributionHelper.ps1`)
51
+
│ │ ├── bin.zip # Zipped prebuilt binaries
52
+
│ │ └── bin.zip.sha256 # SHA256 checksum for `bin.zip`
53
+
│ └── libraryWheel/ # Library wheel files (generated by `setup.py`)
54
+
│ └── *.whl # Python wheel files for library distribution via pip
55
+
│
56
+
├── examples/ # Example Python scripts demonstrating usage
> Either check out the [example script](example/hwrng_example.py) or the [Wiki page](https://github.com/DefinetlyNotAI/PyCTools/wiki/Py-Documentation-‐-hwrng#methods)
97
+
>
98
+
>#### Process Inspection
99
+
> Either check out the [example script](example/process_inspect_example.py) or the [Wiki page](https://github.com/DefinetlyNotAI/PyCTools/wiki/Py-Documentation-‐-processInspect#methods)
58
100
59
-
## DLL Discovery
101
+
### DLL Info
60
102
61
-
The Python wrappers automatically search for the correct DLL in:
62
-
-`./dist/{arch}/<dll>`
63
-
-`../dist/{arch}/<dll>`
64
-
-`../../dist/{arch}/<dll>`
103
+
You can find all information in the [Wiki](https://github.com/DefinetlyNotAI/PyCTools/wiki#dll-discovery-and-bin-directory).
65
104
66
-
where `{arch}` is `x64` or `x86` depending on your Python interpreter.
105
+
Details about building the DLLs can be found in more detail [here](https://github.com/DefinetlyNotAI/PyCTools/wiki#building-the-dlls)
67
106
68
-
## License
69
107
70
-
MIT or specify your license here.
108
+
## Extra resources
71
109
110
+
> [!TIP]
111
+
> Want to dive deeper into how everything works? Head over to the [PyCTools Wiki](https://github.com/DefinetlyNotAI/PyCTools/wiki) for detailed breakdowns of the key parts:
112
+
>
113
+
> • **DLL explanations**: learn how the DLLs are structured, discovered, and loaded
114
+
> • **Python examples, wrappers, and usage**: practical code snippets and usage patterns in Python
115
+
> • **C code explanation**: understand the underlying native implementation
116
+
> • **Build and distribution**: how to compile, package, and distribute the libraries
0 commit comments