Skip to content

Instantly share code, notes, and snippets.

@SakiiR
Created November 27, 2019 16:40
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SakiiR/a073f22c3943a530a2574dd7fde13e38 to your computer and use it in GitHub Desktop.
Save SakiiR/a073f22c3943a530a2574dd7fde13e38 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())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment