Skip to content
Merged
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
13 changes: 12 additions & 1 deletion acquire/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from typing import TYPE_CHECKING, Any

from dissect.target.helpers import keychain
from dissect.target.tools.utils import _OverrideRequiredAction, list_children

from acquire.outputs import (
COMPRESSION_METHODS,
Expand Down Expand Up @@ -139,7 +140,12 @@ def create_argument_parser(profiles: dict, volatile: dict, modules: dict) -> arg

parser.add_argument("--disable-report", action="store_true", help="disable acquisition report file")

parser.add_argument("--child", help="only collect specific child")
parser.add_argument(
"--list-children", action=_OverrideRequiredAction, help="list all children indices and paths, then exit"
)
parser.add_argument("--recursive", action="store_true", help="make --list-children behave recursively")

parser.add_argument("--child", help="only collect specific child based on index or path, see --list-children")
parser.add_argument(
"--children",
action=argparse.BooleanOptionalAction,
Expand Down Expand Up @@ -214,6 +220,11 @@ def parse_acquire_args(
args, rest = parser.parse_known_args()
_merge_args_and_config(parser, args, config)

if args.list_children:
# List found children on targets and exit
list_children(args)
parser.exit(0)

return args, rest


Expand Down
Loading