Linux tool to send raw data to a TCP server

前端 未结 3 1470
清酒与你
清酒与你 2020-12-13 09:08

I am aware that this is not a direct \'development\' question but I need this info to test a development project, so I think someone could\'ve hit similar problem.

I

相关标签:
3条回答
  • 2020-12-13 09:15

    netcat or telnet, i have used both in the past to test simple text based protocols. netcat is more flexible.

    0 讨论(0)
  • 2020-12-13 09:37

    From bash with dd:

    dd if=/dev/zero bs=9000 count=1000 > /dev/tcp/$target_host/$port
    

    or even with cat:

    cat < /dev/urandom > /dev/tcp/$target_host/$port
    
    0 讨论(0)
  • 2020-12-13 09:38

    Sounds like Expect may be what you want. There are implementations for multiple scripting languages, and you can script the requests/server responses plus appropriate timeouts, error handling etc.

    0 讨论(0)
提交回复
热议问题