The pseudo-random generators of this module should not be used for security purposes. For security or cryptographic uses, see the secrets module.
The fix here would be something like:
import secrets
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
the_password = [secrets.choice(alphabet) for x in range(14)]
print(''.join(the_password))
https://github.com/usmannasir/cyberpanel/blob/stable/plogical/randomPassword.py uses
random
, which the documentation ( https://docs.python.org/3/library/random.html ) specifically states not to do so for this purpose:The fix here would be something like: