Last active
March 26, 2018 15:10
-
-
Save sorz/132fdca7be962549d61307b7560a8bcb to your computer and use it in GitHub Desktop.
`curl sorz.org`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-oooooooooooo- -::::::::::::::::::::- | |
.---------. oMMMMMMMMMMMM+ dMMMMMMMMMMMMMMMMMMMMM. | |
.NMMMMMMMMMN` oMMN:...-yMMM: /+++++++++++++yMMMo+++` | |
.NMMhyyydMMN` oMMN. `mMMd /MMN` | |
.NMM/ oMMN` oMMN. +MMN: /MMN` | |
.NMM/ oMMN` oMMN. `dMMs /MMN` | |
.NMM/ oMMN` oMMN. /MMN. -hhhhhhhhhh/ /MMN` | |
.NMM/ oMMN` oMMN. dMMo :MMMNmmmNMMs /MMN` | |
.NMM/ oMMN` oMMN. +MMN. :MMN.```yMMs /MMN` | |
.NMM/ oMMN` oMMN.`NMMy :MMN. yMMs /MMN` | |
.NMM/ oMMN` oMMN. +NMMo :MMN. yMMs /MMN` | |
.NMM/ oMMN` oMMN. :NMM+ :MMN. yMMs /MMN` | |
.NMM/ oMMN` oMMN. /NMN+ :MMN. yMMs /MMN` | |
.NMM/ oMMN` oMMN. yMMm` :MMN. yMMs /MMN` | |
.NMM/ oMMN` oMMN. -MMM/ :MMN. yMMs /MMN` | |
.NMM/ oMMN` oMMN. `NMMs :MMMysssmMMs /MMN` | |
.NMM/ oMMN` oMMN. `NMMs :MMMMMMMMMMs /MMN` | |
.NMMMMMMMMMN` oMMN. +MMMo :MMN:......` /MMN` | |
.NMMmhhhmMMN` oMMNyhhhmMMMm. :MMN. /MMN` | |
.NMM/ oMMN` oMMN/MMMMMmo. `::: /MMN` | |
`sys- `--- oMMN.....` /MMN` | |
oMMN. +MMN` | |
oMMN. `soo++/+yNMMd | |
oMMN. `dMMMMMMMMMh. | |
oNNm. :+++++++/. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read request | |
while true; do | |
read header | |
[ "$header" == $'\r' ] && break; | |
done | |
printf "HTTP/1.0 200 OK\r\n" | |
printf "Server: lolcat-ah\r\n" | |
printf "Content-Type: text/plain; charset=utf-8\r\n" | |
printf "\r\n" | |
/usr/bin/lolcat -f ah.plain.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Listen on http and return `lolcat ah.txt` | |
[Socket] | |
ListenStream=127.0.0.80:8000 | |
Accept=true | |
MaxConnections=1 | |
[Install] | |
WantedBy=sockets.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Write out lolcat ah | |
[Service] | |
Type=simple | |
User=nobody | |
Group=nobody | |
WorkingDirectory=/opt/lolcat-ah/ | |
ExecStart=/opt/lolcat-ah/ah.sh | |
StandardInput=socket | |
StandardOutput=socket | |
PrivateDevices=True | |
ProtectSystem=strict | |
ProtectHome=True | |
NoNewPrivileges=True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment