Live data from Hacker News

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

mareksuppa.com

91–100 of 255 posts

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

#91
post #83

Earlier quoted context omitted.

You've gained that happening much less frequently. The tradeoff is making every other problem harder to diagnose.

Debug containers are a thing. Add an ephemeral container to an already running pod, for example to add debugging utilities without restarting the pod. https://kubernetes.io/docs/reference/kubectl/generated/kubec...

Yup! They are a good solution to the massive problem you caused for yourself by implementing a different "solution" to a non-problem.

And even that's only true if you assume kubernetes is the only place your container runs where you might want to also debug it.

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

#92
post #50

Earlier quoted context omitted.

because in those days there was no curl, or wget. and then when there was, there was no guarantee they'd be installed. telnet was always there though. it also worked for speaking all the other plaintext internet protocols. (imap, pop, smtp, etc)

I used telnet to send mail via SMTP once, it's quite literally a good social protocol because it begins with a polite 'HELO'.

the '90s version of finding the hiring manager or boss on linkedin to try and get a job was connecting to the company's public smtp server with telnet, using their name to probe different email address patterns with "rcpt to:" (those days the actual servers were often directly connected to the internet and would leak email address validity in how they would respond to rcpt to) and then sending them a nice email.

smtp grew up to be an antisocial curmudgeon. extended smtp starts with EHLO.

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

#93
post #92

Earlier quoted context omitted.

I used telnet to send mail via SMTP once, it's quite literally a good social protocol because it begins with a polite 'HELO'.

the '90s version of finding the hiring manager or boss on linkedin to try and get a job was connecting to the company's public smtp server with telnet, using their name to probe different email address patterns with "rcpt to:" (those days the actual servers were often directly connected to the internet and would leak email address validity in how they would respond to rcpt to) and then sending them a nice email. smtp…

> smtp grew up to be an antisocial curmudgeon. extended smtp starts with EHLO.

email will become so unusable, next one will have to be HELNO i guess

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

#94
post #78

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…

When I was 12, I learned about open SMTP relays and how to spoof email this way. I once spoofed an email between two rivals on a community I was a part of and started a flame war. Good times.

I once made an enemy on AOL and he was a spammer--he put my email in the from: field and I got a lot of hostile emails.

But the joke's on him--it led directly to me meeting a lifelong friend & mentor.

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

#96
post #91
post #83

Earlier quoted context omitted.

Debug containers are a thing. Add an ephemeral container to an already running pod, for example to add debugging utilities without restarting the pod. https://kubernetes.io/docs/reference/kubectl/generated/kubec...

Yup! They are a good solution to the massive problem you caused for yourself by implementing a different "solution" to a non-problem. And even that's only true if you assume kubernetes is the only place your container runs where you might want to also debug it.

You want to ship every debug utility you will need in every image? Just seems wasteful. What about 3rd party images, you will respin images just to add your preferred toolset?

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

#98
post #92

Earlier quoted context omitted.

I used telnet to send mail via SMTP once, it's quite literally a good social protocol because it begins with a polite 'HELO'.

the '90s version of finding the hiring manager or boss on linkedin to try and get a job was connecting to the company's public smtp server with telnet, using their name to probe different email address patterns with "rcpt to:" (those days the actual servers were often directly connected to the internet and would leak email address validity in how they would respond to rcpt to) and then sending them a nice email. smtp…

> smtp grew up to be an antisocial curmudgeon. extended smtp starts with EHLO.

"EHLO" still sounds friendly. It just sounds like a different accent or something. Know someone that used to answer calls with a friendly "Jello?".

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

#100
post #96
post #91

Earlier quoted context omitted.

Yup! They are a good solution to the massive problem you caused for yourself by implementing a different "solution" to a non-problem. And even that's only true if you assume kubernetes is the only place your container runs where you might want to also debug it.

You want to ship every debug utility you will need in every image? Just seems wasteful. What about 3rd party images, you will respin images just to add your preferred toolset?

Nope, not my position at all. I want to have a minimal OS environment with rudimentary tools available with zero extra friction. FROM alpine:latest adds less than 10MB and covers 95% of use cases. Typically depending on the container I will often throw in curl and some other QoL tools too.

For the rare cases where you find yourself needing to attach a debugger to your pods running in staging/prod, a debug container is absolutely the right tool to reach for.

Post reply on HN