Open darmado opened 1 week ago
When --log is combined with --encode the msg is not written to the log file.
--log
--encode
--log and encode=*
encode=*
run the script and observe the log output in T1087_accounts_discovery.log sh accounts.sh -i --log --encode=b64
T1087_accounts_discovery.log
sh accounts.sh -i --log --encode=b64
Actual log output:
`[2024-09-14 22:55:47]: user: darmado; msg: Obtained current user info; command: "id": WzIwMjQtMDktMTQgMjI6NDk6MjFdOiB1c2VyOiBkYXJtYWRvOyBtc2c6IE9idGFpbmVkIGN1cnJlbnQgdXNlciBpbmZvOyBjb21tYW5kOiAiaWQiCnVpZD01MDEoZGFybWFkbykgZ2lkPTIwKHN0YWZmKSBncm91cHM9MjAoc3RhZmYpLDEyKGV2ZXJ5b25lKSw2MShsb2NhbGFjY291bnRzKSw3OShfYXBwc2VydmVydXNyKSw4MChhZG1pbiksODEoX2FwcHNlcnZlcmFkbSksOTgoX2xwYWRtaW4pLDMzKF9hcHBzdG9yZSksMTAwKF9scG9wZXJhdG9yKSwyMDQoX2RldmVsb3BlciksMjUwKF9hbmFseXRpY3N1c2VycyksMzk1KGNvbS5hcHBsZS5hY2Nlc3NfZnRwKSwzOTgoY29tLmFwcGxlLmFjY2Vzc19zY3JlZW5zaGFyaW5nKSwzOTkoY29tLmFwcGxlLmFjY2Vzc19zc2gpLDQwMChjb20uYXBwbGUuYWNjZXNzX3JlbW90ZV9hZSksNzAxKGNvbS5hcHBsZS5zaGFyZXBvaW50Lmdyb3VwLjEpCgo=
`
problem
When
--log
is combined with--encode
the msg is not written to the log file.--log
andencode=*
Steps to Reproduce
run the script and observe the log output in
T1087_accounts_discovery.log
sh accounts.sh -i --log --encode=b64
Actual log output:
Expected output
`[2024-09-14 22:55:47]: user: darmado; msg: Obtained current user info; command: "id": WzIwMjQtMDktMTQgMjI6NDk6MjFdOiB1c2VyOiBkYXJtYWRvOyBtc2c6IE9idGFpbmVkIGN1cnJlbnQgdXNlciBpbmZvOyBjb21tYW5kOiAiaWQiCnVpZD01MDEoZGFybWFkbykgZ2lkPTIwKHN0YWZmKSBncm91cHM9MjAoc3RhZmYpLDEyKGV2ZXJ5b25lKSw2MShsb2NhbGFjY291bnRzKSw3OShfYXBwc2VydmVydXNyKSw4MChhZG1pbiksODEoX2FwcHNlcnZlcmFkbSksOTgoX2xwYWRtaW4pLDMzKF9hcHBzdG9yZSksMTAwKF9scG9wZXJhdG9yKSwyMDQoX2RldmVsb3BlciksMjUwKF9hbmFseXRpY3N1c2VycyksMzk1KGNvbS5hcHBsZS5hY2Nlc3NfZnRwKSwzOTgoY29tLmFwcGxlLmFjY2Vzc19zY3JlZW5zaGFyaW5nKSwzOTkoY29tLmFwcGxlLmFjY2Vzc19zc2gpLDQwMChjb20uYXBwbGUuYWNjZXNzX3JlbW90ZV9hZSksNzAxKGNvbS5hcHBsZS5zaGFyZXBvaW50Lmdyb3VwLjEpCgo=
`