Package: bftool-pkg-sulcud
bftoolIndexIndexDescriptionQuick exampleAs a moduleAs a scriptInstallationDescriptionbftoolis a python module and script, with a custom worker pool for the distribution of function execution into processes and threads based on a initial input, so you only need to focus on the functionality and not in the distribution of its execution.ConceptsTime consuming functionsIn the context ofbftoolthe weight of a function is based on the time spent from when it was called to its finish.Based on that we can conclude that this operations are most of the time heavy, since usually require more time to finish:File I/O.Networking I/O.N Cycles (FOR, WHILE, ...).Force waits (likesleep).And this operations are usually lightMath.Variable assign to a known value.Some hash calculations.Quick exampleAs a modulebftoolauto detects if the function requires or not parallelism and based on that spawn the workers.importhashlibimportstringimportbftoolsecret="zz"target=hashlib.sha3_512(secret.encode()).hexdigest()defcalc_hashes(salt:str,raw_password:str)->tuple[str,str,str,str]:salt_password=(salt+raw_password).encode()returnsalt,raw_password,hashlib.blake2b(salt_password).hexdigest(),hashlib.sha3_512(salt_password).hexdigest()defcracked(hashes:tuple[str,str,str,str])->bool:returntargetinhashes[2:]defsuccess(result:tuple[str,str,str,str]):print(f"[+]\"{result}\n",end="")defmain():arguments=bftool.Arguments(calc_hashes,bruteforce_rules={"raw_password":{"minlength":1,"maxlength":1,"elements":string.ascii_letters,"string-join":True},"salt":{"minlength":1,"maxlength":1,"elements":string.ascii_letters,"string-join":True}})pool=bftool.Pool(calc_hashes,arguments,cracked,success,max_processes=3,max_threads=3)print("Fuzzing time:",pool.run())if__name__=="__main__":main()As a scriptpython-mbftool--helpusage: bftool [-h] [-mt MAX_THREADS] [-mp MAX_PROCESSES] [-w WORDLIST] [-b BRUTEFORCE] [-sf SUCCESS_FUNCTION] [-cf CHECK_FUNCTION] [-sp SCRIPT_PATH] expression

positional arguments:
  expression            expression that will result in a callable

optional arguments:
  -h, --help            show this help message and exit
  -mt MAX_THREADS, --max-threads MAX_THREADS
                        Maximum number of threads per process
  -mp MAX_PROCESSES, --max-processes MAX_PROCESSES
                        Maximum number of process to have active at the same time
  -w WORDLIST, --wordlist WORDLIST
                        File wordlist to use based on "{'argument_1': FILE_PATH, ...}"
  -b BRUTEFORCE, --bruteforce BRUTEFORCE
                        Generate a virtual wordlist based on rules "{'argument_1': {'elements': [element_1, ...], 'minlength': INT, 'maxlength': INT, 'string-join': BOOL}, ...}"
  -sf SUCCESS_FUNCTION, --success-function SUCCESS_FUNCTION
                        Function to pass the success result to (default is custom 'print')
  -cf CHECK_FUNCTION, --check-function CHECK_FUNCTION
                        Function useful to check the output (default is 'lambda output: output')
  -sp SCRIPT_PATH, --script_path SCRIPT_PATH
                        Python script to importInstallationUsingpippipinstallbftool-pkg-sulcudManualgitclonehttps://github.com/shoriwe/bftoolcdbftool
pythonsetup.pyinstall