Page 1 of 1

Python Password Guesser

Posted: Sat Jan 07, 2017 8:34 pm
by Pallas
I have been trying to understand the project but I am stumped. Whenever I put it 0-6 on the program this is all the comes up
Using method 3 with 435 in the list
The search took 0.0 seconds for 870 tests or 433,584 tests per second.
Using method 4 with 26 punc chars and 435 in the list

I don't know what to do after this. :?

Re: Python Password Guesser

Posted: Sat Sep 16, 2017 4:42 pm
by hglanz
Hello and welcome to Science Buddies!

I'm sorry for the delayed reply to your question. I'm not sure where you're putting "0-6 on the program". If you're running the program and entering one of the numbers between 0 and 6, then you might not be testing much out.

Line 377 of crack2.py is a place for you to enter a password of your own that you'd like to crack.

Have manipulated the crack2.py file at all?

Thanks!

Re: Python Password Guesser

Posted: Mon Oct 16, 2017 2:11 pm
by bfinio
I realize the original post here is old, but putting a note here just in case: we have recently updated the instructions for this project to make it more clear what you should do when you run the program, and how you can edit the code yourself. If anyone started this project earlier this year, please re-download the Python files and read the new instructions.

Thanks!

Ben

Re: Python Password Guesser

Posted: Wed Oct 25, 2017 7:09 am
by cs1018
I have a class of 8 kids all trying this project. They thought they had done something wrong when they tried to run the code. I see from the comments here that the code on the site is broken. That was really frustrating for them, but we had fun editing out the broken print statements as a debugging exercise. There are also lots of copies of working code on the web where people have modified this program to do more things.

This was a great lesson for the kids. Always test your code before you say it's working. I was really glad that the problem was on your end on not something about our machines.

Re: Python Password Guesser

Posted: Wed Oct 25, 2017 8:04 am
by bfinio
hi cs1018 -

To clarify, we had three people test this on our end with different versions of IDLE and operating systems (IDLE 3.6 on Windows, IDLE 3.6 on Mac, and Idle 3.3 on Windows) - and it worked for all of us. We're still not 100% sure what is causing this problem with the new code for some people but not others. Based on your comment and the comments from sciencenic in this thread: viewtopic.php?f=30&t=18085, it appears to be something related to the print statements (and not the difference between tabs and spaces for indentation, as originally indicated in that thread), but it could also be different versions of IDLE (they're running 3.5 - although I'd find it surprising that the code works in 3.3, stops working in 3.5, and then works again in 3.6). If you could provide any additional information that could help us debug this further and get the code working for everyone, we would greatly appreciate it!

- What version of IDLE are you using?
- What error messages do you get on-screen when you try to run the original, unaltered code?
- Exactly what changes did you make to the program that allowed it to run?

Thanks!

Ben

*Update - had someone else test the code in 3.5 on Windows and it worked fine running from both IDLE and the command line. So, definitely interested in what error messages you are seeing.

Re: Python Password Guesser

Posted: Tue Oct 31, 2017 5:07 am
by anasira
My son had the problem too. We have Idle 3.5 on Windows 7 if that help. The error message said "syntax error: expected an indented block". What does that mean? How do we fix?

Thank you kindly!

Re: Python Password Guesser

Posted: Tue Oct 31, 2017 5:15 am
by bfinio
Hi anasira - did the error give you a line number?

Python uses indentations to indicate code that should be inside loops, if statements, functions, etc. In some editors it makes a difference whether you use a TAB or four SPACEs. You aren't supposed to mix the two. I believe that my editor automatically converted tabs to spaces but it looks like it might not be working on other people's systems for some reason. I will see if I can get new code uploaded today, but please let me know if your error message gave you line number(s) if you get a chance.

Thanks,

Ben

Re: Python Password Guesser

Posted: Thu Nov 02, 2017 6:24 am
by anasira
Line 209 was the first. It was a print statement saying something about the program taking a long time to run. He took that line out and got another error, then another. After removing most of the print statements there were still more. He may give up on this and just do another project. Thanks anyway.

Re: Python Password Guesser

Posted: Thu Nov 02, 2017 9:30 am
by bfinio
Hi anasira - we apologize for your frustration. We've had four people test the code at Science Buddies with different versions of Python and for some strange reason we still haven't been able to reproduce the errors. We do know that other students with similar issues have gotten the code working though, and I would hate to see your son give up on the project because of a mistake on our end. If you'd like, you can email us at scibuddy@sciencebuddies.org and get in touch with me directly. I have a new version of the code that I think will resolve the issues with the print statements, and I can help with troubleshooting if there are still errors.

Thanks,

Ben