Nmap Development mailing list archives
[NSE] Undeclared variable in dns.processResponse()
From: Ron <ron () skullsecurity net>
Date: Thu, 28 Oct 2010 21:24:48 -0500
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey, While writing some sample code for the DNS library, I wrote the following code: local status, result = dns.query('www.obscuredomain.com', {norecurse=true}) It generates the following error: ./nselib/strict.lua:65: variable 'host' is not declared stack traceback: [C]: in function 'error' ./nselib/strict.lua:69: in function <./nselib/strict.lua:60> ./nselib/strict.lua:65: in function <./nselib/strict.lua:60> ./nselib/dns.lua:198: in function <./nselib/dns.lua:175> The line number's going to be wrong because I'm modifying dns.lua right now, but this is the line: -- only ask next server in authority, if -- we got an auth dns and -- it isn't the one we just asked if next_server and next_server ~= host and options.tries > 1 then -- <---------- THIS LINE options.host = next_server options.tries = option.tries - 1 return query(dname, options) end I don't know the code well enough to fix it myself with any confidence, but I'm guessing that 'host' simply needs to be changed to 'options.host'. Can somebody more familiar with the code confirm? Thanks! Ron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAkzKMHQACgkQ2t2zxlt4g/SujACfSWzl70Ct9fNbbUO9HnEWGsSg GJMAn2DhGuE7+mU37VpuHlHVzX8+mz/V =BZsT -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [NSE] Undeclared variable in dns.processResponse() Ron (Oct 28)
- Re: [NSE] Undeclared variable in dns.processResponse() Patrik Karlsson (Oct 28)
- Re: [NSE] Undeclared variable in dns.processResponse() Ron (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Patrik Karlsson (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Ron (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Patrik Karlsson (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Ron (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Patrik Karlsson (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Ron (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Ron (Oct 29)
- Re: [NSE] Undeclared variable in dns.processResponse() Patrik Karlsson (Oct 28)