Click here to Skip to main content
15,883,975 members
Articles / Desktop Programming / MFC
Article

NT Telnet server and client

Rate me:
Please Sign up or sign in to vote.
4.83/5 (15 votes)
22 Nov 19991 min read 218.2K   10.4K   44   29
CTelnetView is a class derived from CView that implements a telnet client session with history.
  • Download client source - 22 Kb
  • Download server source - 22 Kb

    Sample Image

    The Telnet Client view

    CTelnetView is a class derived from CView that implements a telnet client session with history. It can be useful in building a remote administration tool or a full-blown telnet client. As implemented the terminal emulation is for TTY only and no escape sequences (VT100) or ANSI control codes are recognized

    The socket instance and connect logic are all resident in the view. As a result an MDI app that allows acces to multiple servers is easily built.

    All of the interesting stuff is in the class CTelnetView and in the Socket class. All of the other classes are exactly as made by the DevStudio Project Wizard EXCEPT that a call to initialize winsock has been added to the App class.

    The Telnet Server

    In addition to the client above I have included a complete Telnet Server (Daemon). I had a hard time finding a good one for NT (it will not work for 95/98, don't know about 2000) so I wrote this one. It is a SINGLE USER server, only one session at a time can be running. It is, however a nice example of how to use the NT CreateProcessAsUser facility.

    It is an NT service. To install use:

    TelnetServer_NT -i

    To start it use:

    TelnetServer_NT -s

    Acknowledgements

    The TelnetServer project uses the excellent NT Service wrapper class by Joerg Koenig. Thanks for the great code.

  • License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    Written By
    United States United States
    This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

    Comments and Discussions

     
    GeneralMy vote of 5 Pin
    (BlackBox) Ethical Hacker31-Oct-10 5:36
    (BlackBox) Ethical Hacker31-Oct-10 5:36 
    GeneralError executing link.exe Pin
    Member 168813027-Jan-05 6:44
    Member 168813027-Jan-05 6:44 
    Generalno command line prompter in the app window Pin
    LaciPosta2-Jun-04 1:59
    LaciPosta2-Jun-04 1:59 
    Generalhelp on using the client Pin
    LaciPosta2-Jun-04 0:55
    LaciPosta2-Jun-04 0:55 
    GeneralIs this project still going Pin
    yacc20009-Jan-04 21:54
    yacc20009-Jan-04 21:54 
    GeneralIs this project still going Pin
    Anonymous9-Jan-04 21:46
    Anonymous9-Jan-04 21:46 
    Generalescape sequence support... Pin
    sunilch8-Jan-03 23:41
    sunilch8-Jan-03 23:41 
    GeneralRe: escape sequence support... Pin
    Ayourk1-Apr-04 19:09
    Ayourk1-Apr-04 19:09 
    Generaltelnet client! Pin
    nairutya24-Dec-02 11:31
    nairutya24-Dec-02 11:31 
    GeneralRe: telnet client! Pin
    vramalingam23-Jun-03 11:15
    vramalingam23-Jun-03 11:15 
    GeneralMemory usage increases to 100% Pin
    Vidhyaa Shankar28-Feb-02 2:07
    Vidhyaa Shankar28-Feb-02 2:07 
    GeneralWow thanks (made it into Dialog Based) Pin
    21-Feb-02 17:27
    suss21-Feb-02 17:27 
    GeneralRe: Wow thanks (made it into Dialog Based) Pin
    Amjad W. Hawash18-Mar-02 2:42
    Amjad W. Hawash18-Mar-02 2:42 
    GeneralI did dialog based!!!! Pin
    Endaroza20-Mar-02 2:34
    Endaroza20-Mar-02 2:34 
    GeneralRe: I (partially) did dialog based (and i'llshare) Pin
    Amjad W. Hawash20-Mar-02 2:55
    Amjad W. Hawash20-Mar-02 2:55 
    GeneralRe: I did dialog based!!!! Pin
    Amjad W. Hawash5-May-02 2:43
    Amjad W. Hawash5-May-02 2:43 
    GeneralRe: I did dialog based!!!! Pin
    21-May-02 8:40
    suss21-May-02 8:40 
    GeneralCode analysers for VC++ Pin
    Mangesh Sardesai3-Jul-01 21:57
    Mangesh Sardesai3-Jul-01 21:57 
    GeneralLicense issues Pin
    Chaney3-Jul-01 21:53
    Chaney3-Jul-01 21:53 
    GeneralRe: License issues Pin
    Daniel Turini18-Jul-02 3:42
    Daniel Turini18-Jul-02 3:42 
    GeneralError Compiling TelnetServer Pin
    Thorsten Hering2-Nov-00 2:06
    sussThorsten Hering2-Nov-00 2:06 
    GeneralRe: Error Compiling TelnetServer Pin
    29-May-01 10:58
    suss29-May-01 10:58 
    GeneralRe: Error Compiling TelnetServer Pin
    13-Aug-01 6:54
    suss13-Aug-01 6:54 
    GeneralRe: Error Compiling TelnetServer Pin
    17-Feb-02 2:38
    suss17-Feb-02 2:38 
    GeneralRe: Error Compiling TelnetServer Pin
    17-Nov-01 0:26
    suss17-Nov-01 0:26 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.