3 ms·
> Could I make a bash one-liner that uses a rube goldberg machine of echo, netcat, dd, ed etc. to make a HTTP request? Yeah I could Can you paste your bash one
by maratc 4y ago
> Could I make a bash one-liner that uses a rube goldberg machine of echo, netcat, dd, ed etc. to make a HTTP request? Yeah I could
Can you paste your bash one-liner here?
As previously, I’m interested in seeing your Rube Goldberg machine, and mainly for adoration, not practical use. `curl`, as previously, would not qualify.
- 22c 4y agoThe basics is something like `printf "GET /\r\n" | nc neverssl.com 80` (interestingly this is considered a HTTP 0.9 request, which HTTP 1.0 compliant servers need to handle). Add in few useless pipes to cat and dd, and you got yourself a Rube Goldberg machine.
- jsjohnst 4y ago> interestingly this is considered a HTTP 0.9 request, which HTTP 1.0 compliant servers need to handle For GP, the reason this is an HTTP/0.9 request is because it doesn’t specify a version number on the GET line (HTTP/1.0 would require that to be “GET / HTTP/1.0\r\n\r\n”). HTTP/0.9 was the “one-line” version of HTTP before headers and such were added. Not sure if @22c intended the pun there, but if so, we’ll played!