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

kismet_log_devices_to_json produces unexpected json #6

Open
solsticedhiver opened this issue Mar 4, 2020 · 0 comments
Open

kismet_log_devices_to_json produces unexpected json #6

solsticedhiver opened this issue Mar 4, 2020 · 0 comments

Comments

@solsticedhiver
Copy link

solsticedhiver commented Mar 4, 2020

The output file of kismet_log_devices_to_json is a correct json file but it is a list of strings, which is not usefull.

It seems each object of the list has been converted to a string by out of placed quote at the start and end of each line of the file, and all the quotes inside the "object" are escaped with \.

For example:

[
"{<object1>}",
"{<object2>}",
"{<object3>}"
]

To get a usefull json file, one can use:

sed -e 's/\\"/"/g' -e 's/ "{/ {/g' -e 's/}",$/},/g' -e 's/}"$/}/g'  broken.json > fixed.json

The correct output should have been:

[
{<object1>},
{<object2>},
{<object3>}
]

where each object has quote not escaped.

Tested with a KismetDB version: 6

@solsticedhiver solsticedhiver changed the title kismet_log_devices_to_json produce unexpected and useless json kismet_log_devices_to_json produces unexpected json Mar 4, 2020
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

1 participant