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

dns output is not valid JSON #11

Closed
aradford123 opened this issue Oct 9, 2016 · 2 comments
Closed

dns output is not valid JSON #11

aradford123 opened this issue Oct 9, 2016 · 2 comments

Comments

@aradford123
Copy link

$ ./query.py out.json.gz --where "dp=53 & sa=192.168.1.243 & sp=58126" --select "sa, sp, dns"
{
"name": [
{ "sa": "192.168.1.243" , "sp": 58126 , "dns": [{u'rn': u'4-edge-chat.facebook.com', u'rr': [{u'cname': u'star.c10r.facebook.com', u'ttl': 3548}, {u'a': u'179.60.193.3', u'ttl': 39}], u'rc': 8}] }
]
}

The "dns" value is not valid json.

@aradford123
Copy link
Author

in function def raw2output(raw):

need to add an option for a list. DNS entries are a list, not a dict
if type(raw) is list:
return json.dumps(raw) # indent=3 makes this legible

@davidmcgrew
Copy link
Member

Hey Adam, sorry to let this one languish so long. The query2.py program doesn't have this problem; once there has been some discussion on what sort of behavior would be best for that program, I'd like to have it replace the original query.py program.

@fliphil fliphil closed this as completed Jul 31, 2017
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