Skip to content

Command Module

Sam edited this page Feb 13, 2025 · 2 revisions

The command module lets you call a command or script as your own user, outputting the stdout of that command.

Using

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;

image

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.

Configuration

allow_commands -> (Bool) Allows the command module to be used.

Default Configuration
`allow_commands` = false

Example

modules = [
    "command:/var/current-time.sh"
]

allow_commands = true