Send TCP packets with Curl

1

Background :

I want to have computers communicate to each other so I used to use Dropbox for syncing them. I used one program to echo information in a text file, then the other computer would have an "if this then that" program. However, this took a long time to sync and I could not use the same method with a phone.

The Point :

I want to use curl to send text, images, audio clips, etc. (text for now). I used in batch curl 192.168.0.170:59403. That would work but on the receiving end it would say GET / HTTP/1.1\r\nHost: 192.168.0.170:59403\r\nUser-Agent: curl/7.53.1\r\nAccept: */*\r\n\r\n I want that to be text. Any Ideas?

Max Koon

Posted 2017-04-26T20:51:58.233

Reputation: 11

1curl is a HTTP client and what you see is a HTTP request. – gronostaj – 2017-04-26T20:58:30.933

2Use netcat. Netcat gives you a nice raw TCP connect that you can do anything you like with. – Zoredache – 2017-04-26T23:01:24.543

No answers