Date: Mon, 31 Oct 2011 11:11:00 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Camal <camal@rabita.az> Cc: freebsd-questions@freebsd.org Subject: Re: came error from nc Message-ID: <20111031161100.GR93709@dan.emsphone.com> In-Reply-To: <000301cc97d4$f2007940$d6016bc0$@az> References: <000301cc97d4$f2007940$d6016bc0$@az>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 31), Camal said: > Hi. My name is Jamal. > > I am from Azerbaijan. > > When I tried open local port with "nc" and send to him > "/usr/local/bin/bash" came error. > > nc -l 12345 -e /bin/bash > , Error -> > nc: getaddrinfo: servname not supported for ai_socktype > > in /etc/resolv.conf and /etc/hosts files checked all of was right. > > Why is it so? I can't reproduce your error message, but your command won't do what you want anyway. The nc command that comes with FreeBSD doesn't support the "listen on a socket and run a command" option. Its -e is an ipsec option. If you install /usr/ports/net/netcat and use that command, it should work: netcat -l -p 12345 -e /usr/local/bin/bash -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111031161100.GR93709>