{"id":14235558,"url":"https://github.com/ruby/net-telnet","last_synced_at":"2025-04-04T00:10:42.029Z","repository":{"id":30490459,"uuid":"34044590","full_name":"ruby/net-telnet","owner":"ruby","description":"Provides telnet client functionality.","archived":false,"fork":false,"pushed_at":"2024-05-05T23:21:55.000Z","size":47,"stargazers_count":56,"open_issues_count":12,"forks_count":36,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-20T20:08:33.544Z","etag":null,"topics":["hacktoberfest","ruby","telnet"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-16T08:47:23.000Z","updated_at":"2024-12-17T08:12:38.000Z","dependencies_parsed_at":"2024-05-05T17:26:11.786Z","dependency_job_id":"acc742fc-a5c2-4370-ba29-b41f07085d90","html_url":"https://github.com/ruby/net-telnet","commit_stats":{"total_commits":41,"total_committers":10,"mean_commits":4.1,"dds":0.2195121951219512,"last_synced_commit":"d59d9af83c5d0d30e6afe84f8f9c3ce5228b2e99"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-telnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-telnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-telnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fnet-telnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/net-telnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246207492,"owners_count":20740723,"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","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":["hacktoberfest","ruby","telnet"],"created_at":"2024-08-20T21:02:04.908Z","updated_at":"2025-04-04T00:10:41.999Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# Net::Telnet\n\nProvides telnet client functionality.\n\nThis class also has, through delegation, all the methods of a socket object (by default, a **TCPSocket**, but can be set by the **Proxy** option to ```new()```).  This provides methods such as ```close()``` to end the session and ```sysread()``` to read data directly from the host, instead of via the ```waitfor()``` mechanism.  Note that if you do use ```sysread()``` directly when in telnet mode, you should probably pass the output through ```preprocess()``` to extract telnet command sequences.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'net-telnet'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install net-telnet\n\n## Usage\n\n### Log in and send a command, echoing all output to stdout\n\n```ruby\nlocalhost = Net::Telnet::new(\"Host\" =\u003e \"localhost\",\n                             \"Timeout\" =\u003e 10,\n                             \"Prompt\" =\u003e /[$%#\u003e] \\z/n)\nlocalhost.login(\"username\", \"password\") { |c| print c }\nlocalhost.cmd(\"command\") { |c| print c }\nlocalhost.close\n```\n\n### Check a POP server to see if you have mail\n\n```ruby\npop = Net::Telnet::new(\"Host\" =\u003e \"your_destination_host_here\",\n                       \"Port\" =\u003e 110,\n                       \"Telnetmode\" =\u003e false,\n                       \"Prompt\" =\u003e /^\\+OK/n)\npop.cmd(\"user \" + \"your_username_here\") { |c| print c }\npop.cmd(\"pass \" + \"your_password_here\") { |c| print c }\npop.cmd(\"list\") { |c| print c }\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\n1. Fork it ( https://github.com/ruby/net-telnet/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fnet-telnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fnet-telnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fnet-telnet/lists"}