diff options
author | Minteck <nekostarfan@gmail.com> | 2021-11-07 17:01:42 +0000 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-11-07 17:01:42 +0000 |
commit | 8e4003e6b260d75859b1929c8c4264c2239bd074 (patch) | |
tree | e2d37a523182b7942bff046ac452652ca4a902da /bashweb.sh | |
parent | be7a71f503f676b0e3dcce389bd6ee91903c4aa4 (diff) | |
download | bashweb-8e4003e6b260d75859b1929c8c4264c2239bd074.tar.gz bashweb-8e4003e6b260d75859b1929c8c4264c2239bd074.tar.bz2 bashweb-8e4003e6b260d75859b1929c8c4264c2239bd074.zip |
It works!
Diffstat (limited to 'bashweb.sh')
-rwxr-xr-x | bashweb.sh | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -5,3 +5,31 @@ ## written in bash. ## ## ## ########################################################## + +data=$(cat index.bhtml | envsubst) + +main () { + netcat -q 0 -l 1234 <<EOF +HTTP/1.1 200 OK +Server: Bashweb +Date: $(date) +Content-Type: text/html; charset=utf-8 +Content-Length: ${#data} +Connection: keep-alive +X-Frame-Options: SAMEORIGIN +X-XSS-Protection: 1; mode=block +Cache-Control: private, no-cache, no-store, must-revalidate +X-Content-Type-Options: nosniff +Pragma: no-cache +Expires: Sat, 01 Jan 2000 00:00:00 GMT +Referrer-Policy: no-referrer-when-downgrade + +$data +EOF +} + +while true +do + main &>/dev/null +done + |