Simple C WebServer
It's free to use or copy for anyone. It's meant to be forked, optimized, etc..
I don't recommend using it publicly since it is super super super super insecure!!!
To compile scws from source, you'll need the following apckages preinstalled:
- libmicrohttpd-dev
sudo apt update && sudo apt-get install libmicrohttpd-dev- libmicrohttpd
doas pkg_add libmicrohttpd- libmicrohttpd
doas emerge net-libs/libmicrohttpd- libmicrohttpd
sudo dnf install libmicrohttpd-devel- libmicrohttpd-dev
brew install libmicrohttpdmakeIt is important to keep your
index.htmlandstyle.cssfiles inside of the root folder of the compiled binary file. Thanks to the clankers making me a fast index! You can change the location in thescws.cfile though. To run SCWS, do this (You can also leave theipandportoption empty to default to your local IPv4 and port 8888):
./scws [ip] [port]When the server is running, you should get the following output:
[!!] Yay! Server is running on 0.0.0.0:8888
Now go to http://0.0.0.0:8888/ and see the following example website:
