by makmanalp · 13y ago · 0 comments
cake:~ mali$ telnet google.com 80
Trying 74.125.235.8...
Connected to google.com.
Escape character is '^]'.
GET / HTTP/1.1
.......
HTTP/1.1 200 OK
Date: Wed, 10 Jul 2013 22:25:02 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
At which point they go "oh cool" and go do something else. For the rest of us who use curl, wget, requests, Chrome / Firefox developer tools every day (who are we kidding, it's everyone, you liars! :P), the binary transformation would be transparent.Hell, if you're going for pure cool-factor, how is pulling out your hex editor less cool? But in reality, you'd never do this.
For a non-standardized and obscure protocol where tooling would likely be lacking, I can see why human readability is a good idea. But we're talking about the very protocol that makes up the fabric of the internet. Seriously, why?
Give me one good reason.
You've never needed to test an SMTP connection to see what the rejection message was on the remote server (when a user can't get you the bounced message you require)?
You never wanted to see if an SSH port was open and what version was running?
Telnet is available in every router and firewall I have, I can't install curl onto a router to generate a request from a remote network, and I'll never see wget there either.
I do this stuff every day as part of my job, telnet is the go-to, the other utilities are fine, but they usually mask what I'm really looking for anyway, if they are even available on the platform I am using in the first place.
Text protocols, on the other hand, require writing a parser, dealing with encoding back and forth between string representations and binary data, handling line delimiters, etc.
I'll take binary protocols any day of the week. Any cost they incur in not being human readable is offset by the value of them being so easy to implement.
Slowing down everyone forever just to ease telnet debugging is a misdirected optimization.
1. Debugging which headers were causing Amazon CloudFront to MISS requests originating from Android. tcpdump, observe request, repeat using netcat until the problem was pinpointed.
2. Debugging failed authentication on a dovecot IMAP, on one specific scenario. Again, tcpdump, reproduce, isolate and fix.
When I was a webdev (over the past few years) I did this at least once a month.
I'd daily look at the HTTP headers, though. Also, I'd often add custom headers for debugging purposes.
Edit: It's also not just telnet, it's being able to use simple scripts to automate requests or responses for many reasons.