{"id":22419918,"url":"https://github.com/ravijo/simple-telnet-client","last_synced_at":"2026-04-19T15:02:04.682Z","repository":{"id":54476342,"uuid":"522389234","full_name":"ravijo/simple-telnet-client","owner":"ravijo","description":"Simplest Telnet Client Ever Made in C/C++ ","archived":false,"fork":false,"pushed_at":"2022-08-16T06:38:40.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T08:49:54.553Z","etag":null,"topics":["c","cpp","networking","telnet","telnet-client","telnetlib","wrapper"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ravijo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-08T03:13:30.000Z","updated_at":"2022-11-22T02:53:08.000Z","dependencies_parsed_at":"2022-08-13T17:00:47.613Z","dependency_job_id":null,"html_url":"https://github.com/ravijo/simple-telnet-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ravijo/simple-telnet-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fsimple-telnet-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fsimple-telnet-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fsimple-telnet-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fsimple-telnet-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ravijo","download_url":"https://codeload.github.com/ravijo/simple-telnet-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ravijo%2Fsimple-telnet-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268017015,"owners_count":24181657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cpp","networking","telnet","telnet-client","telnetlib","wrapper"],"created_at":"2024-12-05T16:17:07.971Z","updated_at":"2026-04-19T15:02:04.675Z","avatar_url":"https://github.com/ravijo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-telnet-client\nSimplest Telnet Client Ever Made in C/C++ \n\n\n## Dependencies\n1. [libtelnet](https://github.com/seanmiddleditch/libtelnet): Install it easily using the folllwing command:\n    ```console\n    $ sudo apt install libtelnet-dev\n    ```\n    _Not required for Docker users_. See [using docker](#using-docker) section.\n\n## Installation\n1. Make sure to download the repository. Use `git clone https://github.com/ravijo/simple-telnet-client.git` or download zip as per your convenience.\n2. Create build directory and go inside it using `mkdir build \u0026\u0026 cd build`\n3. Invoke `cmake` as `cmake ..`\n3. Build files using `make`\n\n## Debug\nIn order to see the request and response from the server, please set `DEBUG_MODE` as shown below:\nhttps://github.com/ravijo/simple-telnet-client/blob/84a05652415afc40d7171fbea5a5a33f98f60a80/include/simple_telnet_client/telnet_client.hpp#L17-L18\n\n## Run\n1. Please set the IP address and port number of the telnet server as shown below:\nhttps://github.com/ravijo/simple-telnet-client/blob/84a05652415afc40d7171fbea5a5a33f98f60a80/src/main.cpp#L14\n2. Do not forget to compile after changes\n3. Invoke the client using `./client` as shown below:\n    ```console\n    $ ./client\n    response: [Welcome\n    ]\n    response: [\n    ]\n    request: [INIT\n    ]\n    response: [OK\n    ]\n    request: [READ PT3\n    ]\n    response: [OK\n    ]\n    request: [READ PT4\n    ]\n    response: [OK\n    ]\n    request: [REM PT3\n    ]\n    response: [OK\n    ]\n    ```\n\n\n## Using `libtelnet` Installed on Custom Location\n1. If the `libtelnet` is installed on a custom locaton, we need to provide its path in `CMakeLists.txt`.\n2. First, let's find out where is our `libtelnet`\n    ```console\n    $ whereis libtelnet\n    libtelnet: /usr/lib/x86_64-linux-gnu/libtelnet.so /usr/lib/x86_64-linux-gnu/libtelnet.a /usr/include/libtelnet.h\n    ```\n3. Now, using the above information, we need to modify `CMakeLists.txt` as shown below:\n    ```CMakeLists.txt\n    set(TELNET_INCLUDE_DIR\n      /usr/include\n    )\n    \n    set(TELNET_LIBRARY\n      /usr/lib/x86_64-linux-gnu/libtelnet.so\n    )\n    \n    include_directories(include\n      ${TELNET_INCLUDE_DIR}\n    )\n    \n    add_executable(client\n      src/telnet_client.cpp\n      src/main.cpp\n    )\n    \n    target_link_libraries(client\n      ${TELNET_LIBRARY}\n    )\n    ```\n\n\n## Using Docker\nThe package can be installed using Docker for testing purposes. Please use the following commands to build and run the docker:\n1. Build Docker\n    ```console\n    ravi@dell:~/simple-telnet-client$ docker build -t client .\n    Sending build context to Docker daemon  92.67kB\n    Step 1/8 : FROM ubuntu:20.04\n     ---\u003e 3bc6e9f30f51\n    Step 2/8 : ENV TZ=Asia/Tokyo\n     ---\u003e f8e22625db16\n    .\n    .\n    .\n    Step 8/8 : WORKDIR /simple-telnet-client/build\n     ---\u003e efb6c90e291e\n    Successfully built efb6c90e291e\n    Successfully tagged client:latest\n    ```\n2. Run Docker\n    ```console\n    ravi@dell:~/simple-telnet-client$ docker run -it client\n    root@0ebe27c82992:/simple-telnet-client/build# \n    ```\n3. CMake Porject\n    ```console\n    root@0ebe27c82992:/simple-telnet-client/build# cmake ..\n    -- The C compiler identification is GNU 9.4.0\n    .\n    .\n    .\n    -- Configuring done\n    -- Generating done\n    -- Build files have been written to: /simple-telnet-client/build\n    ```\n4. Make Project\n    ```console\n    root@0ebe27c82992:/simple-telnet-client/build# make\n    Scanning dependencies of target client\n    [ 33%] Building CXX object CMakeFiles/client.dir/src/telnet_client.cpp.o\n    [ 66%] Building CXX object CMakeFiles/client.dir/src/main.cpp.o\n    [100%] Linking CXX executable client\n    [100%] Built target client\n    ```\n\n\n## References\n1. [libtelnet](https://github.com/seanmiddleditch/libtelnet)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravijo%2Fsimple-telnet-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fravijo%2Fsimple-telnet-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fravijo%2Fsimple-telnet-client/lists"}