Skip to content
Open
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
5 changes: 3 additions & 2 deletions dissect/target/plugins/os/unix/bsd/citrix/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def _find_history_files(self) -> list[tuple[str, TargetPath, UnixUserRecord | No
(shell, path, None) for path in self.target.fs.path("/").glob(history_absolute_path_glob.lstrip("/"))
)

# Also utilize the _find_history_files function of the parent class
history_files.extend(super()._find_history_files())
Comment on lines -72 to -73
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a unit test? Wouldn't removing this stop the other files from being iterated in the super commandhistory? And the Citrix files to be yielded doubly because of parse_generic_history?

return history_files

def _find_user_by_name(self, username: str) -> UnixUserRecord | None:
Expand All @@ -95,6 +93,9 @@ def commandhistory(self) -> Iterator[CommandHistoryRecord]:
elif shell in ("citrix-netscaler-bash", "citrix-netscaler-sh"):
yield from self.parse_netscaler_bash_history(history_path)

# Search for additional command history in regular UNIX-like history files.
yield from super().commandhistory()

def parse_netscaler_bash_history(self, path: TargetPath) -> Iterator[CommandHistoryRecord]:
"""Parse bash.log* contents."""

Expand Down