Nmap Development mailing list archives
Re: Port number in verbose mode
From: rebellis <rebellis () gmail com>
Date: Mon, 10 May 2010 02:26:18 -0300
Hi Please correct me if I'm wrong but it looks like the solution is quite simple (see patch attached). I couldn't test it on revision 17520 (Nmap doesn't compile on my box -- got lots of linking errors related to libpcap). However, when compiled against Nmap 5.21 sources the patch seems to work nicely: rebellis@dagon $ ncat -l -v -k Ncat: Version 5.21 ( http://nmap.org/ncat ) Ncat: Listening on 0.0.0.0:31337 Ncat: Connection from 127.0.0.1:40521. Ncat: Connection from 127.0.0.1:40524. rebellis@dagon ~ $ netstat -nap | grep telnet (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 127.0.0.1:40524 127.0.0.1:31337 ESTABLISHED 3126/telnet tcp 0 0 127.0.0.1:40521 127.0.0.1:31337 ESTABLISHED 3125/telnet -- rebellis On Sat, May 8, 2010 at 6:33 PM, David Fifield <david () bamsoftware com> wrote:
On Thu, May 06, 2010 at 04:42:12PM +0200, Dite Sirte wrote:I know it's not a bug, but I miss a function in the excelent ncat tool. In listening mode, the classic nc (with the verbose flag on) prints a message for each client connected, showing its IP and source port. But ncat shows only the source IP. For debugging on some client programs it will be interesting to know the source port of the connection, I think. Sorry for my poor english, and thank you all for the gorgeous tools.I think this is a good idea. I want to suggest that this is a good task for someone who wants to start working on Nmap. People always ask "how do I get started?" and it's with tasks like these. This is enough to get your name in the CHANGELOG and start doing more ambitious things. The problem Dite described is this: When I run an Ncat server and then connect to it, I see $ ./ncat -l -k -v Ncat: Version 5.30BETA1 ( http://nmap.org/ncat ) Ncat: Listening on 0.0.0.0:31337 Ncat: Connection from 127.0.0.1. Instead, I should see something like $ ./ncat -l -k -v Ncat: Version 5.30BETA1 ( http://nmap.org/ncat ) Ncat: Listening on 0.0.0.0:31337 Ncat: Connection from 127.0.0.1:49152. Once you've implemented this, run "svn diff > ncat-srcport.diff" and send the patch to this mailing list. If you have questions or want to claim this job, just speak up. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Attachment:
ncat-srcport.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Port number in verbose mode Dite Sirte (May 06)
- Re: Port number in verbose mode David Fifield (May 08)
- Re: Port number in verbose mode rebellis (May 09)
- Re: Port number in verbose mode David Fifield (May 10)
- Re: Port number in verbose mode rebellis (May 10)
- Re: Port number in verbose mode David Fifield (May 11)
- Re: Port number in verbose mode rebellis (May 11)
- Re: Port number in verbose mode ithilgore (Jun 08)
- Re: Port number in verbose mode David Fifield (Jun 08)
- Re: Port number in verbose mode Andrew Whatson (Jun 10)
- Re: Port number in verbose mode ithilgore (Jun 10)
- Re: Port number in verbose mode David Fifield (Jun 13)
- Re: Port number in verbose mode Andrew Whatson (Jun 14)
- Re: Port number in verbose mode rebellis (May 09)
- Re: Port number in verbose mode David Fifield (May 08)