Live data from Hacker News

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

mareksuppa.com

101–110 of 255 posts

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

#101

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

There's even a Rails-like framework for Bash: https://github.com/jneen/balls

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

#102
post #31

Earlier quoted context omitted.

This is the most Claude pilled comment I've seen here.

This worries me. Some AI writing styles became mainstream; at first it was the em-dashes, now it’s “A, not B” patterns and excessive acknowledging. There will be more. Was grandparent comment written by an LLM? Or is this a human who copies a style they saw in a blog post, unaware that they’re copying an AI? Or is this a human who spent too much time talking to an AI and now they just talk like this? Or is this an or…

So? That's literally how language works. The importance is not in the writing style, but in the content of the words.

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

#103
post #98
post #92

Earlier quoted context omitted.

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

yeah, i think you're right. i originally read a bit of snarky blow-off, like "eh?" ... but you know, now that i think of it, it's actually does have more of a friendly canadian style vibe.

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

#104
post #52

Earlier quoted context omitted.

This is the most Claude pilled comment I've seen here.

It's pretty rough to learn I sound like Claude. Will need to do something about it then. (For what it's worth I did write the message above manually but I understand why no one would believe that now. At least I did not call netcat "load-bearing" [ https://mareksuppa.com/til/load-bearing/ ] or something...)

I did not think you sounded like claude. Then I looked again after the comment was made and then I saw some of the vibes. Like acknowledging a mistake you have done.

Before that would just made you top 5% (or maybe top 1%) of the nicest people to talk too.. know ppl think you are Claude.

We are all going crazy s a sibling comment said.

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

#106
post #95

Once had a coworker tell me to never to use this because "you never know when the customer doesn't have bash installed; use python instead" even though our contract required that the customer had bash. I'm still laughing at that.

FWIW, some distributions (I forget which ones, but I've seen it more than once) compile bash without the network features. Python is ubiquitous, and I've never seen it subsetted this way, so I'd have sided with the coworker.

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

#109
post #12

Earlier quoted context omitted.

> No, it can not. Bash lets you open TCP sockets. Very fair pushback -- I did get carried away and will update the article to be more precise. Thanks for raising it! > For less insane, non-bash shells there is always nc which is usually probably the wiser choice. For completeness, `nc` or any netcat equvialent I could think of was not available in the image I was trying this with. It would certainly be a better optio…

This is the most Claude pilled comment I've seen here.

[deleted]

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

#110
post #73

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…

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

perhaps you meant "in previous millennium" ?
Post reply on HN