From cbe31999b1cdc19c43583f702139824b33d5dea9 Mon Sep 17 00:00:00 2001 From: AsafEitani Date: Sun, 16 Aug 2020 15:52:12 +0300 Subject: [PATCH] Update strings.py --- volatility/framework/plugins/windows/strings.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/volatility/framework/plugins/windows/strings.py b/volatility/framework/plugins/windows/strings.py index d156bca8b..908be2f04 100644 --- a/volatility/framework/plugins/windows/strings.py +++ b/volatility/framework/plugins/windows/strings.py @@ -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.