2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-12-25 04:03:41 +01:00

Fix json date argument to be compatible on macos

This commit is contained in:
Julien Vehent 2014-10-10 17:27:29 -04:00
parent f6f4fe8b86
commit 278dab4800

View File

@ -331,7 +331,7 @@ display_results_in_terminal() {
display_results_in_json() {
# Display the results in json
ctr=0
echo -n "{\"target\":\"$TARGET\",\"date\":\"$(date -R)\",\"serverside\":\"${serverside}\",\"ciphersuite\": ["
echo -n "{\"target\":\"$TARGET\",\"date\":\"$(date '+%FT%T.0Z')\",\"serverside\":\"${serverside}\",\"ciphersuite\": ["
for cipher in "${cipherspref[@]}"; do
[ $ctr -gt 0 ] && echo -n ','
echo -n "{\"cipher\":\"$(echo $cipher|awk '{print $1}')\","