Get the latest tech news
Making Python Less Random
Using ptrace to intercept and modify a process's getrandom syscall.
At this point, I should have pulled the code I was using out of that library, and refactored my game so that all sources of randomness came from some kind of pseudorandom generator function (e.g., random.Random). Instead, I thought about the different ways to alter the functionality here without making any code changes, and took a detour to catch and modify syscalls to getrandom. My unrandom program didn't print anything initially, it let all the non-getrandom syscalls through to the kernel, and back, without interference.
Or read this on Hacker News