CGI - mwicat/personal GitHub Wiki

SUID scripts

echo 'int main(int argc, char** argv) { execv("myscript", argv); }' | gcc -xc -o mysuid  -

Python CGI Server

python -m CGIHTTPServer

Notes

  • Slash '/' not working in query string
  • /script?query -> argv = [query]
  • /script?var=value -> $QUERY_INFO = "var=value"