-
Notifications
You must be signed in to change notification settings - Fork 6
Command Module
The command
module lets you call a command or script as your own user, outputting the stdout
of that command.
Enable the allow_commands
option inside the config to allow the module to run.
Caution
Enabling the allow_commands
option will, as a side effect, let anyone with access to CrabFetch run ANY ARBITRARY USER COMMAND. It's not hard to override the configuration's modules to make CrabFetch do what you want if you're an attacker with access to CrabFetch;
While it will only ever run as the current user, it should still be seen as a security risk. Do not enable this setting unless you are absolutely sure of it. E.g if your configuring CrabFetch system-wide, keep this disabled.
Then, insert into the modules
array in the following format;
command:{command}
Replace {command}
with the command or script you wish to run.
allow_commands
-> (Bool) Allows the command
module to be used.
`allow_commands` = false
modules = [
"command:/var/current-time.sh"
]
allow_commands = true