Posts: 1
Joined: Sat Nov 12, 2016 9:11 am
Occupation: Student

Confused Python Program

Postby Pure0Genius » Sat Nov 12, 2016 9:29 am

Hello! Currently I am working on the How Easily Can Your Password Be Hacked project but I ran into trouble. I am confused as to where I can find the methods program. I thought it would be in the crack2.py program but after i type 0 and press enter i get this.

Trying to guess password 0
Using method 3 with 435 in the list
The search took 0.0 seconds for 870 tests or 435,551 tests per second
Using method 4 with 26 punc chars and 435 in the list

After this I am not able to type in the program and the program exits out by itself after about 2-3 minutes.Hopefully you can get to me before Monday, November 14.

Former Expert
Posts: 8
Joined: Tue Sep 05, 2017 11:11 am
Occupation: Teacher

Re: Confused Python Program

Postby hglanz » Sat Sep 16, 2017 4:27 pm

Hello and welcome to Science Buddies!

I'm sorry for the delayed response to your question. The methods are inside the crack2.py file. They are named search_method_1, search_method_2, and so on.

In order to play around with different passwords to guess or hack, I believe you'll need to add your own passwords inside the quotes on lines 27 through 33 of crack2.py.

Please let us know if you have any other questions or concerns.


Posts: 462
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff

Re: Confused Python Program

Postby bfinio » Fri Sep 22, 2017 9:27 am

I know this is an old post, but one important clarification - do NOT edit the lines password0="", password1="" etc. in the program. Those lines are just initializing the variables. They are actually set in the "main" function at the bottom of the program. You can enter your own value for password0. The other ones are pre-set by Science Buddies and are "hashed" to hide their true values from you. We are updating the comments in the program to better explain this.

Return to “Grades 6-8: Math and Computer Science”