Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/healeycodes/unrandom
🎲 Intercept and modify getrandom syscalls from a process (x86-64 Linux).
https://github.com/healeycodes/unrandom
getrandom ptrace syscalls
Last synced: 13 days ago
JSON representation
🎲 Intercept and modify getrandom syscalls from a process (x86-64 Linux).
- Host: GitHub
- URL: https://github.com/healeycodes/unrandom
- Owner: healeycodes
- Created: 2024-07-08T13:54:42.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T14:59:28.000Z (6 months ago)
- Last Synced: 2024-10-05T17:43:03.379Z (3 months ago)
- Topics: getrandom, ptrace, syscalls
- Language: C
- Homepage: https://healeycodes.com/making-python-less-random
- Size: 1.95 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎲 unrandom
> My blog post: [Making Python Less Random](https://healeycodes.com/making-python-less-random)
Force `getrandom` syscalls from a process to return zeroes on x86-64 Linux.
Start a Python REPL. Then build and run `getrandom`:
```txt
gcc -o unrandom unrandom.c
./unrandom
```Call `os.urandom` in the REPL:
```txt
>>> import os
>>> os.urandom(8)
b'\x00\x00\x00\x00\x00\x00\x00\x00'
>>> os.urandom(8)
b'\x00\x00\x00\x00\x00\x00\x00\x00'
```