PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 13, 2022

[FIXED] why can we use telnet to connect http or memcached?

 November 13, 2022     http, memcached, telnet     No comments   

Issue

I use to think that telnet, http and memcached use different protocol, but surprisely, we can use telnet to connect http and memcached server.

why?


Solution

Many protocols are simply ASCII characters, in a certain sequence/order, back and forth between client and server. And Telnet was one of the first text-based protocols developed (in 1969, per Wikipedia). Protocols that followed later, like FTP, SMTP, HTTP, etc all built on that text-based protocol. And later, things like memcached (and Redis) did as well; it is easier to debug a text-based protocol, since a human can easily "read" the messages going back and forth.

And to say that memcached protocol, FTP, SMTP, HTTP, etc are different protocols is true -- but this does not mean that they have things in common, such as being text-based.

There are many non-text-based protocols as well (e.g. SSH, TLS, others); for these, using Telnet will not work. Telnet, then, is such a simple network client that transmits text messages that it can be used to perform almost any other text-based protocol "manually".

Hopefully this helps!



Answered By - Castaglia
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing