AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题

问题[curl](computer)

Martin Hope
Alex
Asked: 2025-03-28 20:08:31 +0800 CST

如何为“团队”频道创建“工作流”以便向该频道发送消息?

  • 6

按照此页面上的说明进行操作:

https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498

我创建了一个“工作流”。我将通过该过程获得的 URL 复制到变量中URL。然后,我尝试在 Linux 终端上使用以下命令向此 URL 发送 POST:

export DATA='{"key1": "value1", "key2": "value2"}'
export URL="https://..."
curl -X POST "$URL" -H "Content-Type: application/json" -d "$DATA"

但是我既没有从该命令得到任何输出,也没有在该团队频道上收到任何新消息。当我运行curlwith时-v,我得到以下输出:

Note: Unnecessary use of -X or --request, POST is already inferred.
* Host prod-237.westeurope.logic.azure.com:443 was resolved.
* IPv6: (none)
* IPv4: 108.142.31.202
*   Trying 108.142.31.202:443...
* Connected to prod-237.westeurope.logic.azure.com (109.142.32.202) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / secp521r1 / RSASSA-PSS
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: C=US; ST=WA; L=Redmond; O=Microsoft Corporation; CN=westeurope.logic.azure.com
*  start date: Feb 12 21:35:47 2025 GMT
*  expire date: Aug 11 21:35:47 2025 GMT
*  subjectAltName: host "prod-247.westeurope.logic.azure.com" matched cert's "*.westeurope.logic.azure.com"
*  issuer: C=US; O=Microsoft Corporation; CN=Microsoft Azure RSA TLS Issuing CA 03
*  SSL certificate verify ok.
*   Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha384WithRSAEncryption
*   Certificate level 1: Public key type RSA (4096/152 Bits/secBits), signed using sha384WithRSAEncryption
*   Certificate level 2: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* using HTTP/1.x
> POST /workflows/ff29670cf3154471a77ae5863370e3f1/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=zFkzcMt8Pf8RnxCOh7jNhal8VKHAzLY5hBhG6KwzoF4 HTTP/1.1
> Host: prod-237.westeurope.logic.azure.com
> User-Agent: curl/8.5.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 36
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/1.1 202 Accepted
< Content-Length: 0
< Date: Fri, 28 Mar 2025 12:05:28 GMT
< Cache-Control: no-cache
< Expires: -1
< Pragma: no-cache
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< x-ms-workflow-run-id: 08584584433564149666102064393CU234
< x-ms-correlation-id: d390446d-0198-455f-ba68-d17988303a72
< x-ms-client-tracking-id: 08584584433564149666102064393CU234
< x-ms-trigger-history-name: 08584584433564149666102064393CU234
< x-ms-execution-location: westeurope
< x-ms-workflow-system-id: /locations/westeurope/scaleunits/prod-237/workflows/ff29670cf4154471a77ae5863340e3f1
< x-ms-workflow-id: ff29670cf4154471a77ae5863340e3f1
< x-ms-workflow-version: 08584584446367016050
< x-ms-workflow-name: 959a5bcf-9475-4ce7-9075-2b54a7898f68
< x-ms-tracking-id: d390446d-0198-455f-ba68-d17988303a72
< x-ms-ratelimit-burst-remaining-workflow-writes: 41
< x-ms-ratelimit-remaining-workflow-download-contentsize: 30678016
< x-ms-ratelimit-remaining-workflow-upload-contentsize: 30677980
< x-ms-ratelimit-time-remaining-directapirequests: 2857065
< x-ms-request-id: westeurope:d390446d-0198-455f-ba68-d17988303a72

我做错了什么?如何向 Teams 频道发送消息?

似乎我需要遵循特定的数据格式,或者我必须使用“azure”创建一个“机器人”,或者使用“应用程序”创建一个“关联”?

我设法找到了一个相关的错误,它是:

Failed to install the Power Automate app in Microsoft Teams for team with ID 'bdd0d79d-0759-46a9-b8d4-51a51a42a59b'. Please try adding the Power Automate app to this team directly from the Microsoft Teams client. Error details: '{"error":{"code":"Forbidden","message":"Bulk Membership operation PUT failed on user '28:358f0194-6b0e-4dd3-af35-c24fe8a9ec87' with response code 207, status code :'AclCheckFailed', subStatusCode'1'","innerError":{"code":"AccessDenied","message":"Bulk Membership operation PUT failed on user '28:358f0194-6b0e-4dd3-af35-c24fe8a9ec87' with response code 207, status code :'AclCheckFailed', subStatusCode'1'","details":[],"date":"2025-03-28T13:30:26","request-id":"a51d1493-a622-4856-a976-07c48dce87b4","client-request-id":"c773988d-c459-4d2f-9417-b8ffc6eb596d"}}}'

但应用程序似乎已经安装好了。

这是一个私人频道,我将尝试下周在公共频道上重做该频道。

curl
  • 1 个回答
  • 47 Views
Martin Hope
Luis Abreu
Asked: 2025-01-20 19:35:28 +0800 CST

Windows 版 curl:从 powershell 运行时 sslkeylog 文件始终为空

  • 5

