When I try to run nc -l 1337 -e /bin/bash, it says:
nc: invalid option -- e
usage: nc [-46AacCDdEFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval]
[-p source_port] [--apple-delegate-pid pid] [--apple-delegate-uuid uuid]
[-s source_ip_address] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port[s]]
I want to run commands remotely, but instead it just remotely prints text. Why is this not working and how can I fix it?
a bsd variant of netcat. I've not even found a way yet to get the version for /usr/bin/nc. But it's possible to installgnu netcatwith i.e. homebrew which has this -e option. I have not found out a workaround how to get the same behaviour with the bsd nc command, or i'd add that as an answer.