当我执行时:
openssl s_client -connect google.com:443
openssl s_client -connect government.ru:443
这给了我有价值的输出,但我想openssl
关闭连接并退出返回一个整数退出代码(不同),以便我可以这样做
echo "Domain?";read d
openssl s_client -connect "$d":443
if [[ "$?" -eq 0 ]]; then
echo "Encrypted"; do_sth
else
echo "Plain."; do_sth_else
fi