Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-pretty flag failing to convert to JSON #12

Open
matt-taylor934 opened this issue Aug 9, 2021 · 2 comments
Open

-pretty flag failing to convert to JSON #12

matt-taylor934 opened this issue Aug 9, 2021 · 2 comments

Comments

@matt-taylor934
Copy link

In v2.3.0 the -pretty flag is failing with the following error when doing a CLI scan:
{"ERROR" : "failed to covert output to JSON"}

Running the scan without -pretty and trying to convert the results to JSON afterwards with 'jq' also fails,

Confirmed across various Macs running macOS 11.4 and 11.15.1.

@actualben
Copy link

I have seen this issue when a Browser Extension has quotation marks in the details field, Parallels Desktop includes at least one such extension in the app bundle. This results in the output being non-conforming json and the prettifier can't parse it.

@evild3ad
Copy link

evild3ad commented Nov 9, 2022

My workaround:

sudo ./KnockKnock.app/Contents/MacOS/KnockKnock -whosthere > "$OUTPUT"/KnockKnock/KnockKnock-draft.json
/bin/cat "$OUTPUT"/KnockKnock/KnockKnock-draft.json | /usr/bin/sed -E 's/(""[^"]*)"/\1/' | /usr/bin/sed 's/""/"/g' | jq . > "$OUTPUT"/KnockKnock/KnockKnock.json
/bin/rm "$OUTPUT"/KnockKnock/KnockKnock-draft.json

Please fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants