Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
omg what have I done
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
You can’t perform that action at this time.