User Tools

Site Tools


утилита_curl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
утилита_curl [2026/04/01 11:21]
val
утилита_curl [2026/09/07 11:31] (current)
val [Примеры использования]
Line 22: Line 22:
  
 # docker run --rm alpine/curl -sS https://​ya.ru # docker run --rm alpine/curl -sS https://​ya.ru
 +
 +$ curl -u "​admin"​ http://​val.bmstu.ru:​8080 -v
 +$  curl -u "​admin:​12345678"​ http://​val.bmstu.ru:​8080 -v
 +$  echo -n "​admin:​12345678"​ | base64
 +$  curl http://​val.bmstu.ru:​8080/​v1/​models -H "​Authorization:​ Basic YWRtaW46MTIzNDU2Nzg="​
 +
 +$  curl http://​val.bmstu.ru:​8080/​v1/​models -H "​Authorization:​ Bearer 1234567890abcdefg"​
 </​code>​ </​code>​
  
Line 44: Line 51:
   * [[https://​blog.ambor.com/​2021/​08/​using-curl-to-send-e-mail-with.html|Using cURL to send an e-mail with an attachment]]   * [[https://​blog.ambor.com/​2021/​08/​using-curl-to-send-e-mail-with.html|Using cURL to send an e-mail with an attachment]]
   * [[Использование библиотеки PAM#​Использование pam_exec для регистрации подключений]]   * [[Использование библиотеки PAM#​Использование pam_exec для регистрации подключений]]
 +  * [[Коды завершения#​Простая система мониторинга]]
 <​code>​ <​code>​
-(echo Subject: ​test;​cat ​/etc/hosts) | curl smtp://​gate.isp.un/​ --mail-from ​user13@isp.un --mail-rcpt ​user13@isp.un --upload-file ​-+$ cat email.txt 
 +</​code><​code>​ 
 +Subject: ​Test Inet (ya.ru) 
 + 
 +Not 
 +Pass 
 +</code><​code>​ 
 +$ while curl -s https://ya.ru >/​dev/​null;​ do sleep 600; done \  
 +curl -s smtp://​gate.isp.un/​ --mail-from ​userX@isp.un --mail-rcpt ​userX@isp.un --upload-file ​email.txt
 </​code>​ </​code>​
утилита_curl.1775031713.txt.gz · Last modified: 2026/04/01 11:21 by val