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'