Home page logo

nmap-dev logo Nmap Development mailing list archives

Conditional Matches in nmap-service-probes
From: Lionel Cons <lionel.cons () cern ch>
Date: Thu, 6 Dec 2007 14:22:24 +0100

I've tried to use conditional matches in nmap-service-probes and got
an "Assertion failed" error.

Basically, I've tried:

 m foo m|^([A-Z]+ )?foo server| p/$1FooServer/

in the hope to catch both "foo server" and "XXX foo server" in a
single line and using this $1 information for the report.

This kind of line gives me:

nmap: service_scan.cc:622: int substvar(char*, char**, char*, int, const u8*, int, int*, int): Assertion `offstart >= 0 
&& offstart < subjectlen' failed.

Is this a bug or a feature?

IMHO, $1 should be treated as an empty string if it did not match.


Lionel Cons

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]