GithubHelp home page GithubHelp logo

digitalysin / go-telnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mtojek/go-telnet

0.0 1.0 0.0 21 KB

Read bytes from stdin and pass them to the remote host

License: Apache License 2.0

Makefile 8.47% Go 91.53%

go-telnet's Introduction

go-telnet

Build Status

Status: Done

Read bytes from stdin and pass them to the remote host. The application works similarly to the well known telnet application, but it lets you read bytes from standard input and wait for response.

Problem Definition

Old telnet does not work in that manner and it requires a script based on expect command. Trying an intuitive solution would end up with that:

$ cat resources/input-data/wp.pl_1.bin | telnet wp.pl 80
Trying 212.77.100.101...
Connected to www.wp.pl.
Escape character is '^]'.
Connection closed by foreign host.

The same execution of go-telnet ends with a received server response:

$ cat resources/input-data/wp.pl_1.bin | go-telnet wp.pl 80
HTTP/1.1 200 OK
Server: aris
Expires: Sun, 11 Oct 2015 20:34:22 GMT
Last-Modified: Sun, 11 Oct 2015 20:34:22 GMT
Pragma: no-cache
Cache-Control: no-cache
Content-type: text/html; charset=UTF-8
Set-Cookie: ...

Usage

$ go-telnet --help
usage: go-telnet [<flags>] <host> <port>

Read bytes from stdin and pass them to the remote host.

Flags:
  --help            Show help (also see --help-long and --help-man).
  -t, --timeout=1s  Byte receiving timeout after the input EOF occurs
  --version         Show application version.

Args:
  <host>  Target host
  <port>  Target port

go-telnet's People

Contributors

mtojek avatar digitalysin avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.