pwManager
pwManager copied to clipboard
Simplified hash_maker.py alphabet
You coud have added the other methods of string
in the ALPHABET variable, it would give something like this:
ALPHABET = (string.ascii_letters, string.digits, string.punctuation)
Ironically enough this actually saves on memory, albeit negligible.
Either way, much more pythonic. Good catch @scaldings and I agree @YoungMind44 with the use of the other constants in the string module.
You coud have added the other methods of
string
in the ALPHABET variable, it would give something like this:ALPHABET = (string.ascii_letters, string.digits, string.punctuation)
Wouldn't changing the length of ALPHABET from 4 to 3 change the probability of each character ending up in the password? Because of the conditional probability that is. Now (and originally with ALPHABET being 4 long), the character "1" has a higher probability of ending up in the password than "a", and therefore there would be more numbers than letters in the password. In that case, wouldn't the passwords be easier to crack? Would it be better if it was ALPHABET = string.ascii_letters, + string.digits + string.punctuation
? This way each and every character has the same probability of being selected
I tried to run this Password manager on a Raspberry Pi 4 machine using python 3.7.3 and the terminal giving me this error:
Traceback (most recent call last):
Files "password_mananger.py", line 2, in
Any idea about this??
@aakinpatel This is to be expected. This script requires a file that wasn't included in the repository, which is secret.py
You could make this file yourself, and it would look something like this
def get_secret_key():
return "Your Secret Key"
@HacDan Thank you for the help!
By any chance do you know how to fix this error:-
from modules.encryption import DataManip ModuleNotFoundError: No module named 'modules.encryption'; 'modules' is not a package
@aakinpatel In an effort not to muddy this up further, please open an issue if you're still experiencing this.