Nmap Development mailing list archives

Re: nmap-2.54b27+V-2.4


From: MadHat <madhat () unspecific com>
Date: Fri, 27 Jul 2001 11:42:02 -0500

Understood. So far I have been lucky enough on my network that it all appears to work quite well. Thanks for the explanation.

At 11:28 AM 7/27/2001 -0500, Jay Freeman \(saurik\) wrote:
MadHat:

To make the point, there is no guarantee that the output from my version
system will not itself contain slashes, commas, or semi-colons (or new lines
or any other character for that matter, although it starts to get rarer).
In fact, the ,'s are quite common.  The reason I don't support greppable
output is because I _can't_ until someone (Fyodor?) defines what the rules
for escaping such characters is and people start to update their readers to
support the escaped output.  I believe we've had this same discussion before
on nmap-dev, hehe.

At one point, with one version (likely have to scan through CVS to find it,
nmap.c is the only file that got changed so it should be easy to find...), I
semi-officially supported it with my libtabular, which you will find
derelict in the source code :-).  I had a version a while back that used
libtabular to do all of its output.  If you use that library, you can have a
single set of output commands that supports console, greppable, XML, and
HTML output.  Currently, it is only used by my (also derelict) scan module
system that you can find in the scans directory... hmm... didn't realize
that was derelict until just now, I can fix FreeBSD by just dropping the
support to compile that folder....

This project really died because it's main purpose was adding XML output to
nmap (which I did), but a few days before I had it ready Fyodor announced
that he ALSO added XML output to nmap (although with the more
administratively annoying stance of adding even more output code on more if
statements, which I was trying to avoid), so I announced a CVS-only version
and then started pulling back the changes (Fyodor's XML output contained
additional data that was organized in ways I couldn't easily support, and
then it became a nightmare to merge our code bases).

Personally, I never did figure out a good way to parse greppable output
(something I went into in one of my previous announcements, I find I always
have to sed and tr the port definitions onto multiple lines before grep
becomes useful), so I admire you for your resourcefulness :-)... I'll just
stick with the XML output myself.

[ for historical note there was a paragraph here that was removed ]

Sincerely,
Jay Freeman (saurik)
saurik () saurik com

----- Original Message -----
From: "MadHat" <madhat () unspecific com>
To: "Jay Freeman (saurik)" <saurik () saurik com>; "nmap-dev"
<nmap-dev () insecure org>
Sent: Friday, July 27, 2001 8:39 AM
Subject: Re: nmap-2.54b27+V-2.4


> Here is a patch I added for the "grepable" output with version (-sV with
> -oG <file>), because I use a script to search the -oG output and wanted
the
> version info added...  Thanks for this feature.
>
> The search script is pretty simple, I use it as both a CGI and a CLI
script.
> Nothing spectacular, but it works...
> http://www.unspecific.com/nmap/nmap-search  if anyone cares.
>
>
> Sorry, not sure if I did the diff right, still learning.
>
>
> diff -u nmap-2.54b27+V/output.c nmap-2.54b27+V./output.c
> --- nmap-2.54b27+V/output.c     Thu Jul 26 20:38:43 2001
> +++ nmap-2.54b27+V./output.c    Fri Jul 27 07:50:01 2001
> @@ -238,9 +238,16 @@
>            curr = curr->next;
>          }
>
> -       log_write(LOG_MACHINE,"%d/%s/%s/%s/%s/%s//", current->portno,
state,
> -                 protocol, (current->owner)? current->owner : "",
> -                 (service)? service->s_name: "", rpcmachineinfo);
> +       if (o.versionscan) {
> +         log_write(LOG_MACHINE,"%d/%s/%s/%s/%s/%s/%s/%s//",
> current->portno, state,
> +           protocol, (current->owner)? current->owner : "",
> +           (service)? service->s_name: "", rpcmachineinfo,
> +           (current->protocol)? current->protocol : "",
> (current->version)? current->version : "");
> +       } else {
> +         log_write(LOG_MACHINE,"%d/%s/%s/%s/%s/%s//", current->portno,
state,
> +           protocol, (current->owner)? current->owner : "",
> +           (service)? service->s_name: "", rpcmachineinfo);
> +       }
>
>          log_write(LOG_XML, "<port protocol=\"%s\" portid=\"%d\">",
> protocol, current->portno);
>          log_write(LOG_XML, "<state state=\"%s\" />", state);


---------------------------------------------------------------------
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).

--
MadHat at unspecific.com


---------------------------------------------------------------------
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: