Skip to content

freddiefujiwara/altd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version

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 altd

Build

npm run build

Usage

altd <access_log.file> -w [commands]

Options

  • -V, --version output the version number
  • -h, --help output usage information
  • -w, --whitelist <commands> comma-separated list of allowed commands (executed directly)

Example

altd /var/log/nginx/access_log -w ls,hostname

Log 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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/freddiefujiwara/altd

About

Access log tail dispatcher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •