Created
April 20, 2012 12:26
-
-
Save omnidan/2428188 to your computer and use it in GitHub Desktop.
EntropyGEN: A script that does random disk operations to generate entropy for private key generation.
This file contains 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
#!/usr/bin/env python | |
from os import system | |
from sys import argv | |
print("EntropyGEN v0.4") | |
print("USAGE: %s <BYTES_PER_SECOND>" % argv[0]) | |
try: | |
try: | |
if len(argv) > 1: blen = int(argv[1]) | |
else: blen = 100 | |
except: | |
blen = 100 | |
print(" - Generating entropy with %d bytes per second." % blen) | |
print(" - Press Ctrl+C to stop the generation of entropy.") | |
system("pv -tpL%d /dev/urandom > /tmp/.entropyfile" % blen) | |
raise Exception() | |
except: | |
system("rm /tmp/.entropyfile") | |
exit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment