ait-testbed / attackmate

AttackMate is an attack orchestration tool that executes full attack-chains based on playbooks.
GNU General Public License v3.0
17 stars 3 forks source link

json_command_logs #113

Closed thorinaboenke closed 1 month ago

thorinaboenke commented 1 month ago

This PR relates to issue #103

use: attackmate playbook.yml --json

example output attackmate.json

{"start-datetime": "2024-08-02T08:32:01.763097", "type": "debug", "cmd": "hello world", "parameters": {"only_if": null, "error_if": null, "error_if_not": null, "loop_if": null, "loop_if_not": null, "loop_count": "3", "exit_on_error": true, "save": null, "background": false, "kill_on_exit": true, "metadata": {"version": "two", "author": "cthulu"}, "varstore": false, "exit": false}}
{"start-datetime": "2024-08-02T08:32:01.764089", "type": "shell", "cmd": "pwd", "parameters": {"only_if": null, "error_if": null, "error_if_not": null, "loop_if": null, "loop_if_not": null, "loop_count": "3", "exit_on_error": true, "save": null, "background": false, "kill_on_exit": true, "metadata": null, "interactive": false, "creates_session": null, "session": null, "command_timeout": "10", "read": true, "command_shell": "/bin/sh", "bin": false}}

image

note that attackmate.json will hold one json root element per log line.