Question

I'm using windows 7. There is application that is listening to an ip address and port. It waits for binary data to come and process it. Currently, I'm testing the application now.

Is there a free tool that I can use to send binary data to an ip address and port?

I had tried using telnet to connect to the ip address and port, but unfortunately I cannot enter binary data in the command prompt.

For example, I want to enter this binary data (I show it here in hex):
FFFAFEF0

Was it helpful?

Solution 2

I found a freeware tool named TCP/IP Builder.

But if you found a better free tool, please let me know.

OTHER TIPS

If you don't mind installing it, Python makes interactive socket use pretty easy. Here's an example of an interactive sessions with a HTTP connection, for demonstration purposes:

>>> import socket
>>> sock = socket.socket()
>>> sock.connect(("www.google.com", 80))
>>> sock.send("GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n")
40
>>> sock.recv(64)
'HTTP/1.1 302 Found\r\nLocation: http://www.google.co.uk/\r\nCache-Co'

For binary data you could just do something like:

sock.send("\xff\xfa\xfe\xf0")

The sockets API uses strings in Python, but as you can see it's pretty easy to send arbitrary bytes.

I can understand if you didn't want to install Python just for that (although it's got a pretty simple installer), but personally I think it's a reasonable tool for the job in this case - you've got all the flexibility of a powerful language there but you don't have to use it.

Alternatively you can get netcat for windows, which should be able to accept input from a file with redirect (which I'm pretty sure DOS supports). So, if you put your binary data into a file binary_data.bin you could do:

nc hostname.org 1234 < binary_data.bin
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top