当从 Powershell 运行 curl 时,我尝试捕获用于 TLS 加密的主密钥,但日志文件始终为空。

我已经下载了curl并且在我的个人资料上创建了一个别名:

> set-alias curl d:\...\bin\curl.exe

当我检查版本时,似乎 Powershell 正在使用正确的版本:

>  curl --version
curl 8.11.1 (x86_64-w64-mingw32) libcurl/8.11.1 LibreSSL/4.0.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 WinIDN libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.64.0 ngtcp2/1.10.0 nghttp3/1.7.0
Release-Date: 2024-12-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets zstd

但是,我无法获取填充的主密钥文件:

> pwsh -command {$env:SSLKEYLOGFILE='sslkey.log'; curl -s "https://somesite.org"}
> cat sslkey.log
> ls

    Directory: C:\Users\luisabreu\tests

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           1/20/2025 11:33 AM              0 sslkey.log

文件已创建,但始终为空。

我错过了什么?

curl
  • 1 个回答
  • 22 Views
Martin Hope
Luis Abreu
Asked: 2025-01-16 00:43:16 +0800 CST

curl:有没有办法强制它在输出信息时写入当前时间

  • 6

我正在使用 curl 进行 Web 服务调用,该调用Transfer-Encoding: chunked用于获取其响应。我可以使用--raw和--no-buffer选项来获取到达的原始数据块:

curl -k -D - "https://somesite.com/justdoit" --http1.1 --no-buffer --raw 

这几乎可以满足我的要求:

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Strict-Transport-Security: max-age=2592000
Date: Wed, 15 Jan 2025 16:04:06 GMT
Set-Cookie: cookiesession1=678B297C93095B7E2ACF070259B276F9;Expires=Thu, 15 Jan 2026 16:04:06 GMT;Path=/;HttpOnly

6
<html>
4d6
<script src="js/select.js"></script>
<script>
...

但是,我还需要输出每个写入块的当前日期时间。例如:

2025-01-15 14:30:20
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Strict-Transport-Security: max-age=2592000
Date: Wed, 15 Jan 2025 16:04:06 GMT
Set-Cookie: cookiesession1=678B297C93095B7E2ACF070259B276F9;Expires=Thu, 15 Jan 2026 16:04:06 GMT;Path=/;HttpOnly

2025-01-15 14:30:21
6
<html>
2025-01-15 14:30:22
4d6
<script src="js/select.js"></script>
<script>
...

有这个选项吗?

谢谢

curl
  • 1 个回答
  • 41 Views
Martin Hope
Winston
Asked: 2023-12-16 09:26:31 +0800 CST

Curl 命令冻结并且无法按预期工作

  • 6

我想curl AMD 网站。我可以得到它,但我不知道如何让卷曲工作。

# wget command works if the header is added
wget -U 'Mozilla/5.0' https://www.amd.com/en.html
Resolving www.amd.com (www.amd.com)... 104.89.160.108
Connecting to www.amd.com (www.amd.com)|104.89.160.108|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘en.html’

# Check curl version
$ curl --version
curl 8.4.0 (x86_64-conda-linux-gnu) libcurl/8.4.0 OpenSSL/3.0.12 zlib/1.2.13 libssh2/1.10.0 nghttp2/1.57.0

2023-12-16 08:47:08 (1.56 MB/s) - ‘en.html’ saved [277861]

# First curl command gives error
$ curl https://www.amd.com/en.html
curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2)

# Second curl command freeze forever
$ curl -A 'Mozilla/5.0' --http1.1 -v https://www.amd.com/en.html
*   Trying 23.46.196.82:443...
* Connected to www.amd.com (23.46.196.82) port 443
* ALPN: curl offers http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /home/winston/anaconda3/ssl/cacert.pem
*  CApath: none
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: C=US; ST=CALIFORNIA; L=Santa Clara; O=Advanced Micro Devices, Inc.; CN=amd.com
*  start date: Feb 21 00:00:00 2023 GMT
*  expire date: Feb 20 23:59:59 2024 GMT
*  subjectAltName: host "www.amd.com" matched cert's "www.amd.com"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=GeoTrust RSA CA 2018
*  SSL certificate verify ok.
* using HTTP/1.1
> GET /en.html HTTP/1.1
> Host: www.amd.com
> User-Agent: Mozilla/5.0
> Accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing

curl
  • 1 个回答
  • 35 Views
Martin Hope
Hasitha Gorrepati
Asked: 2023-04-14 18:20:49 +0800 CST

使用 curl ping 应用程序时出错

  • 6
这个问题是从 Stack Overflow迁移过来的,因为它可以在 Super User 上回答。6 天前迁移 。

当我尝试在终端中使用 curl 来 ping 应用程序时,我收到了一个错误,如附图所示。谁能解释我为什么会收到此错误以及如何解决它。

这是错误:

这是错误

curl : 无法识别 URI 前缀

我尝试使用 curl 来 ping 应用程序,但出现错误。我期待有关错误的信息,如错误发生的原因以及解决方法

curl
  • 1 个回答
  • 22 Views
Martin Hope
dcannistraro
Asked: 2022-11-01 12:58:17 +0800 CST

有没有办法在不下载文件的情况下在域上 Grep 多个 HTML 页面?

  • 7

我本质上想在浏览器中Ctrl添加F多个站点。

我在域上有一系列 URLhttps://exampleblog.com/posts/{1-50}

我想/posts/一次 grep 下的所有页面。它们每个都用从 1 到 50 的有序 int 进行标识。

有没有办法在不下载的情况下做到这一点wget?我想 grep 我从中得到的信息curl。

我觉得有一个雄辩的管道或一个班轮可以让我从终端执行此操作而无需下载(尽管它可能很慢)。

grep pipe curl wget
  • 1 个回答
  • 46 Views
Martin Hope
Saeed
Asked: 2022-08-02 22:01:50 +0800 CST

如何卷曲不区分大小写

  • 11

如果我使用此链接安装 docker-compose,则会收到 Not Found 错误:

[root@hostname ~]# curl -L "https://github.com/docker/compose/releases/download/2.9.0/docker-compose-$(uname -s)-$(uname -m)" -o here
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9  100     9    0     0     37      0 --:--:-- --:--:-- --:--:--    37
[root@hostname ~]# cat here
Not Found

那是因为实际文件是docker-compose-linux-x86_64small l,而:

[root@hostname ~]# echo $(uname -s)-$(uname -m)
Linux-x86_64

它返回资本L。

我看到man curl但没有看到任何用于检查不区分大小写链接的条目。

linux curl
  • 3 个回答
  • 2393 Views
Martin Hope
AlMo320
Asked: 2022-07-03 22:13:51 +0800 CST

PolarProxy 生成 SAN 证书生成 curl 错误

  • 5

我使用 -v 运行 curl 7.58.0(参见附图中的版本),得到的结果表明证书中的 CN=example.com 正常,但是 curl 找不到匹配的 subjectAltName。是否有禁用此检查的开关或参数,或者我是否应该假设问题出在 PolarProxy 上(尝试从此页面安装)。它确实适用于 -k/--insecure 标志。我正在执行安装 inetsim 和 PolarProxy 以进行恶意软件分析的步骤。我的远程客户端也无法通过 https 或 smtps 进行连接,因此我正在尝试解决此屏幕截图中出现的错误。这是 ubuntu 服务器 18.04。

* TLSv1.2 (IN), TLS header, Supplemental data (23):

* TLSv1.3 (IN), TLS handshake, CERT verify (15):

* TLSv1.2 (IN), TLS header, Supplemental data (23):

* TLSv1.3 (IN), TLS handshake, Finished (20):

* TLSv1.2 (OUT), TLS header, Finished (20):

* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):

* TLSv1.2 (OUT), TLS header, Supplemental data (23):

* TLSv1.3 (OUT), TLS handshake, Finished (20):

* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384

* ALPN, server did not agree to a protocol

* Server certificate:

*  subject: CN=example.com

*  start date: Jul  2 20:44:34 2022 GMT

*  expire date: Jul  3 20:44:34 2023 GMT

*  subjectAltName does not match example.com

* SSL: no alternative certificate subject name matches target host name 'example.com'

* Closing connection 0

* TLSv1.2 (OUT), TLS header, Supplemental data (23):

* TLSv1.3 (OUT), TLS alert, close notify (256):

curl: (60) SSL: no alternative certificate subject name matches target host name 'example.com'

More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

从我在远程客户端上可以看出,证书是由 PolarProxy 生成的'Subject Alternative Name' = 'DNS Name=CN=example.com',在我看来它看起来不合法,curl 似乎反对。

PolarProxy 可执行文件上似乎没有任何开关来抑制 x509 证书中伪造(我认为)SAN 元素的生成。

任何有 PolarProxy 经验并可能让我知道发生了什么的人,请这样做。感谢所有帮助。

proxy curl
  • 2 个回答
  • 99 Views
Martin Hope
244boy
Asked: 2022-06-09 20:15:58 +0800 CST

下载文件时curl的单位是什么?

  • 6

当我使用 curl 测试文件下载流量时:

curl -vo 1 'https://demo.com/apk/202112/008/93cd5df7dbf9385f6a12c720c8c5b360.apk'

我得到:

{ [data not shown]
  2 1771M    2 50.5M    0     0  3591k      0  0:08:25  0:00:14  0:08:11 6153k

是6153k指 6153kbps 还是 6153kbps?

curl
  • 1 个回答
  • 46 Views
Martin Hope
yodamad
Asked: 2022-05-12 00:16:07 +0800 CST

无法在 alpine 上运行 curl 7.83.0

  • 5

我正在尝试在7.83的高山环境中安装curl ,但它无法运行命令并给我以下错误

Error relocating /usr/bin/curl: curl_easy_nextheader: symbol not found
Error relocating /usr/bin/curl: curl_easy_header: symbol not found

我在文档中看到它们是新功能,但没有找到是否可以禁用它们或修复它们。

我试过了,--enable-headers-api但它并没有改变任何东西。

任何想法 ?谢谢

linux curl
  • 1 个回答
  • 800 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve