altd
v0.1.3
Published
Access log tail dispatcher
Downloads
34
Readme
altd
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.
Requirements
- Node.js 18 or later
Installation
npm i -g altdBuild
npm run buildUsage
altd <access_log.file> -w [commands]Options
-V, --versionoutput the version number-h, --helpoutput usage information-w, --whitelist <commands>comma-separated list of allowed commands (executed directly)
Example
altd /var/log/nginx/access_log -w ls,hostnameLog lines are expected to include a request line like:
GET /hostname HTTP/1.1This would execute hostname with no arguments. Additional path segments are passed as
arguments, for example:
GET /ls/-la HTTP/1.1Would execute: ls -la.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/freddiefujiwara/altd
