Skip to content

Instantly share code, notes, and snippets.

@k4lizen
Created April 21, 2024 12:23
Show Gist options
  • Save k4lizen/0dee309a6bdbcfb7eabec2e77f69c17b to your computer and use it in GitHub Desktop.
Save k4lizen/0dee309a6bdbcfb7eabec2e77f69c17b to your computer and use it in GitHub Desktop.
Using libc (rand, srand) etc using python
from ctypes import CDLL
libc = CDLL("libc.so.6")
now = int(floor(time.time()))
libc.srand(now)
print(libc.rand())
@k4lizen
Copy link
Author

k4lizen commented Apr 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment