TELNET


USING THE POWER OF TELNET COMMAND

Telnet is a network protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspersed in-band with Telnet control information in an 8-bit byte oriented data connection over the Transmission Control Protocol (TCP).

The Telnet commands allow you to communicate with a remote computer that is using the Telnet protocol. You can run Telnet without parameters in order to enter the Telnet context, indicated by the Telnet prompt (Microsoft Telnet>). From the Telnet prompt, use the Telnet commands to manage a computer running Telnet Client.

description

description

Telnet is a client-server protocol, based on a reliable connection-oriented transport.

Typically this protocol is used to establish a connection to Transmission Control Protocol (TCP) port number 23, where a Telnet server application (telnetd) is listening.

To know more on the List of TCP and UDP port numbers [Official, Unofficial, Multiple use] : http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

INTERNET PROTOCOLS

Application layer:
DHCP DHCPv6 DNS FTP HTTP IMAP IRC LDAP MGCP NNTP BGP NTP POP RPC RTP RTSP RIP SIP SMTP SNMP SOCKS SSH Telnet TLS/SSL XMPP (more: http://en.wikipedia.org/wiki/Category:Application_layer_protocols)

Transport layer:
TCP UDP DCCP SCTP RSVP (more: http://en.wikipedia.org/wiki/Category:Transport_layer_protocols)

Internet layer:
IP IPv4 IPv6 ICMP ICMPv6 ECN IGMP IPsec (more: http://en.wikipedia.org/wiki/Category:Internet_layer_protocols)

Link layer:
ARP/InARP NDP OSPF Tunnels L2TP PPP Media access control Ethernet DSL ISDN FDDI (more: http://en.wikipedia.org/wiki/Category:Link_protocols)

HOW TO CLOSE AN ACTIVE TELNET CONNECTION?

Linux:
After programme has completed its execution and returned a response, you can hit enter twice to close the connection.

In case the response is taking longer, the terminal will show a “C:ANSI>” (character) to close connection.
To close the telnet connection, “CTRL” + ” ] ” or “CTRL” + ” ^] ” have to be pressed.

Note: One should never use “CTRL” + “C”.

Windows:
in windows its a little tricky but not hard, to end your current telnet connection
Point the cursor on telnet prompt and type quit.

Following are the steps to quit (Prompt: Microsoft Telnet>):
1. Open the telnet prompt by holding down the “Ctrl” key and push the ‘]’ key.
2. Type “quit”.
3. Push the “Enter” key.

EXAMPLE

Linux:

$> telnet <host_domain_name>
Trying <host_domain_name>...
 Connected to <host_domain_name> (<host_domain_IP_address>).
 Escape character is '^]'.
GET /index.php?id=12323&action=news HTTP/1.1
 Host: <host_domain_name>
 Cookie: <cookie_info>
 Connection: close
O/P
HTTP/1.1 200 OK
 Date: Sun, 20 Jan 2010 09:10:42 GMT
 Server: Apache
 Vary: Accept-Encoding
 Content-Length: 7
 Connection: close
 Content-Type: text/html
Success

Note: always add connection close explicitly or else the multiple connections will be left open and unused

Advertisements

PHP Interview With Manuel Lemos Founder Of PHPClasses.org


Manuel Lemos Founder Of PHPClasses.org gave a wonderful insight on PHP, following are some key points that stand out.

To begin with here is an opening statement:

Focus On The Problems Rather Than The Means To Solve Them

  1. This is the #31st set of PHP Interview to help aspiring PHP developers and PHP fans alike to get inspired by listening from those PHP guys who are already highly involved into the PHP Ocean
  2. Its is an opportunity for new PHPers to get to know their PHP Elders
  3. PHP is the pragmatic spirit of the people that developed the language features
  4. Developers that have came out of college recently are a bit obsessed to use all the design patterns they learned in school.
  5. Your software should be self-explanatory even without comments. It should be easy to read and understand what it does.
  6. Unnecessary complexity will cost more to develop
  7. IMP: Practice a lot
  8. If your day job is to work for somebody else, try creating your own sites for an useful purpose
  9. The best PHP book: The PHP online manual
  10. To debug your PHP code : error_log() and print_r() is what I often use in my development environment to inspect values and output them in a way that does not interfere with the execution of the code
  11. PHP is so powerful that it already provides the basic building blocks to do it with minimal amount of code.
  12. For database abstraction I use Metabase which is package that I started in 1999

For more information on PHP Interview With Manuel Lemos Founder Of PHPClasses.org visit :
http://7php.com/php-interview-manuel-lemos/#Purpose_Of_This_Interview

Based on the interview I can easily say that we should apply the KISS principle (“Keep it simple, stupid”), as it becomes very easy to manage and run code and keeping in mind the end result i.e. Users Satisfaction