Skip to content

Instantly share code, notes, and snippets.

@XavierChanth
Forked from kevn-xyz/ncws
Last active October 2, 2023 20:32
Show Gist options
  • Save XavierChanth/677719c64287c4e2936ed3461239e8b7 to your computer and use it in GitHub Desktop.
Save XavierChanth/677719c64287c4e2936ed3461239e8b7 to your computer and use it in GitHub Desktop.
Simple netcat based one shot http file server
#!/bin/bash
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Disposition: inline; filename=\"hello.txt\"\r\nContent-Length: 13\r\n\r\n"; echo \"Hello World\!\"; } | nc -l 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment