Nmap Development mailing list archives

Re: Ncat: socket bind error on Mac OS X


From: Kris Katterjohn <katterjohn () gmail com>
Date: Sun, 27 Jul 2008 15:50:20 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dirk Loss wrote:
Hi,

on Mac OS X 10.5.4 (Intel) Ncat dies with the following error when I try 
to put it into listening mode:

$ ncat -l 22222
bind: Invalid argument

Running Ncat as root, switching to UDP or disabling IPv6 in my system 
preferences did not help. I verified that there is no other process 
listing on my local TCP port 22222.


Strange.  I don't have access to an OS X box, so I don't have any idea what
could be the problem.

Apparently the bind() call in sys_wrap.c returns -1 and errno = 22 
(EINVAL). According to the man page [1], this means that either the 
"socket is already bound to an address and the protocol does not support 
binding to a new address" or the "socket may have been shut down."

In client mode Ncat works fine.

Any ideas what I am doing wrong or how I can help debugging?


Can you do an Ncat connect with -vvv and -s (set source addr), and try Nmap
with -S (set source addr) and -sT ?  Errors should all go to stderr, so if
you're going to send me output and you're doing redirection (as opposed to
copy/paste), keep this in mind.

Regards
Dirk


Thanks,
Kris Katterjohn

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBSIzfiv9K37xXYl36AQIIZg/+M+QC+yppmr72ntKukuUobaORb6hYQxss
TM6R8jpbzZ8tO8goJeOTjFNCvzwiIwV9GemEN9TmtopDOohkKJylx+aVxvhuql11
D55hSRwN9EgoNVS/iMSrzO4m1pUnljUCLnlOZWAXEjCNU3+8SiOh38edarlciWtZ
OD76eqbR4PiS27ECvW0JKDrP6FhTs+YWGNzgveikQjZtq6aCSynINlECxeBlUZ4+
vIfwA1NjySdFTau5UizCTN4OmAdNagNcyRF8I5P99v315lZgo5Abq8zMsIuFYiqh
644cDQZ56LrUm+9eFjx0dXrUv38RJSvOlzfSqYJExO9OoXdGoMGI97NujncxrpDk
DBBDsIRmp24pQVDKnCPVyN/RWExRJZsdCepgwxl137TV2nSCqpfz+kFETZ8aYpAy
5Bu5eO6Z+Zzm5Tf6u3SURAi07AhwKx/xKx2hbWP0Sijr329p4QfCZtXFqHYsj3FL
hL5J0JeQJy0Q+vZOGuemm4Bp5p5fQt38F+0xTWXS/ZLSiAbAQQEs9cFemGhmGrHu
O3crT9bnwJrQhp5OEZjKH1TzjtijxLYNTi000shX9mrGZ0Ju//Pm9FOR42YN1RzG
7HKEbB1KU2CIlY83jufW+zy26DEQz4vwLeaTq7AnhADAaIeSX2qhVuzhkGq2dL+9
50fIuM/1Auw=
=QMHs
-----END PGP SIGNATURE-----

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: