Password Security

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

Moderators: kgudger, bfinio, Moderators

Locked
kun820
Posts: 1
Joined: Fri Nov 13, 2015 5:36 pm
Occupation: Student

Password Security

Post by kun820 »

https://www.sciencebuddies.org/science- ... p046.shtml
Password Security: How Easily Can Your Password Be Hacked?

For the topic above, I tried to plug the python code as it saids, but didn't work.
It was hard to figure out how to use python.
Can somebody tell me specifically step-by-step how to enter the code on python?
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Password Security

Post by HowardE »

Sure. You installed Python 3 from https://www.python.org/downloads/ presumably. When you did that, in addition to the Python interpreter it also installed a program called IDLE or IDLE3. Search for that with your computer's search facility if you don't see it.

Download the two files we provide - crack2.py and passwords.txt. Put them in a folder somewhere on your computer.

In IDLE's menu, go to File/Open, navigate over to the folder with the two files and open 'crack2.py'. That loads the code into the editor where you'll make your changes. To run it, select Run/Run Module from the menu. It will offer to save your changes if you made any.

There are 7 passwords it' knows about. Password 0 is one that you just set in quotes. Search for it in the code - it starts out as "314". The program asks which of the 6 you want it to guess. Select a number from 0 to 6 and it will apply the methods described. You know what password 0 is - you'll use that to fine tune your new methods. You don't know what passwords 1 through 6 are though. Those are encrypted so you'll have to get your program to figure those out. As supplied it will figure out passwords 1 through 5. To get password 6 you'll have to write up a new method.

So put your own hard to guess passwords in as password 0 and then see how well the program can figure them out. Make the program better and smarter and then try harder passwords.

Does that help? Write back if you have other questions.

Howard
Locked

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