Pipe netcat response to php post form

0

I'm trying to get a one-line command that pipes all messages on a port to a php script. I can't use a netcat proxy, as the receiving end is webserver-only.

Basically, I have the idea of doing something like this:

nc -d localhost 30003 | curl -d @- https://URL/file.php

How would I actually do this? Such that all messages from the nc connection are sent to the php script. On a per message basis (Curl request for every line of nc received) Preferably without waiting for the curl to finish, to allow for large amounts of messages to continuously send.

Elliot Parker

Posted 2019-02-19T08:47:37.533

Reputation: 1

Are you trying to perform a single massive POST with all data, or multiple (e.g. one POST per received line)? – user1686 – 2019-02-19T09:16:13.317

@grawity Updated – Elliot Parker – 2019-02-19T09:38:44.293

No answers