Skip to content

Add brute solution with multiprocessing#917

Open
danyatatarchuk wants to merge 1 commit into
mate-academy:masterfrom
danyatatarchuk:develop
Open

Add brute solution with multiprocessing#917
danyatatarchuk wants to merge 1 commit into
mate-academy:masterfrom
danyatatarchuk:develop

Conversation

@danyatatarchuk

Copy link
Copy Markdown
Знімок екрана 2026-07-08 о 19 13 16 Знімок екрана 2026-07-08 о 19 13 56 Знімок екрана 2026-07-08 о 19 14 17

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

I am approving your solution because it correctly brute-forces the full 8-digit numeric space (0–99,999,999), uses SHA-256 with UTF-8 encoding via sha256_hash_str, and prints each discovered password and its corresponding hash, which satisfies the core functional requirements. Your multiprocessing approach using cpu_count() and chunked ranges is a solid optimization that aligns well with the performance expectations and does not introduce any obvious correctness issues. While the code does not explicitly assert that exactly 10 passwords were found, it does exhaustively search the required space and will find all matches that exist in the provided hash set, so this is not a blocking issue for task completion.

For a future improvement (non-blocking), consider adding a final check like len(found_passwords) == len(PASSWORDS_TO_BRUTE_FORCE) and printing a warning if the counts don’t match, which would make it easier to confirm you’ve recovered all expected passwords [CHECKLIST ITEM #3, #4]. You could also sort the results before printing to make manual verification simpler. Remember to attach the required console-output screenshot(s) to your PR, since that part is handled outside the code. Overall, you’ve met the key requirements and shown good use of multiprocessing; well done.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants