无法将curl 与cookie-jar 一起使用

无法将curl 与cookie-jar 一起使用

我正在尝试使用curl 来实现登录请求自动化。这里,必须使用cookie-jar。当我使用--cooki-jar cjar选项,它显示以下错误。

root@kali:~# curl --cookie-jar cjar --output /root/Desktop/Curl/ \ https://www.google.com
curl: (1) Protocol " https" not supported or disabled in libcurl 

当我用谷歌搜索一下它时,这个链接库卷3这里他们说需要安装 libssl 开发

当我验证我的系统的两个库时,在我的 Kali Linux 盒子中,可以使用最新版本。仍然显示错误。那么有人可以帮我解决这个问题吗?

系统详细信息:

root@kali:~# dpkg -s libssl-dev
Package: libssl-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 6908
Maintainer: Debian OpenSSL Team <[email protected]>
Architecture: amd64

多架构:相同 源:openssl 版本:1.1.0g-2 依赖:libssl1.1 (= 1.1.0g-2) 推荐:libssl-doc 冲突:libssl1.0-dev 描述:安全套接字层工具包 - 开发文件 这包是 OpenSSL 项目实现 SSL 和 TLS 加密协议的一部分,用于通过 Internet 进行安全通信。 。它包含 libssl 和 libcrypto 的开发库、头文件和联机帮助页。主页:https://www.openssl.org/

root@kali:~# dpkg -s libcurl3
Package: libcurl3
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 649
Maintainer: Alessandro Ghedini <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: curl
Version: 7.57.0-1
Depends: libc6 (>= 2.17), libcomerr2 (>= 1.01), libgssapi-krb5-2 (>= 1.14+dfsg), libidn2-0 (>= 0.6), libk5crypto3 (>= 1.6.dfsg.2), libkrb5-3 (>= 1.6.dfsg.2), libldap-2.4-2 (>= 2.4.7), libnghttp2-14 (>= 1.12.0), libpsl5 (>= 0.13.0), librtmp1 (>= 2.4+20131018.git79459a2-3~), libssh2-1 (>= 1.7.0), libssl1.0.2 (>= 1.0.2d), zlib1g (>= 1:1.1.4)
Recommends: ca-certificates
Description: easy-to-use client-side URL transfer library (OpenSSL flavour)
libcurl is an easy-to-use client-side URL transfer library, supporting DICT,
FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S,
RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP.

。 libcurl 支持 SSL 证书、HTTP POST、HTTP PUT、FTP 上传、基于 HTTP 表单的上传、代理、cookie、用户+密码身份验证(基本、摘要、NTLM、协商、Kerberos)、文件传输恢复、http 代理隧道等等! 。 libcurl 是免费的、线程安全的、IPv6 兼容的、功能丰富的、支持良好的、快速的、完整的文档,并且已经被许多知名的、大的、成功的公司和众多的应用程序使用。 。 SSL 支持由 OpenSSL 提供。主页:http://curl.haxx.se

答案1

命令中有意外的反斜杠,而且- 输出应该是一个文件名。尝试这个:

curl --cookie-jar cjar --output /root/Desktop/Curl/output.html https://www.google.com

相关内容