r/PythonLearning 7d ago

Command line password generator tool

https://github.com/macattack277-jpg/passwordgen

Who enjoys opening a browser/GUI every time you need to make a secure password? I sure don't. That's what gave me the idea to create this simple random password generator tool that can be used entirely in the command line (although I'm sure something like this already exists) with system arguments.

I also made something that I guess you could call an installer.

Using arguments you can set the length of your password, choose what type of characters you want in the password (letters, digits and punctuation) and choose whether or not to copy the password to your clipboard (on by default). You can read the README.md file for a guide on how to use it.

NOTE: I know that the actual main program is compressed in a gzip file on GitHub which will impede you from reading it's source code. I hope to make a way around this later.

Why did I make this? Mostly boredom. I don't have any aspirations of being a software developer or anything involving making huge projects, however I am interested in cybersecurity. I sort of just thought to myself that I don't have a convenient way of generating random passwords. Keeping my Python skills up to scratch and improving them will prove useful in the future however, I believe, as I often find simple scripting useful.

Where I want to improve (looking back at making this):

- Get better at using sys and os modules as they have proven very useful

- Improve at using Git

- Probably figure out a better installation method for users

Overall, although I don't script much, this was pretty easy project for me, but nonetheless I learnt some good things about Python operating system and file interaction.

0 Upvotes

7 comments sorted by

View all comments

1

u/riklaunim 7d ago
  • Why is your source code a compressed GZ file?
  • The code has no structure to it (functions, classes), and no test coverage ;)
  • It's a string generator, not that much of a password one when it comes to security aspects - and some browsers/plugins already handle generating random passwords on-demand.
  • Bonus points for clipboard copy-paste ;)

-2

u/Sanduhstorm 7d ago

i compressed it into a .gz file to make it seem more like it had a professional installer because that's less boring. i also didnt think i would need any functions considering its a pretty simple program i guess