Last active
August 29, 2015 14:01
-
-
Save nijotz/1b541b07e7c5f34dc4f1 to your computer and use it in GitHub Desktop.
omg what have I done
This file contains 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
while true; do echo -e '<html><body>' $(grep server_name /etc/nginx/sites-enabled/* | sed -e 's/.*server_name //' -e 's/localhost *//' -e 's/ /\n/g' -e 's/;$//' | sed -re 's_^(.*)$_<a href="http://\1">\1<a/>_') '</body></html>' > index.html; python -m SimpleHTTPServer 9999 & sleep 1; curl -i localhost:9999 > index_headers.html 2>/dev/null; kill %1; cat index_headers.html | netcat -l 8080; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment