mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-12 12:47:39 +02:00
Merge pull request #419 from japhlange/netlist
netstat: fixes two off-by-one errors in port bitmap parsing
This commit is contained in:
@@ -94,10 +94,10 @@ class NetStat(interfaces.plugins.PluginInterface, timeliner.TimeLinerInterface):
|
||||
The list of indices at which a 1 was found.
|
||||
"""
|
||||
ret = []
|
||||
for idx in range(bitmap_size_in_byte-1):
|
||||
for idx in range(bitmap_size_in_byte):
|
||||
current_byte = context.layers[layer_name].read(bitmap_offset + idx, 1)[0]
|
||||
current_offs = idx * 8
|
||||
for bit in range(7):
|
||||
for bit in range(8):
|
||||
if current_byte & (1 << bit) != 0:
|
||||
ret.append(bit + current_offs)
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user