I received this request:
*Create web front end to backend Wireshark capture/filter interface.
The capture/filter interface is a bash script which is run via xinetd on RTR-001 / RTR-002 / Singapore
To connect to the interfacace create a raw TCP socket to 0.0.0.0 on PORT 41200
It is a simple interactive command prompt which lists how to use it once connected.
The program is stateless so it does not require a session connection between each command. You are free to connect, issue a command, disconnect as often as needed.*
I tried the following code but It is not returning anything:
$output = shell_exec('10.0.0.100:41200'); echo "<pre>$output</pre>";
And also this example I found:
$output = exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.100/41200 0>&1'"); echo "<pre>$output</pre>";
Any idea of how to make this work? So users can execute command to the IP/PORT via PHP? One of the commands is “Help” that lists all commands. Thanks!!!
Tried to use shell_exec and exec