As a kid in the late 90s my mind was blown when I realized I could telnet to port 80, 25, or 110 and interact with the servers manually. Simple get: GET / HTTP/1.1 Content-Type: text/html User-Agent: l33t hax0rs lol X-Funny-Monkey: farts For sending a mail message on port 25: HELO mail-from: whoever@whatever.com mail-to: sysadmin@yaya.com Body of the message yay. POP3 was so long ago I forgot but you could list the m…
Back in those days not only was there was no DKIM or SPF, most SMTP servers would accept email from anyone anywhere to anyone anywhere (i.e. 'open relay').
TIL: You can make HTTP requests without curl using Bash /dev/TCP
161–170 of 255 posts
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#162https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=146464#37>
As others have mentioned, there are numerous other ways to directly access network features using shell tools, including curl (noted in TFA's title), wget, the HEAD and GET commands (from Perl), netcat (nc), socat, telnet, and I'm quite sure others.
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#163As a kid in the late 90s my mind was blown when I realized I could telnet to port 80, 25, or 110 and interact with the servers manually. Simple get: GET / HTTP/1.1 Content-Type: text/html User-Agent: l33t hax0rs lol X-Funny-Monkey: farts For sending a mail message on port 25: HELO mail-from: whoever@whatever.com mail-to: sysadmin@yaya.com Body of the message yay. POP3 was so long ago I forgot but you could list the m…
I must have tried to write the same "perfect" IRC client from scratch in C a dozen times growing up...
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#164Earlier quoted context omitted.
perhaps you meant "in previous millennium" ?
If someone referred to the "previous decade" in 2004, would you have said the same thing? As the calendar rolled from 1999 to 2000, we entered a new millennium, century, decade, year, day, ...
no, that all happened when we rolled from 2000 to 2001.
smh, even paedants today aren't what they used to be.
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#165As a kid in the late 90s my mind was blown when I realized I could telnet to port 80, 25, or 110 and interact with the servers manually. Simple get: GET / HTTP/1.1 Content-Type: text/html User-Agent: l33t hax0rs lol X-Funny-Monkey: farts For sending a mail message on port 25: HELO mail-from: whoever@whatever.com mail-to: sysadmin@yaya.com Body of the message yay. POP3 was so long ago I forgot but you could list the m…
But can you imagine the look on some young teen’s face when they train their own GPT on their local computer for the first time?
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#166> As it turns out, bash can speak HTTP by itself. No, it can not. Bash lets you open TCP sockets. What you are doing here is trying to speak HTTP yourself, which is fine for testing and debugging, and hella cool for fun to do by hand, but you will shoot yourself in the foot if you try to use this pseudo http client unattended in reality. This toy code does not parse HTTP properly and will break. You could of course w…
https://sdomi.pl/weblog/15-witchcraft-minecraft-server-in-ba...
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#167Earlier quoted context omitted.
Back in those days not only was there was no DKIM or SPF, most SMTP servers would accept email from anyone anywhere to anyone anywhere (i.e. 'open relay').
With agents in the house now, we don't use curl at all. Slowly they all are becoming implementation details.
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#168Earlier quoted context omitted.
Need to be clear that "full http server in pure bash" is incorrect. Bash cannot listen on a TCP/UDP socket for incoming connections. bash-web-server project builds a C language socket listener [0] that is dynamically loaded at run-time as a "built-in" module that makes the functionality available. [0] https://github.com/bahamas10/bash-web-server/tree/main/loada...
By this logic, Linux does not support Wi-Fi, because all the driver modules are "dynamically loaded at run-time."
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#169Earlier quoted context omitted.
If the base image I use is based on Debian, it comes with more than 15 binaries that I don't use. But when Docker scans my image and notices that there is a CVE in one of those binaries, my image is currently out of compliance. FROM scratch just reduces the surface.
> FROM scratch just reduces the surface. The actual attack surface of your application? Or the attack surface of you and your team's attention from a busybody security org. It's important not to confuse the two.
Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP
#170As a kid in the late 90s my mind was blown when I realized I could telnet to port 80, 25, or 110 and interact with the servers manually. Simple get: GET / HTTP/1.1 Content-Type: text/html User-Agent: l33t hax0rs lol X-Funny-Monkey: farts For sending a mail message on port 25: HELO mail-from: whoever@whatever.com mail-to: sysadmin@yaya.com Body of the message yay. POP3 was so long ago I forgot but you could list the m…