crack2.py freezing on method 2

Ask questions about projects relating to: computer science or pure mathematics (such as probability, statistics, geometry, etc...).

Moderators: kgudger, bfinio, Moderators

Locked
GaryJSO
Posts: 1
Joined: Tue Jan 24, 2017 7:07 pm
Occupation: Parent

crack2.py freezing on method 2

Post by GaryJSO »

I've tried several versions of crack2.py from the Ask an Expert forum, and each version is hitting the same point and not proceeding: Using method 2 and searching with 6 password wheels. I'm using Python 3.6.0, running it from IDLE, and I've tried it on 2 different machines:
1. Win10, Intel i7-4770K CPU@3.50GHz, 32GB Ram, 500GB SSD C: drive and a 4TB data drive.
2. Win10, Intel i7-3520M CPU@2.90GHz, 16GB Ram, 100GB SSD C: drive and a 128GB USB 3.0 drive

I've gotten the same issue with all the variants we've tried, but the version we would like to modify to our needs is from Re: crack2.py Not working viewtopic.php?f=30&t=14151&hilit=passwo ... =15#p50088. We're aiming to test the time to process 8-character passwords of varying complexity. That version supports running a list of (at least?) 6 passwords with one keystroke.

We've tried to troubleshoot it, but we can't figure out how (num_pass_wheels) is determined. It seems to be "searching with 6 password wheels." no matter how long the password is. Not sure if that is causing it locking it up, but we'd like to figure out where it comes from before we start tinkering with the program.

Thanks for any assistance.

Gary
Anadeaudacruz
Posts: 1
Joined: Sat Feb 25, 2017 2:10 pm
Occupation: Student

Re: crack2.py freezing on method 2

Post by Anadeaudacruz »

Hello - We are having the same issue with Method 2. Was this ever resolved? The program seems to just hang on Method 2.

Thanks!
MadelineB
Moderator
Posts: 908
Joined: Fri Jun 20, 2014 4:42 pm
Occupation: Biostatistician/Data Scientist
Project Question: Interested in volunteering as an expert
Project Due Date: n/a
Project Status: Not applicable

Re: crack2.py freezing on method 2

Post by MadelineB »

Hello,
I will use the modified version of crack.py that you linked when referring to code in my post.
I will first answer how num_pass_wheels in determined. If you look at the function 'signature' for the method 2, you can see it is “def search_method_2(num_pass_wheels)”. This means that num_pass_wheels is passed as an argument when the function is called. To see where search_method_2 is called with num_pass_wheels=6, see line 425. If you wish to make this 8, you can change the function call to pass in 8 instead or 6. This would change the line 425 from “foundit = search_method_2(6)” to “foundit = search_method_2(8)”
You can also see that this call does not take into account the length of the password. This makes sense, right? If we are trying to guess someone’s password, we probably won’t know exactly how long the password is.

However, you may want to think again about trying 8 character long passwords! The method is hanging because guessing 6 character long passwords via method_2 is actually very computationally intensive.
To see why it is so computationally intensive, we can do a little test. On my computer (i7-3770 3.4 GHz), method_2 can do 250,000 tests per second. That sounds like a lot, but how does it compare to the total number of 6 character passwords possible? Well, for each character, there are 62 possibilities. Thus, the total number of 6 character long passwords is 62^6 = 56,800,235,584 total number of passwords. Yikes! That’s a big number. In fact, at 250,000 tests per second, it would take my computer 2 days 15 hours 6 minutes and 41 seconds to test 6 character long passwords using method_2. That’s a long time!
Let us know if you have more questions!
Locked

Return to “Grades 9-12: Math and Computer Science”