Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/genpwd.py @ 230:ccbb6905914e
Change copyright and note genpwd in the READNE and make an official script
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 07 Feb 2025 12:58:55 +0100 |
| parents | 788f14425503 |
| children | 6d8443878a00 |
comparison
equal
deleted
inserted
replaced
| 229:788f14425503 | 230:ccbb6905914e |
|---|---|
| 1 #!/usr/local/bin/python3 | |
| 2 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 3 # | 2 # :- |
| 4 # @(#)$Id: //Administration/Server/Konfiguration/Dateien/_main/fmgbackup4/root/bin/genpwd.py#1 $ | 3 # :Copyright: (c) 2018 Franz Glasner |
| 5 # $Change: 28588 $ $DateTime: 2018/10/31 13:11:48 $ $Author: fag $ | 4 # :Copyright: (c) 2025 Franz Glasner |
| 6 # | 5 # :License: BSD-3-Clause |
| 6 # :- | |
| 7 r"""Generate passwords. | 7 r"""Generate passwords. |
| 8 | 8 |
| 9 Usage: genpwd.py [ Options ] required_length | 9 Usage: genpwd.py [ Options ] required_length |
| 10 | 10 |
| 11 Options: | 11 Options: |
| 16 | 16 |
| 17 """ | 17 """ |
| 18 | 18 |
| 19 from __future__ import (division, absolute_import, print_function) | 19 from __future__ import (division, absolute_import, print_function) |
| 20 | 20 |
| 21 __author__ = "Franz Glasner" | |
| 22 | |
| 23 __version__ = "0.1" | |
| 24 | |
| 25 | |
| 26 import getopt | 21 import getopt |
| 27 import sys | 22 import sys |
| 28 import os | 23 import os |
| 29 import base64 | 24 import base64 |
| 25 | |
| 26 from . import (__version__, __revision__) | |
| 30 | 27 |
| 31 | 28 |
| 32 WEB_CHARS = b"ABCDEFGHIJKLMNOPQRSTUVWYXZabcdefghijklmnopqrstuvwxyz0123456789.,-_;!()[]{}*" | 29 WEB_CHARS = b"ABCDEFGHIJKLMNOPQRSTUVWYXZabcdefghijklmnopqrstuvwxyz0123456789.,-_;!()[]{}*" |
| 33 WEB_SAFE_CHARS = b"ABCDEFGHJKLMNPQRSTUVWYXZabcdefghijkmnopqrstuvwxyz23456789.,-_;!" | 30 WEB_SAFE_CHARS = b"ABCDEFGHJKLMNPQRSTUVWYXZabcdefghijkmnopqrstuvwxyz23456789.,-_;!" |
| 34 WEB_SAFE2_CHARS = b".,-_;!" + WEB_SAFE_CHARS | 31 WEB_SAFE2_CHARS = b".,-_;!" + WEB_SAFE_CHARS |
