forked from p34709852/monkey
parent
971a102eb6
commit
a11852ce3c
|
@ -9,7 +9,7 @@ def get_linux_commands_to_modify_shell_startup_files():
|
||||||
HOME_DIR = "/home/"
|
HOME_DIR = "/home/"
|
||||||
|
|
||||||
# get list of usernames
|
# get list of usernames
|
||||||
USERS = subprocess.check_output(
|
USERS = subprocess.check_output( # noqa: DUO116
|
||||||
"cut -d: -f1,3 /etc/passwd | egrep ':[0-9]{4}$' | cut -d: -f1",
|
"cut -d: -f1,3 /etc/passwd | egrep ':[0-9]{4}$' | cut -d: -f1",
|
||||||
shell=True
|
shell=True
|
||||||
).decode().split('\n')[:-1]
|
).decode().split('\n')[:-1]
|
||||||
|
|
|
@ -11,7 +11,7 @@ def get_windows_commands_to_modify_shell_startup_files():
|
||||||
SHELL_STARTUP_FILE_PATH_COMPONENTS = SHELL_STARTUP_FILE.split("\\")
|
SHELL_STARTUP_FILE_PATH_COMPONENTS = SHELL_STARTUP_FILE.split("\\")
|
||||||
|
|
||||||
# get list of usernames
|
# get list of usernames
|
||||||
USERS = subprocess.check_output('dir C:\\Users /b', shell=True).decode().split("\r\n")[:-1]
|
USERS = subprocess.check_output('dir C:\\Users /b', shell=True).decode().split("\r\n")[:-1] # noqa: DUO116
|
||||||
|
|
||||||
STARTUP_FILES_PER_USER = ['\\'.join(SHELL_STARTUP_FILE_PATH_COMPONENTS[:2] +
|
STARTUP_FILES_PER_USER = ['\\'.join(SHELL_STARTUP_FILE_PATH_COMPONENTS[:2] +
|
||||||
[user] +
|
[user] +
|
||||||
|
|
|
@ -24,6 +24,6 @@ def get_commands_to_hide_folders():
|
||||||
|
|
||||||
|
|
||||||
def cleanup_hidden_files(is_windows=is_windows_os()):
|
def cleanup_hidden_files(is_windows=is_windows_os()):
|
||||||
subprocess.run(get_windows_commands_to_delete() if is_windows
|
subprocess.run(get_windows_commands_to_delete() if is_windows # noqa: DUO116
|
||||||
else ' '.join(get_linux_commands_to_delete()),
|
else ' '.join(get_linux_commands_to_delete()),
|
||||||
shell=True)
|
shell=True)
|
||||||
|
|
Loading…
Reference in New Issue