| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
 |  | |||
 |  | |||
My blog post: 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:
gcc -o unrandom unrandom.c
./unrandom <python's pid>Call os.urandom in the REPL:
>>> 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'| Back | FazBrowse Home | New Git URL |