小编Chi*_*ime的帖子

在grep期间抑制Openssl输出

grep在测试TLS安全性时,我经常使用openssl结果.例如:

$ openssl s_client -tls1_2 -connect 172.11.15.32:443 </dev/null | grep 'IS s'
depth=0 C = US, ST = asd, O = Billing, CN = asdasd, emailAddress = root@asdasd
verify error:num=18:self signed certificate
verify return:1
depth=0 C = US, ST = asd, O = Billing, CN = asdasd, emailAddress = root@asdasd
verify return:1
DONE
Secure Renegotiation IS supported
Run Code Online (Sandbox Code Playgroud)

然而,问题是,无论我的grep是什么,输出始终包含这些(或类似的)行:

depth=0 C = US, ST = asd, O = Billing, CN = asdasd, emailAddress = root@asdasd
    verify error:num=18:self signed certificate
    verify …
Run Code Online (Sandbox Code Playgroud)

bash grep

3
推荐指数
1
解决办法
3944
查看次数

标签 统计

bash ×1

grep ×1