socat: Arbitrary code execution
I use socat with following init script on debian 7.2 with sysVinit. It works perfectly:
SOCAT_ARGS="-d -d -lf /var/log/socat.log"
[ ! -f /etc/default/socat.conf ] || . /etc/default/socat.conf
I am using socat to multiplex a massive UDP stream to two remote servers. The command looks like:
socat - udp4-listen:PORT,fork | tee >(socat - udp-sendto:SERV1:PORT) >(socat - udp-sendto:SERV2:PORT)
It works well, even if userland packet forwarding is not the best way to do it. The only problem is the number of process constantly increasing.
I have a working init.d script on debian 7.2. I wanted to run this script on another debian 7.4 machine. So I copied it over
sudo chmod +x socat
sudo socat start
This worked on debian 7.2. But on debian 7.4 I get
Starting socat (via systemctl): socat.serviceFailed to issue
method call: Unit socat.service failed to load: No such file or
How we can create secure tunnels multicast with socat?
Assume we have a list of ip address, CIDR network addresses that we want to create secure tunnel to them.
I found this
socat STDIO UDP4-DATAGRAM:220.127.116.11:6666,range=192.168.10.0/24
but I want a secure tunnel and different adds with net addrs
I want to create script that give the IPs and net addresses and create secure tunnel
Following http://jdimpson.livejournal.com/6812.html, I've socat UDP client-server set as following:
socat as a UDP server on port 11111.
socat STDIO UDP-LISTEN:11111
and then as a UDP client.
socat - UDP:localhost:11111
Now the question is that when I write from client, server gets the data via UDP. But UDP is unidirectional.
The socat command shuffles data between two locations. One way to think of socat is as the cat command which transfers data between two locations rather than from a file to standard output.
I need to simulate a few serial links (doing a simulation of an application for a robot) and found socat which, at least with minicom, is working flawlessly.
I would really like to make pts static: ie same numbers between reboots, and automatic (not me opening terminals and leaving them with empty socat windows).
Is there a way for this?
Or maybe there is a (super easy!) way of replicati
i've heard that socat/netcat can be used as a proxy server which have an ability to redirect to another proxy server.
but in my situation i want to "tricking" it a little bit with some http header manipulation.
so my goal is using netcat/socat to act as localhost "http CONNECT" proxy server that has an ability to read & rebuild the http request by the client then redirect it to external squi