Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash Openssl s_客户端和HERE文档_Bash_Openssl - Fatal编程技术网

Bash Openssl s_客户端和HERE文档

Bash Openssl s_客户端和HERE文档,bash,openssl,Bash,Openssl,全部,, 我正在尝试创建一个bash shell脚本,该脚本使用openssl为我执行https查询(/dev/tcp和wget不可用),大致如下所示: openssl s_client -connect xxx.xxx.xxx.xxx:port <<EOF GET / HTTP/1.1 Connection: close ...more http here... EOF openssl s_客户端-connectxxx.xxx.xxx.xxx:port我想知道-ign_eof

全部,, 我正在尝试创建一个bash shell脚本,该脚本使用openssl为我执行https查询(/dev/tcp和wget不可用),大致如下所示:

openssl s_client -connect xxx.xxx.xxx.xxx:port <<EOF
GET / HTTP/1.1
Connection: close
...more http here...


EOF

openssl s_客户端-connectxxx.xxx.xxx.xxx:port我想知道
-ign_eof
是否有帮助。原始问题如中所述(注意,这是一个非常老的问题),此开关似乎很合适。

在返回输入后它挂起(因为忽略了eof),因此我添加了“连接:关闭”,以便服务器关闭连接。