Web server access log tail dispatcher for running whitelisted commands based on GET requests.
This tool runs the command names you whitelist exactly as provided. There is no PATH resolution, argument validation, rate limiting, or output limiting built in. Treat the access log source as trusted input.
- Node.js 18 or later
npm i -g altdnpm run buildaltd <access_log.file> -w [commands]-V, --versionoutput the version number-h, --helpoutput usage information-w, --whitelist <commands>comma-separated list of allowed commands (executed directly)
altd /var/log/nginx/access_log -w ls,hostnameLog lines are expected to include a request line like:
GET /hostname HTTP/1.1
This would execute hostname with no arguments. Additional path segments are passed as
arguments, for example:
GET /ls/-la HTTP/1.1
Would execute: ls -la.
Bug reports and pull requests are welcome on GitHub at https://github.com/freddiefujiwara/altd