Skip to content

Instantly share code, notes, and snippets.

@queercat
Created February 19, 2025 23:09
Show Gist options
  • Select an option

  • Save queercat/7abcabbf6ec34b83a94f7ad0781797ab to your computer and use it in GitHub Desktop.

Select an option

Save queercat/7abcabbf6ec34b83a94f7ad0781797ab to your computer and use it in GitHub Desktop.
while true; do cat /dev/urandom | head -c 32 | base64 | { data=$(cat); length=$(echo -n "$data" | wc -m | awk '{print $1}'); echo -e "HTTP/1.1 200 OK\r\nContent-Length: $length\r\nContent-Type: text\r\n\r\n$data\r\n"; } | nc -l 1234; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment