Nmap Development mailing list archives
Patch to mongodb library
From: Martin Holst Swende <martin () swende se>
Date: Thu, 06 Mar 2014 22:47:56 +0100
Affecting primarily the brute-forcer, I suspect. A local variable shadowed a method. I think I may not have svn-access anymore, so here goes:
#svn diff mongodb.lua
Index: mongodb.lua
===================================================================
--- mongodb.lua (revision 32654)
+++ mongodb.lua (working copy)
@@ -601,8 +601,8 @@
function login(socket, db, username, password)
local collectionName = ("%s.$cmd"):format(arg_DB or db)
- local query = { getnonce = 1 }
- local status, packet = createQuery(collectionName, query)
+ local q = { getnonce = 1 }
+ local status, packet = createQuery(collectionName, q)
local response
status, response = query(socket, packet)
if ( not(status) or not(response.nonce) ) then
@@ -613,10 +613,10 @@
local pwdigest = stdnse.tohex(openssl.md5(username .. ':mongo:'
..password))
local digest = stdnse.tohex(openssl.md5(nonce .. username ..
pwdigest))
- query = { user = username, nonce = nonce, key = digest }
- query._cmd = { authenticate = 1 }
+ q = { user = username, nonce = nonce, key = digest }
+ q._cmd = { authenticate = 1 }
- local status, packet = createQuery(collectionName, query)
+ local status, packet = createQuery(collectionName, q)
status, response = query(socket, packet)
if ( not(status) ) then
return status, response
@@ -628,7 +628,6 @@
return status, response
end
-
--- Converts a quert result as received from MongoDB query into nmap
"result" table
-- @param resultTable table as returned from a quer -- @return table suitable for <code>stdnse.format_output</code> Regards, Martin Holst Swende _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Patch to mongodb library Martin Holst Swende (Mar 06)
- Re: Patch to mongodb library Daniel Miller (Mar 06)
