import ctypes
import sys
# Load the appropriate C library depending on the platform.
if sys.platform.startswith('linux'):
libc = ctypes.CDLL("libc.so.6")
elif sys.platform == "darwin":
libc = ctypes.CDLL("libc.dylib")
elif sys.platform.startswith('win'):
libc = ctypes.CDLL("msvcrt.dll")
else:
raise Exception("Unsupported platform")
def generate_password(seed):
charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
# Set the seed using the C library's srand()
libc.srand(seed)
password = []
for _ in range(20):
# Call the C library's rand()
r = libc.rand()
index = r % 62 # There are 62 characters in the charset.
password.append(charset[index])
print("".join(password))
def main():
# Unix timestamp for 2024-08-30 14:40:42 UTC.
base_time_sec = 1725028842
# Loop through all 1000 milliseconds in that second.
for ms in range(1000):
seed = base_time_sec * 1000 + ms
generate_password(seed)
if __name__ == '__main__':
main()
help me later rep if you want