Nmap Development mailing list archives

Re: NSE: IDL parser


From: Ron <ron () skullsecurity net>
Date: Thu, 13 May 2010 09:00:43 -0500

One concern I have with using the .idl files that's probably better to raise now rather than later: are there any 
licensing issues? I'm not a lawyer, and I don't have a clear understanding of the different licences in play here, but 
I believe that Samba is GPL, which makes the .idl files GPL (I think). 

I seem to recall that Nmap has some issues using GPL code, so somebody might want to look into that sooner rather than 
later. 

Just thought I'd bring that up!

On Thu, 13 May 2010 00:30:21 +0200 Dražen Popović <dpopovic () lss hr>
wrote:
Hi guys,
I spent my day trying to figure out PIDL as it represents The Parser
for IDL. As David noticed it is used to generate Wireshark
dissectors, as well as SAMBA Python bindings, SAMBA client and server
stubs.

I came to conclusion that PIDL would be our best approach in the
matter. I downloaded the PIDL [1] and SAMBA IDL files [2] from SVN
repository. One tip that pidl manual [3] provided is to look at the
internal tree representation...so I did. It seems that PIDL operates
on this ".pidl" representation of ".idl"s. What is great about
".pidl"s is that their structure is relatively simple and could be
parsed in a reasonable time period. ".pidl" is actually one big Perl
variable =).

Using this internal representation PIDL could be extended for other
languages, purposes, as demonstrated with Wireshark, Python and SAMBA.
One should just parse the ".pidl" which is simpler in syntax than
".idl".

If you're interested in taking a look at ".pidl":

bash$pidl --dump-idl-tree="echo.pidl" echo.idl

"echo.idl" is a testing interface used by SAMBA developers and it's
distributed along with SAMBA [2]. This should be our testing IDL as
well.

@Patrick:
For the time being I don't see Lpeg as part of NSE runtime, as far as
MS-RPC is concerned of course. But it's definitely something to
consider in the future.

[1] svn://svnanon.samba.org/samba/branches/SAMBA_4_0/source/pidl 
[2]
svn://svnanon.samba.org/samba/branches/SAMBA_4_0/source/librpc/idl
[3] http://search.cpan.org/~ctrlsoft/Parse-Pidl-0.01/pidl


-- 
Laboratory for Systems and Signals
Department of Electronic Systems and Information Processing
Faculty of Electrical Engineering and Computing
University of Zagreb

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


-- 
Ron Bowes
http://www.skullsecurity.org
http://www.twitter.com/iagox86

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