1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-30 11:29:01 +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

@@ -8,7 +8,6 @@ local base64 = require "base64"
local bin = require "bin"
local nmap = require "nmap"
local stdnse = require "stdnse"
local string = require "string"
local openssl = stdnse.silent_require "openssl"
_ENV = stdnse.module("ssh2", stdnse.seeall)
@@ -61,7 +60,7 @@ transport.pack_mpint = function( bn )
packed = bn:tobin()
if bytes % 8 == 0 then
bytes = bytes + 1
packed = string.char(0) .. packed
packed = '\0' .. packed
end
return bin.pack( ">IA", bytes, packed )
end