1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

Replace some string.char and bin.pack calls with literals

This commit is contained in:
dmiller
2015-02-27 19:42:56 +00:00
parent 204d37e4d7
commit 0e74dd7a35
37 changed files with 85 additions and 97 deletions

View File

@@ -51,7 +51,7 @@ Driver =
end,
login = function( self, username, password )
local xmlreq='<?xml version="1.0" ?><methodCall><methodName>auth.login</methodName><params><param><value><string>'..username..'</string></value></param><param><value><string>'..password.."</string></value></param></params></methodCall>\n"..string.char(0)
local xmlreq='<?xml version="1.0" ?><methodCall><methodName>auth.login</methodName><params><param><value><string>'..username..'</string></value></param><param><value><string>'..password.."</string></value></param></params></methodCall>\n\0"
local status, err = self.socket:send(xmlreq)
if ( not ( status ) ) then
@@ -84,7 +84,7 @@ Driver =
action = function(host, port)
-- first determine whether we need SSL or not
local xmlreq='<?xml version="1.0" ?><methodCall><methodName>core.version</methodName></methodCall>\n'..string.char(0)
local xmlreq='<?xml version="1.0" ?><methodCall><methodName>core.version</methodName></methodCall>\n\0'
local socket, _, opts = comm.tryssl(host, port, xmlreq, { recv_first = false } )
if ( not(socket) ) then
return "\n ERROR: Failed to determine whether SSL was needed or not"