mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-26 08:02:23 +02:00
Update strings.py
This commit is contained in:
@@ -46,7 +46,8 @@ class Strings(interfaces.plugins.PluginInterface):
|
||||
strings_size = path.getsize(strings_fp.file.name)
|
||||
|
||||
line = strings_fp.readline()
|
||||
while line != '':
|
||||
last_prog = 0
|
||||
while line != b'':
|
||||
try:
|
||||
offset, string = self._parse_line(line)
|
||||
try:
|
||||
@@ -58,7 +59,10 @@ class Strings(interfaces.plugins.PluginInterface):
|
||||
vollog.error("Strings file is in the wrong format")
|
||||
return
|
||||
line = strings_fp.readline()
|
||||
self._progress_callback(strings_fp.tell() / strings_size * 100, "Matching strings in memory")
|
||||
prog = strings_fp.tell() / strings_size * 100
|
||||
if round(prog, 1) > last_prog:
|
||||
last_prog = round(prog, 1)
|
||||
self._progress_callback(prog, "Matching strings in memory")
|
||||
|
||||
def _parse_line(self, line: bytes) -> Tuple[int, bytes]:
|
||||
"""Parses a single line from a strings file.
|
||||
|
||||
Reference in New Issue
Block a user