Nmap Development mailing list archives
[jupp () gmx de: Re: output question/suggestion]
From: Fyodor <fyodor () insecure org>
Date: Sat, 27 Jul 2002 02:58:32 -0700
Redirecting to nmap-dev instead of -hackers: ----- Forwarded message from Josef 'Jupp' Schugt <jupp () gmx de> ----- Date: Thu, 25 Jul 2002 22:18:56 +0000 (UTC) X-Mailer: Pine 4.44 (Linux; color) Organization: TLD; Abt. 0 From: "Josef 'Jupp' Schugt" <jupp () gmx de> To: nmap-hackers () insecure org Subject: Re: output question/suggestion -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! "Fredrich P. Maney" <Fredrich.Maney () maney org> worte:
22/tcp open ssh However, this is what is in the distributed nmap-services file for that port: ssh 22/tcp # Secure Shell Login ssh 22/udp # Secure Shell Login I'd like to see all of the fields in the nmap-services file be present in the output (even if only as an option, perhaps as part of the -v?). Then the output would be similar to the following: open ssh 22/tcp # Secure Shell Login open ssh 22/udp # Secure Shell Login
No special option needed. Suppose:
2002-07-25 22:05:47 [79] /home/jupp> nmap localhost
Starting nmap V. 2.99RC1 ( www.insecure.org/nmap/ )
Interesting ports on localhost (127.0.0.1):
(The 1596 ports scanned but not shown below are in state: closed)
Port State Service
25/tcp open smtp
119/tcp open nntp
6000/tcp open X11
8080/tcp open http-proxy
8081/tcp open blackice-icecap
Nmap run completed -- 1 IP address (1 host up) scanned in 2 seconds
Use of
nmap localhost | grep "^[0-9]" | listem.pl
results in
open smtp 25/tcp Simple Mail Transfer
open nntp 119/tcp Network News Transfer Protocol
open X11 6000/tcp X Window server
open http-proxy 8080/tcp Common HTTP proxy/second web server port
open blackice-icecap 8081/tcp ICECap user console
Not exactly, but the output being tab separated can easily be
imported into almost any spreadsheet software (AFAIR Windows people
call it some kind of "CSV format").
#!/usr/bin/perl
while (<>) {
s/\s+/ /g;
($port, $state, $service) = split " ";
$comment = `grep "\\<$port" '/usr/local/share/nmap/nmap-services' | cut -d# -f2`;
chomp $comment;
print "$state\t$service\t$port\t$comment\n";
}
Is what the quick and dirty hack "listem.pl" reads. Bugs may be
present. Word boundary pattern \< is crucial.
Josef 'Jupp' Schugt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQE9QHlgrhv7B2zGV08RAng+AJ4kXq37fOq79QNnKEBVG8ujyT3YSwCePxwq
uRXDvlZY7Np/HMVCMTlgoQg=
=Vvnt
-----END PGP SIGNATURE-----
----- End forwarded message -----
---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to
nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).
Current thread:
- [jupp () gmx de: Re: output question/suggestion] Fyodor (Jul 27)
