Nmap Development mailing list archives

Re: NSE: IDL parser


From: David Fifield <david () bamsoftware com>
Date: Wed, 12 May 2010 13:33:30 -0600

On Sun, Apr 18, 2010 at 11:56:55PM -0400, Patrick Donnelly wrote:
On Sun, Mar 21, 2010 at 1:52 AM, Patrick Donnelly <batrick () batbytes com> wrote:
Tentative idea:

o Add an LPeg parser for IDL [1]. The parser would dynamically
generate a new parser (also LPeg) that allows a script to talk via the
interface (in one specific case, MS RPC calls).

I talked with Dražen about this and we outlined a few options for this.
I initially misunderstood how this would work. I thought that the IDL
parser would run during the NSE runtime. Instead, it's something you run
ahead of time to generate procedure call stubs. We have more freedom in
the implementation of the parser itself, while its output has to be Lua.

One option is to write a brand new parser, in Lua or another language.
Then its output would be Lua and Lpeg.

A second option is to adapt the pidl parser from Samba. Wireshark uses
pidl to generate some MS-RPC dissectors.
http://search.cpan.org/~ctrlsoft/Parse-Pidl-0.01/pidl
http://wiki.wireshark.org/Pidl

A third possible option is something I just found. The WebKit source
builds lots of .cpp files from .idl files using a Perl parser. I'm not
sure if it's the same IDL as is used for MS-RPC, but if so it's another
candidate for adaptation.
http://trac.webkit.org/browser/trunk/WebCore/bindings/scripts/generate-bindings.pl
http://trac.webkit.org/browser/trunk/WebCore/bindings/scripts/IDLParser.pm
http://trac.webkit.org/browser/trunk/WebCore/xml/XMLHttpRequest.idl

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

Current thread: