Skip to content

Commit c35cb72

Browse files
committed
Adds --list-children arg
1 parent 63c88a3 commit c35cb72

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

acquire/acquire.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,12 @@ def main() -> None:
22512251
target_name = target.name
22522252
log.info("Loading target %s", target_name)
22532253
log.info(target)
2254+
# Check if we are just listing children and not collecting
2255+
if args.list_children:
2256+
log.info(f"Listing children on Target: %s", target.name)
2257+
for index, child in enumerate(target.list_children()):
2258+
log.info(f"- Found child #%s: type=%s, path=%s", index, child.type, child.path)
2259+
exit_success(args.config.get("arguments"))
22542260
if target.os == "esxi" and target.name == "local":
22552261
# Loader found that we are running on an esxi host
22562262
# Perform operations to "enhance" memory

acquire/utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ def create_argument_parser(profiles: dict, volatile: dict, modules: dict) -> arg
130130

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

133-
parser.add_argument("--child", help="only collect specific child")
133+
parser.add_argument(
134+
"--list-children",
135+
action=argparse.BooleanOptionalAction,
136+
help="list all children by index and path - does not collect anything",
137+
)
138+
139+
parser.add_argument("--child", help="only collect specific child based on index or path, see --list-children")
134140
parser.add_argument(
135141
"--children",
136142
action=argparse.BooleanOptionalAction,

0 commit comments

Comments
 (0)