Closed d-steffan closed 3 years ago
You executed a sslyze command and that generated the error and created a file called "/usr/bin/faraday-cli/None"??
Can you send us the full command (change the domain or other sensitive information)?
if i process_report it also fails unless i change the extension to .json:
[ws:testcli]> process_report /usr/bin/faraday-cli/None
❌ Failed to detect report: /usr/bin/faraday-cli/None
[ws:testcli]> shell mv /usr/bin/faraday-cli/None /usr/bin/faraday-cli/None.json
[ws:testcli]> process_report /usr/bin/faraday-cli/None.json
📄 Processing Sslyze JSON report
⬆ Sending data to workspace: testcli
✔ Done
unfortunately setting the json_out in sslyze doesn't work for faraday, it always exports the file as "None"
You executed a sslyze command and that generated the error and created a file called "/usr/bin/faraday-cli/None"??
Can you send us the full command (change the domain or other sensitive information)?
the full command is in my first comment:
faraday-cli sslyze 127.0.0.1:8834
[ws:testcli]> sslyze 127.0.0.1:8834 --json_out=/tmp/sslyze-report.json
💻 Processing Sslyze JSON command
CHECKING HOST(S) AVAILABILITY
-----------------------------
127.0.0.1:8834 => 127.0.0.1
<sslyze stuff>
SCAN COMPLETED IN 12.14 S
-------------------------
Wrote JSON output to "/usr/bin/faraday-cli/None".
EXCEPTION of type 'JSONDecodeError' occurred with message: 'Expecting value: line 2 column 2 (char 2)'
seems like faraday-cli overwrites --json_out ?
[ws:testcli]> sslyze 127.0.0.1:8834 --json_out=/tmp/sslyze-report.json 💻 Processing Sslyze JSON command CHECKING HOST(S) AVAILABILITY ----------------------------- 127.0.0.1:8834 => 127.0.0.1 <sslyze stuff> SCAN COMPLETED IN 12.14 S ------------------------- Wrote JSON output to "/usr/bin/faraday-cli/None". EXCEPTION of type 'JSONDecodeError' occurred with message: 'Expecting value: line 2 column 2 (char 2)'
seems like faraday-cli overwrites --json_out ?
Yes, the plugins generally modifiy the commands to send the output files to a specific place. So the output can be parsed after. Les me see the issue here, its probably a bug in the sslyze plugin and not the cli
@d-steffan Yes the bug is in the plugin. Here is a way to debug, with faraday-plugin you can test a command and see the modified command without executing it.
faraday-plugins process-command -dr "sslyze 127.0.0.1:8834"
Command: sslyze --json_out None 127.0.0.1:8834
Look how it changes the command but is sets None as the output.
For a workaround run the command manually and us process_report like you did in the example. I will open an issue in faraday-plugins. Thanks
Alright, thanks for the quick response and have a nice day!
@d-steffan I have fixed the issue, run
pip install -U faraday-plugins
faraday-cli: 1.0.2 sslyze: 4.0.4
The checked webserver exists and calling sslyze without faraday-cli returns valid results. The JSON at /usr/bin/faraday-cli/None is saved and contains valid data.
The first few lines (head) of the JSON file are:
In case the char used for indentation is the problem, heres the hexdump of head: