diff --git a/cli.py b/core/cli.py similarity index 99% rename from cli.py rename to core/cli.py index 699f907..efe4998 100644 --- a/cli.py +++ b/core/cli.py @@ -1,5 +1,6 @@ import click import subprocess +import utils @click.group() def cli(): diff --git a/install.sh b/core/scripts/hysteria/install.sh similarity index 100% rename from install.sh rename to core/scripts/hysteria/install.sh diff --git a/core/utils.py b/core/utils.py new file mode 100644 index 0000000..800edb9 --- /dev/null +++ b/core/utils.py @@ -0,0 +1,9 @@ +import subprocess + +def generate_password() -> str: + ''' + Generates a random password using pwgen for user. + Could raise subprocess.CalledProcessError + ''' + result = subprocess.check_output(['pwgen', '-s', '32', '1']) + return result.decode().strip() \ No newline at end of file