From e89de07f4a591470acbc247f5180fb066e0a46c0 Mon Sep 17 00:00:00 2001 From: CPol Date: Mon, 5 Apr 2021 20:43:56 +0000 Subject: [PATCH] GitBook: [master] one page modified --- misc/basic-python/bruteforce-hash-few-chars.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misc/basic-python/bruteforce-hash-few-chars.md b/misc/basic-python/bruteforce-hash-few-chars.md index 4833bcab1..7f6fbaf95 100644 --- a/misc/basic-python/bruteforce-hash-few-chars.md +++ b/misc/basic-python/bruteforce-hash-few-chars.md @@ -28,17 +28,15 @@ def loose_comparison(queue, num): if hash[:len(target)] == target and not any(x in "abcdef" for x in hash[2:]): print('plaintext: ' + plaintext + ', md5: ' + hash) queue.put("done") # triggers program exit - def worker(queue, thread_i, threads): for num in range(thread_i, 100**50, threads): loose_comparison(queue, num) - def main(): procs = [] queue = Queue() - threads = cpu_count() // 2 + threads = cpu_count() # 2 for thread_i in range(threads): proc = Process(target=worker, args=(queue, thread_i, threads ))