diff --git a/dissect/target/tools/qfind.py b/dissect/target/tools/qfind.py index 7782571834..bfc2bfe444 100644 --- a/dissect/target/tools/qfind.py +++ b/dissect/target/tools/qfind.py @@ -92,7 +92,7 @@ def main() -> int: header = f"[{hit.offset:#08x} @ {hit.needle} ({hit.codec})]" if not NO_COLOR: - header = utils.COLOR_WHITE + header + utils.COLOR_NORMAL + header = utils.COLOR_WHITE + header + utils.COLOR_CLEAR_BOLD before_offset = max(0, hit.offset - args.window) needle_len = len(hit.match) @@ -101,7 +101,7 @@ def main() -> int: if args.raw: palette = ( - [(hit.offset - before_offset, utils.COLOR_NORMAL), (needle_len, utils.COLOR_BG_RED)] + [(hit.offset - before_offset, utils.COLOR_CLEAR_BOLD), (needle_len, utils.COLOR_BG_RED)] if not NO_COLOR else None ) @@ -119,7 +119,7 @@ def main() -> int: before_part, (utils.COLOR_BG_RED if not NO_COLOR else ""), after_part[:needle_len], - (utils.COLOR_NORMAL if not NO_COLOR else ""), + (utils.COLOR_CLEAR_BOLD if not NO_COLOR else ""), after_part[needle_len:], ) print("".join(hit)) @@ -316,13 +316,13 @@ def update(disk: Container | Volume, offset: int, size: int) -> None: nonlocal current_disk, char if current_disk is None: - sys.stderr.write(f"{utils.COLOR_WHITE}{target}{utils.COLOR_NORMAL}\n") + sys.stderr.write(f"{utils.COLOR_WHITE}{target}{utils.COLOR_CLEAR_BOLD}\n") if current_disk != disk: - sys.stderr.write(f"\n{utils.COLOR_WHITE}[Current disk: {disk}]{utils.COLOR_NORMAL}\n") + sys.stderr.write(f"\n{utils.COLOR_WHITE}[Current disk: {disk}]{utils.COLOR_CLEAR_BOLD}\n") current_disk = disk - sys.stderr.write(f"\r{COLOR_GREY}{offset / float(size) * 100:0.2f}% {animation[char]}{utils.COLOR_NORMAL}") + sys.stderr.write(f"\r{COLOR_GREY}{offset / float(size) * 100:0.2f}% {animation[char]}{utils.COLOR_CLEAR_BOLD}") sys.stderr.flush() if offset % (1337 * 3) == 0: diff --git a/pyproject.toml b/pyproject.toml index 0a69d47494..cd2ea0a6a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ ] dependencies = [ "defusedxml", - "dissect.cstruct>=4,<5", + "dissect.cstruct>=4.8.dev7,<5", "dissect.database>=1.1,<2", "dissect.eventlog>=3,<4", "dissect.evidence>=3.13,<4", @@ -83,7 +83,7 @@ dev = [ "dissect.cim[dev]>=3.0.dev,<4.0.dev", "dissect.clfs[dev]>=1.0.dev,<2.0.dev", "dissect.cramfs[dev]>=1.0.dev,<2.0.dev", - "dissect.cstruct>=4.0.dev,<5.0.dev", + "dissect.cstruct>=4.8.dev7,<5.0.dev", "dissect.database[dev]>=1.1,<2.0.dev", "dissect.etl[dev]>=3.0.dev,<4.0.dev", "dissect.eventlog[dev]>=3.0.dev,<4.0.dev",