Skip to content

Instantly share code, notes, and snippets.

@rupurt
Created April 16, 2018 18:32
Show Gist options
  • Save rupurt/48ce2e58da98f67d2572b7dd0952a259 to your computer and use it in GitHub Desktop.
Save rupurt/48ce2e58da98f67d2572b7dd0952a259 to your computer and use it in GitHub Desktop.
Netcat webserver
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; sh test; } | nc -l 8080; done
#!/bin/bash
echo "************PRINT SOME TEXT***************\n"
echo "Hello World!!!"
echo "\n"
echo "Resources:"
vmstat -S M
echo "\n"
echo "Addresses:"
echo "$(ifconfig)"
echo "\n"
echo "$(gpio readall)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment