Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dissect/target/tools/qfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_BOLD + header + utils.COLOR_CLEAR

before_offset = max(0, hit.offset - args.window)
needle_len = len(hit.match)
Expand All @@ -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), (needle_len, utils.COLOR_BG_RED)]
if not NO_COLOR
else None
)
Expand All @@ -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 if not NO_COLOR else ""),
after_part[needle_len:],
)
print("".join(hit))
Expand Down Expand Up @@ -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_BOLD}{target}{utils.COLOR_CLEAR}\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_BOLD}[Current disk: {disk}]{utils.COLOR_CLEAR}\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}")
sys.stderr.flush()

if offset % (1337 * 3) == 0:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"defusedxml",
"dissect.cstruct>=4,<5",
"dissect.cstruct>=4.8.dev7,<5", # TODO: Update on release!
"dissect.database>=1.1,<2",
"dissect.eventlog>=3,<4",
"dissect.evidence>=3.13,<4",
Expand All @@ -35,7 +35,7 @@ dependencies = [
"dissect.regf>=3.13,<4",
"dissect.util>=3,<4",
"dissect.volume>=3.17,<4",
"flow.record>=3.22.dev10", #TODO: Update at release
"flow.record>=3.22.dev10", # TODO: Update on release!
"structlog>=25.5.0",
]
dynamic = ["version"]
Expand Down Expand Up @@ -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", # TODO: Update on release!
"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",
Expand Down
Loading