Nmap Development mailing list archives

Re: LDAP library and scripts


From: David Fifield <david () bamsoftware com>
Date: Mon, 1 Feb 2010 17:09:48 -0700

On Thu, Jan 28, 2010 at 10:13:24PM +0100, Patrik Karlsson wrote:
I've just finished breaking out most of the ASN.1 stuff from the SNMP
library. In order to achieve what I wanted and keep as much of the old
code as possible I had to make additional changes to the asn1 and ldap
libraries. This is the reason why I took some time and why I didn't
yet commit the asn1 library.

I have tested the new libraries with both my ldap scripts and the snmp
scripts I wrote earlier and it appears as if they're all working as
expected. Feedback, suggestions and testing is welcome as always.

I'm looking at the new asn1.lua, and learning my way around the new
architecture. It looks like an improvement so far.

About the encoder/decoder registration scheme? Because this modifies
global state, won't it cause an error, for example, when the ldap and
snmp libraries are used simultaneously? They register different encoders
for 'table'.

I don't understand the purpose of these encoders:

tagEncoder['01'] = tagEncoder['boolean']
tagEncoder['02'] = tagEncoder['number']
tagEncoder['04'] = tagEncoder['string']

What are you doing to test the new code? I'm not saying that
reengineering the libraries isn't a good idea, just that you need to
watch out for the bugs that such efforts usually bring.

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: