Live data from Hacker News

TIL: You can make HTTP requests without curl using Bash /dev/TCP

mareksuppa.com

231–240 of 255 posts

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#231

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…

I sent many an email from jacques.chirac@elysee.fr, the veneer of the terminal helping, my friends were quite impressed by how good a hacker I was. Good olde days when many DKIM/SPF weren't a thing yet and SMTP servers weren't even authenticated.

It was quite fun.

But at my first work (begining of 2000s) there was one person that made a fun email, using From of head of company (or was it head of that particular division) to his coworker with congratulations for pay increase and promotion. It would be all great, but that coworker didn't catch the joke and replied to it (person in the From wasn't amused). Author of the joke was fired (which is not easy thing to do in Europe), some people don't catch jokes.

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#232
post #139

Earlier quoted context omitted.

I always recommend to not have any dependencies outside of the code. So we start at compiling the codebase (Rust) against MUSL. That way we can run it with FROM scratch images. If we need more tooling available at runtime, then we look at alpine, but still using MUSL. If MUSL itself is proving problematic, or if some of the libraries we use need glibc then we can look at using some locked down image. The cool part ab…

preface: I'm not asking things rhetorically, I genuinely want to learn here. > to not have any dependencies outside of the code. > ... FROM scratch images is that you'll never have to update your base image to address CVEs... So a FROM scratch image, basically doesn't have things like a package manager to install things, and maybe also libraries that things like curl would depend on? Sorry for my ignorance, I've hear…

There is nothing there.

If you want to run as another user, you need to manually add an /etc/group & /etc/password (or generate them in a stage before that and copy them over).

If you need ca-certificates, you need to install ca-certificates in a stage before that and copy over /etc/ssl/certs/ca-certificates.crt from that stage to your current one.

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#234

Earlier quoted context omitted.

> 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.

The entirety of 1999 and 2000 was a nightmare. "No, buddy, we won't change millenium next january." "Nope. We are still in the 20th century." And so on... I think that's more or less when I lost faith in humanity.

But they were right and you were wrong. Your mistake is in thinking that years are cardinal numbers when they're actually ordinal.

The current year counting was based on the same way years were counted in the past, so you had things like "the 10th year of Caesar's reign". So the year 1 A D. was the first year of Christ's reign.

The year 2000 was the 2000th year of Christ's reign so that's what is celebrated.

Alternatively, you don't really care about that and it's called Common Era now anyway, but in that case it's entirely arbitrary. So either way, calling 2001 the New Millennium is wrong!

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#235

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…

I sent many an email from jacques.chirac@elysee.fr, the veneer of the terminal helping, my friends were quite impressed by how good a hacker I was. Good olde days when many DKIM/SPF weren't a thing yet and SMTP servers weren't even authenticated.

When I was working at the computing center at University of Illinois at Chicago in the 80s, we found a fairly simple route to spoofing emails from other users through batch jobs on the MVS side of our mainframe. It came crashing to a halt when someone sent a spoofed email from the director to one of the other employees saying that they were fired and to bring their keys to her office immediately. I think the person responsible nearly lost his job over that, but as I recall, the ability to do this was never closed.

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#236

Earlier quoted context omitted.

Pure Linux doesn't.

Interesting. I have never heard kernel modules being regarded as non-linux, not in 30 years of LKM. Further compiling a monolithic Kernel is rather straight forward, in this day it is even possible to find wifi devices that do not require a an on device firmware blob uploaded from the kernel.

Same, this whole thread is like the twilight zone for me... I can't tell if I'm losing my mind or all the people with this way of thinking are just being completely unreasonable but I've never seen several people at once agree with such a ridiculous (to me) comment.

Reminds me of the time on libera IRC when someone told me "cloud storage does not exist" because they were hung up on some ultra-purist word definition that nobody else shared.

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#237

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…

I was in the hospital at 13, 7 hours from home, and lonely. They had a councilor there who took pity on me and agreed to let me use her computer to check my email. Only provision was that I couldn't install anything, and couldn't change any settings.

She stood behind me and watched bemused as I fired up telnet, connected to my ISP's pop server and started reading emails from friends. I think I did manage to send some emails back via SMTP but I was not as good with that protocol.

If you could bottle the creativity and enthusiasm of a bored teen, I'm pretty sure you could take over the world

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#238
post #73

Earlier quoted context omitted.

Last century I would read and send personal email from work using telnet to pop3 and smtp respectively.

perhaps you meant "in previous millennium" ?

Excuse me while I crumble to dust...

Re: TIL: You can make HTTP requests without curl using Bash /dev/TCP

#240

Earlier quoted context omitted.

With agents in the house now, we don't use curl at all. Slowly they all are becoming implementation details.

Probably curl is safer than whatever cobbled up bash script your agent invented. Battle tested for years, and free, why replace that?

Also considering libcurl which is an excellent, feature rich, high performance, and battle tested http client.
Post reply on HN