Quick Search for:  in language:    
VC6,NT40,SP3,TCP,NVT,DWORD,telnet,console,app
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
C/ C++ Stats

 Code: 715,766. lines
 Jobs: 107. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login





Latest Code Ticker for C/ C++.
Catch Me If U Can !!
By ashish & manas on 1/27


nOS ver 1.0
By - Snake - on 1/27


WordInFile.c -- look up a dictionary file for the word you just entered (source code only)
By Donald Bono on 1/27


WordInList.EXE -- search a dictionary file (included)
By Donald Bono on 1/27


Alymars Dice Roller
By roy sawyer III on 1/26


LCI_EXPORTER
By Leandro Pelorosso on 1/26


DLL Injection and API Hooking
By Daniel Cavalcanti on 1/26


Application Quick Launch v2
By Jerome Scott II on 1/26


Exe Locker1.0
By hardik shah on 1/26


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

Telnet Client By Ibrar Ahmad

Print
Email
 
winzip icon
Submitted on: 12/24/2000 2:07:05 PM
By: Ibrar Ahmed  
Level: Advanced
User Rating: By 8 Users
Compatibility:Microsoft Visual C++

Users have accessed this code 18346 times.
 
(About the author)
 
     Introduction This is a telnet console application that implements the Telnet client protocol (rfc854.) I have run it on VC6, NT4.0 SP3 Telnet The purpose of the TELNET Protocol is to provide a fairly general, bi-directional, eight-bit byte oriented communications facility. Its primary goal is to allow a standard method of interfacing terminal devices and terminal-oriented processes to each other. It is envisioned that the protocol may also be used for terminal-terminal communication ("linking") and process-process communication (distributed computation). General Considerations A TELNET connection is a Transmission Control Protocol (TCP) connection used to transmit data with interspersed TELNET control information. The TELNET Protocol is built upon three main ideas: first, the concept of a "Network Virtual Terminal"; second, the principle of negotiated options; and third, a symmetric view of terminals and processes. When a TELNET connection is first established, each end is assumed to originate and terminate at a "Network Virtual Terminal", or NVT. An NVT is an imaginary device, which provides a standard, network-wide, intermediate representation of a canonical terminal. This eliminates the need for "server" and "user" hosts to keep information about the characteristics of each other's terminals and terminal handling conventions. All hosts, both user and server, map their local device characteristics and conventions so as to appear to be dealing with an NVT over the network, and each can assume a similar mapping by the other party. The NVT is intended to strike a balance between being overly restricted (not providing hosts a rich enough vocabulary for mapping into their local character sets), and being overly inclusive (penalizing users with modest terminals). This Project has five Main Classes CSocketDx CSocketDx Class is used to establish TCP connection. It has 3 functions CSocketDx(char *,int); ~CSocketDx(); int Create(); int Connect(); SOCKET TelnetConnect(); CSocketRx CSocketRx Class is used to Receive data. It has only one thread. CSocketRx(); CSocketRx(SOCKET,HANDLE&); virtual ~CSocketRx(); static DWORD RdTh(CSocketRx *); CSocketTx CSocketTx Class is used to Send data. It has only one thread. CSocketTx(SOCKET,HANDLE&); virtual ~CSocketTx(); static DWORD SendTh(CSocketTx*); CProtocolRx CProtocolRx Class is used Implement Telnet protocol. inline void yesreply(SOCKET server, _verb verb,_option option); inline void noreply(SOCKET server, _verb verb,_option option); inline void askfor(SOCKET server, _verb verb,_option option); void TelentProtcol(SOCKET server,unsigned char code); Platforms I have run it on VC6, NT4.0 SP3; I did not test it on 95 and VC5 Limitations Cannot handle arrow keys

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 3 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
10/2/2001 6:52:57 AM:Flavio Tartarini
Thank you very much Ibrar!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/29/2002 8:35:47 AM:manju
hello .
when i tried connecting your 
client to a telnet server('good tech' 
server) I'm getting junk values along 
with the data sent by the server. Can 
you please please tell/ suggest what 
the problem is ? i tried connecting to 
the server using other clients(dtelnet) 
and found it was working properly. 
can you tell me what i should do to 
correct the problem in ur 
client.
looking forward to your 
reply.
thank 
you
manju
manju_shan@yahoo.com
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/14/2003 7:24:47 AM:
Hello Ibrar,
I have made changes in 
your code using C, I am unable to 
receive the login prompt of the Telnet 
Server.
What should I do incase 
converted to C.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | C/ C++ Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.