Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hash cracker
#2
If I may...

Possibly, this should have been posted in Code Review before it was posted here.

It would be better (IMHO) to d/load the 'dictionary' file (given that this is a so-called 'dictionary attack'), then load one word at a time, for the attempted 'crack'. That way the computer RAM is not filled with the entire file, which is 8.5MB in size; not huge, but it's very large (if one can define the difference). In fact password_list is not a Python list object, as the name would suggest; rather it's a instance of str: len=8529104

So maybe your code should be in two parts: one to d/load and save the file (which may or may not be updated from time to time; I've not checked on that detail) and one to re-load the file, one word at a time, generate the hash digest and check that against the user input.

I've not checked the actual operation (that is to say, I've not hashed a simple and easy-to-crack password, which is all this is good for) to see if it works, but I guess you have?
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
Hash cracker - by Milan - Mar-09-2023, 08:38 PM
RE: Hash cracker - by rob101 - Apr-03-2023, 12:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Brute Force Password Cracker hendry1 1 2,950 May-12-2020, 07:05 PM
Last Post: CrazyMakes

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020