Nmap Development mailing list archives
Re: [NSE] Patch for mongodb.lua
From: Patrik Karlsson <patrik () cqure net>
Date: Tue, 18 Oct 2011 16:40:04 -0400
Thanks Thomas. I've committed your patch as r26893. //Patrik On Tue, Oct 18, 2011 at 3:11 PM, Martin Holst Swende <martin () swende se>wrote:
On 10/17/2011 08:21 PM, Thomas Buchanan wrote:Hello, I was testing out the mongodb scripts on my local Ubuntu box, and foundthatmongodb.lua (used by mongodb-info.nse) was crashing with a 'nil' tableindexas shown below: # ./nmap -sT -v -d --script-trace --script=mongodb-info -p 27017,28017 localhost Starting Nmap 5.61TEST2 ( http://nmap.org ) at 2011-10-17 13:03 CDT <...> NSE: Starting mongodb-info against 127.0.0.1:27017. <...> NSE: MngoDb: Read element name 'localTime' (type:9), data left: 668 NSE: Bson-ERR:Getter for 9 not implemented NSE: MngoDb:Parsed (nil='nil'), data left : 668 NSE: mongodb-info against 127.0.0.1:27017 threw an error! /home/thomas/dev/svn/nmap/nselib/mongodb.lua:232: table index is nil stack traceback: /home/thomas/dev/svn/nmap/nselib/mongodb.lua:232: in function '_elements_to_dict' /home/thomas/dev/svn/nmap/nselib/mongodb.lua:278: in function'fromBson'/home/thomas/dev/svn/nmap/nselib/mongodb.lua:572: in function 'query' /home/thomas/dev/svn/nmap/scripts/mongodb-info.nse:76: in function </home/thomas/dev/svn/nmap/scripts/mongodb-info.nse:56> (tail call): ? <more output> Looking at the BSON documentation, it seems data type 9 is a timestamp value, 8 bytes in length, so I put together the following simple patchwhichmakes the script work for me.Good work! /MartinNmap scan report for localhost (127.0.0.1) <...> PORT STATE SERVICE REASON 27017/tcp open unknown syn-ack | mongodb-info: | MongoDB Build info <snip all other output> Thanks, Thomas _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
_______________________________________________ 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] Patch for mongodb.lua Thomas Buchanan (Oct 17)
- Re: [NSE] Patch for mongodb.lua Martin Holst Swende (Oct 18)
- Re: [NSE] Patch for mongodb.lua Patrik Karlsson (Oct 18)
- Re: [NSE] Patch for mongodb.lua Martin Holst Swende (Oct 18)