Apr-03-2017, 01:44 PM
(Apr-03-2017, 01:34 PM)buran Wrote: well, it's not clear what you try to implement. If that is homework - say so and post the full assignment.
note that commented part, if not commented would overwritechars
Hi Buran,
Not homework at all. This is actually a bit more advance to what I have been taught currently but since I'm on holidays I'd like to study myself and try and make some programs.
the chars line was actually replaced with the chars line that I have commented out. I wanted to post both versions so you could see what I was trying to do.
The program currently runs by trying possible combinations like aa,ab,ac,ad etc. until it has guessed the password that the user inputted. What I want to do is modify it so it uses the external list of passwords in a text file and try and match it to what the user has inputted. but when the program runs, it doesn't recognise that it has made a match.
Let's say I input the password as "abc123"
The top of the list is "abc" then the next line is "abcd" then "abc123" but instead of stopping at "abc123" and saying that the password is found, it will continue checking passwords, I think this might have something to do with the (repeat=password_length) line, but I'm unsure.