About 29 results
Open links in new tab
  1. Process Injector using ctypes and the Windows API

    May 2, 2021 · To get some practice with the Windows API and ctypes, I decided to write a program capable of injecting and running shellcode inside of another specified process. An …

  2. Return a 2D matrix from a C++ function in Python: ctypes versus ...

    I found two ways in which I can use a custom C++ function (returning a 2D matrix) in Python. One approach that uses the Python module ctypes and another that uses the Python module …

  3. Alerting users with a pop-up window - Code Review Stack Exchange

    Feb 25, 2015 · You could also add variables to shorten repeated lines like making a variable called resetMsgBox and have it be: resetMsgBox = ctypes.windll.user32.MessageBoxA so it's …

  4. Python script to change monitor refresh rate

    Jun 3, 2024 · Whereas ctypes does have direct Union support, you shouldn't use it in this case; it's less type-safe than writing for one access mode and defining only one parameter struct. …

  5. UUID v7 implementation in python - Code Review Stack Exchange

    Dec 14, 2024 · But bit-fiddling isn't necessary. I prefer declarative serialisation over imperative serialisation. That means making a structural definition and then passing data into fields, not …

  6. A Windows hook that detects the foreground window change

    Jan 4, 2023 · I tried to implement a windows hook to grab foreground window event. This code is probably bad because I didnt understand much.

  7. Add and enable/disable Windows Firewall rules with Python

    Jan 9, 2019 · I have this following module using for adding and enabling/disabling Windows Firewall rules using Python. I currently use subprocess.call to execute the netsh command …

  8. Assembly REPL in Python using ctypes - Code Review Stack …

    Nov 8, 2020 · I created a assembly REPL using some ctypes hacks to run the assembly code. Any suggestions on how I could improve it? I am unconcerned about some of the "obvious" …

  9. Transfer an array of unknown size from C to Python using Ctypes

    Dec 9, 2019 · I am new to Ctypes. I am writing a piece of code that brings an array of unknown size from C to Python using Ctypes. Unknown size here mean that Python initially doesn't …

  10. python - Parsing Java's class file - Code Review Stack Exchange

    Feb 23, 2024 · #!/usr/bin/env python3 import ctypes import struct import sys from dataclasses import dataclass from enum import IntEnum, IntFlag from functools import partial from io …