Created
April 21, 2024 12:23
-
-
Save k4lizen/0dee309a6bdbcfb7eabec2e77f69c17b to your computer and use it in GitHub Desktop.
Using libc (rand, srand) etc using python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Copy of https://gist.github.com/SakiiR/a073f22c3943a530a2574dd7fde13e38