diff --git a/acquire/acquire.py b/acquire/acquire.py index 2afba85e..0be80276 100644 --- a/acquire/acquire.py +++ b/acquire/acquire.py @@ -2166,6 +2166,21 @@ def main() -> None: except ValueError as err: parser.exit(err) + if args.targetd: + from targetd.tools.targetd import start_client + + # Configure your targetd agent here + config = { + "function": "agent", + "topics": ["/host/a", "/host/*"], + "link": "pipe-server://tmp/b", + "address": "10.0.2.3", + "port": 1884, + "cacert": Path("targetd.crt"), + } + start_client(args, presets=config) + parser.exit("Done") + if args.log_to_dir: # When args.upload files are specified, only these files are uploaded # and no other action is done. Thus a log file specifically named diff --git a/acquire/utils.py b/acquire/utils.py index 203d96ae..f7384191 100644 --- a/acquire/utils.py +++ b/acquire/utils.py @@ -73,6 +73,11 @@ def create_argument_parser(profiles: dict, modules: dict) -> argparse.ArgumentPa action="store_true", help="compress output (if supported by the output type)", ) + parser.add_argument( + "--targetd", + action="store_true", + help="Setup and install targetd agent", + ) parser.add_argument( "--encrypt", action="store_true",