sslyze
sslyze copied to clipboard
Export ServerScanResult to json via python API.
Is your feature request related to a problem? Please describe. Is there any way to easily export the python ServerScanResult object to json?
Describe the solution you'd like Some function for ServerScanResult object like ServerScanResult.to_json("./path_to_output.json")
Describe alternatives you've considered Probably possible to use some json serializer for this purpose.
Hello, Yes, it is visible here for example: https://github.com/nabla-c0d3/sslyze/blob/8bf376c06af5fad9a78850c60013fd3d90022c3b/sslyze/main.py#L77
result_as_json = ServerScanResultAsJson.from_orm(result)
result_as_json_str = result_as_json.json() # <- String containing the JSON result
I added documentation on how to do this as part of v5.0.6.