Nex server in Bash
Edit: This version has a security vulnerability that could allow a client to access files outside the configured root directory.
Fixed version is at:
Wrote a Nex server in Bash. It is a script that takes a filepath as an input, and then uses the cat command to respond with whatever file is at that path, or responds with "document not found" if the file does not exist. It does not have any networking by itself, however you can make it accessible via a computer network by running something like "nc -lk 1900 -e "./BashNex -d /var/nex" ". Then when a Nex client connects to port 1900 and sends a file path like "/", the script will be run and it will respond with the contents of /var/nex/index, then the script will exit and netcat will close the connection.
2025-02-16 ยท 1 year ago ยท ๐ ps, clseibold