mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Fix a bug: string.gsub, not string.sub
This commit is contained in:
parent
13d70d9ac7
commit
cbb759565f
1 changed files with 1 additions and 1 deletions
|
|
@ -273,7 +273,7 @@ local function p2p_checksum(data)
|
|||
|
||||
stdnse.debug2("Conficker: Calculating checksum for %d-byte buffer", #data)
|
||||
|
||||
data:sub(".", function(i)
|
||||
data:gsub(".", function(i)
|
||||
local h = hash ~ string.byte(i)
|
||||
-- Incorporate the current character into the checksum
|
||||
hash = (h + h) | (h >> 31)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue