5 202
TIL: You can make HTTP requests without curl using Bash /dev/TCP
• Bash can open TCP sockets using /dev/tcp/host/port redirection for HTTP requests. • You can send HTTP GET requests by writing raw HTTP headers to the socket. • This method works only for plaintext HTTP, no TLS or advanced HTTP features like redirects. • The 'Connection: close' header ensures the server closes connection to end the response. • Not POSIX standard: requires bash compiled with --enable-net-redirections; doesn't work in dash or zsh.#BashTips #DockerNetworking #HTTPRequestsRead more | Comments | @hackernws
16 июня, 16:26
