I have a netcat port listening on port 1501, and I want to transfer the received input to this port in a new terminal window. I know that this is a bad idea, because in principle someone from this port can control the machine, but I want to find out if this is possible. Does anyone know how. I have tried this so far.
nc -l 1500 | Xterm or nc -l 1500 | xterm -e "NAMEOFWINDOW"
also tried redirecting to gnome-terminal in a simplified way. I can do
nc -l 1500 | grep "SOMEKEYWORD" successfully.
Any ideas? -TJ
. -, xterm gnome-terminal , , - , ( /bin/bash). , bash netcat.
xterm
gnome-terminal
/bin/bash
bash
-, , , |. :
|
nc -l -p 1500 | /bin/bash
bash - , . , :
/bin/bash | nc -l -p 1500
- bash. bash, .
, netcat (, ) :
nc -l -p 1500 -e /bin/bash
, - , bash , "".
, - , .
, xterm stdin, .
:
nc -l 1500 | bash
tee , tail --follow=name --retry .
tee
tail --follow=name --retry
nc -l 1500 | tee /tmp/file.txt
, :
tail --follow=name --retry /tmp/file.txt
rm -f /tmp/file.txt cron tail.
rm -f /tmp/file.txt
tail