Giter Site home page Giter Site logo

echotool's Introduction

EchoTool - Echo client and server

Command line echo server and client for Windows. This tool is designed according to RFC 862 specification for Echo protocol. It can operate as a echo server that sends back every incoming data. In client mode, it sends data to the server and checks whether they came back. This is a useful debugging tool for application development or network throughput checks. Application is written in C# and source codes is provided.

  • Server mode
  • Client mode
  • TCP and UDP protocol support
  • Selectable destination and source port
  • Selectable timeout
  • Selectable echo pattern
  • Just one file

For server mode listening on UDP port 4578 run following command

C:\EchoTool> echotool /p udp /s 4578

On client machine run this

C:\EchoTool> echotool server.to-test.com /p udp /r 4578

You can specify outgoing local port by /l switch

C:\EchoTool> echotool server.to-test.com /p udp /r 4578 /l 8976

Number of attempts and timeouts can be set by /n and /t switch

C:\EchoTool> echotool server.to-test.com /p udp /r 4578 /l 8976 /n 100 /t 10

Use your own echo pattern with /d switch

C:\EchoTool> echotool server.to-test.com /p udp /r 4578 /d Hello

Echo server mode server mode image

Echo client mode client mode image

Download

Stand alone executable releases/download/v1.5.0.0/echotool.exe [30 Kb]

echotool's People

Contributors

fragcoder avatar mitoskalandiel avatar pavelbansky avatar vector-man avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

echotool's Issues

有特殊字符,就会收不到

echotool.exe 127.0.0.1 /p udp /r 4578 /d "123!@#$"

含有特殊字符,就收不到消息,只会提示有
10:36:13 from 127.0.0.1:49736 received [123]
10:36:13 from 127.0.0.1:49737 received [123]
10:36:22 from 127.0.0.1:49738 received [UDP echo from xiaoss]
10:36:22 from 127.0.0.1:49739 received [UDP echo from xiaoss]

Crashes on simple usage

Using 1.5.0.0

echotool example.com /p udp /r 7 /d Hello

Unbehandelte Ausnahme: System.ArgumentException: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.
   bei System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   bei System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   bei System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   bei EchoTool.Arguments..ctor(String[] argumentsArray)
   bei EchoTool.EchoToolWorker..ctor(String[] args)
   bei EchoTool.Program.Main(String[] args)

Sorry for the german exception message, but I can't help it. It translates to An item with the same key has already been added.

CPU Spike to 100%

I just tried running your tool with 1KB of data with unlimited number of messages, and it seems the CPU is spiking at 100% while the client server is communicating.

Client:
echotool 127.0.0.1 /p tcp /r 5757 /n 0 /d ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef

Server:
echotool /p tcp /s 5757

Crashes in server mode

Server mode is intolerant to protocol violation. It is easy to crush the server by not playing by the rules. Ideally this should not happen. One misbehaving client should not crash the whole server.

To reproduce, start the program with following parameters:

/p tcp /s 7777

From another process run:

for (int i = 0; i < 100000; i++)
{
    TcpClient server = new TcpClient("127.0.0.1", 7777);
}

The server will crush within seconds. The exception is as follows:

System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
   at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
   at EchoTool.Protocols.TcpEchoServer.ServerThread() in D:\scm\EchoTool\EchoTool\Protocols\TcpEchoServer.cs:line 115

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.