We've just built our password checker.
It's pretty cool, right?
I guarantee you, this is something that if you start talking about it during an interview, the interviewer
is going to be pretty impressed because it does have some pretty advanced topics.
But hopefully this whole process made sense and you now have a tool that works and that you can even
check your passwords to make sure that you're being secure online.
Now, a bit of a caution here that I want to note is that right now we're entering the passwords in
the command line.
I'm using something called a fish shell.
You may have different shells.
Or programs running here that sometimes actually save these commands.
If you remember, if I press an arrow here, you see that I get my passwords back.
So somewhere on my computer, this is being saved.
Maybe that's not super secure because somebody might have or acquire access to it.
So a good way to perhaps for you to improve this program is to read these passwords from a text file
instead of a command line argument.
But I'll leave that up to you, because by now you should know how to do that.
The final thing I want to do is just add over here at the bottom, since this should be our main module
to just say if underscore, underscore name.
He calls.
So only run this file if it's the main file being run from the command line and not if it's being imported.
So in here if I run this.
This still works, but we make sure that this file is only going to be run if it's the main file being
run.
Now, another neat thing that you can do as well is you can also do this dot exit to exit the process
in case.
Well.
In case for some reason this doesn't exit.
Just to make sure that the system call actually exit and brings us back to the command line.
So again, if I save this.
There you go.
Everything is still working.
The only difference that you'll see here is that we have the done being returned versus over here where
it wasn't because we're exiting out of this file.
So this entire check, my pass python file was run and at the end of it all.
What does this entire function, this main function return?
Well, it returns done.
So we exit the entire process and we get the return value of done.
There we go.
Ladies and gentlemen, we've completed our check my pass project.
Now, I've told you this is my favorite project.
That doesn't mean that the rest of the projects are going to suck throughout the course.
I don't think they do.
I'm just saying this is a pretty cool one, but I get excited about things like this.
Anyway.
Share your work.
Show this off to your pants, your friends, your family, your employer.
And I'll see you for the next one.
Bye bye.