diff --git a/README.md b/README.md index 091eddc..1bca482 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,8 @@ __verbose__: 0 or 1
__substring__: `python3 plutus.py substring=8`: To make the program memory efficient, the entire bitcoin address is not loaded from the database. Only the last <__substring__> characters are loaded. This significantly reduces the amount of RAM required to run the program. if you still get memory errors then try making this number smaller, by default it is set to 8. This opens us up to getting false positives (empty addresses mistaken as funded) with a probability of 1/(16^<__substring__>), however it does NOT leave us vulnerable to false negatives (funded addresses being mistaken as empty) so this is an acceptable compromise. +__cpu_count__: `python3 plutus.py cpu_count=1`: number of cores to run concurrently. More cores = more resource usage but faster bruteforcing. Omit this parameter to run with the maximum number of cores + By default the program runs using `python3 plutus.py verbose=0 substring=8` if nothing is passed. # Expected Output diff --git a/plutus.py b/plutus.py index d16dacb..8f7ebbb 100644 --- a/plutus.py +++ b/plutus.py @@ -3,6 +3,7 @@ # https://github.com/Isaacdelly/Plutus from fastecdsa import keys, curve +from ellipticcurve.privateKey import PrivateKey import platform import multiprocessing import hashlib @@ -115,10 +116,13 @@ if __name__ == '__main__': } if platform.system() in ['Linux', 'Darwin']: args['fastecdsa'] = True + for arg in sys.argv[1:]: command = arg.split('=')[0] if command == 'help': print_help() + elif command == 'time': + timer(args) elif command == 'cpu_count': cpu_count = int(arg.split('=')[1]) if cpu_count > 0 and cpu_count <= multiprocessing.cpu_count(): @@ -127,8 +131,6 @@ if __name__ == '__main__': args['cpu_count'] = multiprocessing.cpu_count() print('invalid input. cpu_count must be greater than 0 and less than or equal to ' + str(multiprocessing.cpu_count())) sys.exit(-1) - elif command == 'time': - timer(args) elif command == 'verbose': verbose = arg.split('=')[1] if verbose in ['0', '1']: