Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unix trash plugin #852

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

JSCU-CNI
Copy link
Contributor

@JSCU-CNI JSCU-CNI commented Sep 17, 2024

Since we heard that this will be the year of the Linux Desktop, we added support for parsing GNOME .Trash folder artifacts on Unix systems.

@JSCU-CNI JSCU-CNI marked this pull request as ready for review September 17, 2024 12:07
dissect/target/plugins/os/unix/trash.py Outdated Show resolved Hide resolved
dissect/target/plugins/os/unix/trash.py Outdated Show resolved Hide resolved
dissect/target/plugins/os/unix/trash.py Outdated Show resolved Hide resolved
@Horofic Horofic self-assigned this Sep 18, 2024
dissect/target/plugins/os/unix/trash.py Show resolved Hide resolved
dissect/target/plugins/os/unix/trash.py Outdated Show resolved Hide resolved
@@ -91,6 +91,10 @@ def generate_argparse_for_unbound_method(
raise ValueError(f"Value `{method}` is not an unbound plugin method")

desc = method.__doc__ or docs.get_func_description(method, with_docstrings=True)

if "\n" in desc:
desc = desc.split("\n")[0] + "\n" + textwrap.dedent("\n".join(desc.split("\n")[1:]))
Copy link
Contributor

@Horofic Horofic Sep 20, 2024

Choose a reason for hiding this comment

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

Suggested change
desc = desc.split("\n")[0] + "\n" + textwrap.dedent("\n".join(desc.split("\n")[1:]))
desc = inspect.cleandoc(desc)

This should do the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants