Outils pour utilisateurs

Outils du site


tech:notes_curl_wget

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:notes_curl_wget [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_curl_wget [2025/12/02 14:32] (Version actuelle) Jean-Baptiste
Ligne 51: Ligne 51:
  
 <code bash> <code bash>
-export http_proxy=http://127.0.0.1:8118/ +#export http_proxy=http://127.0.0.1:8118/ 
-export https_proxy=http://127.0.0.1:8118/+#export https_proxy=http://127.0.0.1:8118/ 
 +export ALL_PROXY=http://127.0.0.1:8118/
  
 # Ou # Ou
Ligne 112: Ligne 113:
 ''-S'' : When used with -s, --silent, it makes curl show an error message if it fails \\  ''-S'' : When used with -s, --silent, it makes curl show an error message if it fails \\ 
 ''-L'' : If the server reports that the requested page has moved to a different location, this option will make curl redo the request on  the  new place. ''-L'' : If the server reports that the requested page has moved to a different location, this option will make curl redo the request on  the  new place.
 +
  
 === Fichier config .curlrc === Fichier config .curlrc
  
-<code - .curlrc>+''.curlrc'' 
 +<code ->
 # Source : https://gist.github.com/v1m/f1d4751883f19c916515 # Source : https://gist.github.com/v1m/f1d4751883f19c916515
  
Ligne 137: Ligne 140:
 </code> </code>
  
-<code - .curlrc>+''.curlrc'' 
 +<code ->
 Source https://github.com/necolas/dotfiles/blob/0d402c916f6e1118b20bd4befff863c1e4a2ee2d/shell/curlrc Source https://github.com/necolas/dotfiles/blob/0d402c916f6e1118b20bd4befff863c1e4a2ee2d/shell/curlrc
  
Ligne 165: Ligne 169:
  
 Upload Upload
-<code>+<code ->
 HTTP POST files here: HTTP POST files here:
     curl --proxy 127.0.0.1:4444 -F'file=@yourfile.png' http://0xff.i2p     curl --proxy 127.0.0.1:4444 -F'file=@yourfile.png' http://0xff.i2p
Ligne 270: Ligne 274:
 Pour enregistrer le certificat et vérifier Pour enregistrer le certificat et vérifier
 <code bash> <code bash>
-openssl s_client -showcerts -connect www.acme.fr:443 -servername www.acme.fr </dev/null > cert.pem +openssl s_client -showcerts -connect www.acme.fr:443 -servername www.acme.fr </dev/null > cacert.pem 
-curl  --cacert cert.pem  https://www.acme.fr+# ou 
 +curl --w %{certs} https://www.acme.fr > cacert.pem
 </code> </code>
 +
 +Tester
 +<code bash>
 +curl --cacert cacert.pem  https://www.acme.fr
 +</code>
 +
  
 ou avec wget ou avec wget
Ligne 287: Ligne 298:
 </code> </code>
  
-<code ini .curlrc>+TODO : equivalement pour Redhat avec ''update-ca-trust'' 
 + 
 +''.curlrc'' 
 +<code bash>
 cacert=/home/jean/cert.pem cacert=/home/jean/cert.pem
 </code> </code>
  
 Ou, à éviter mais possible Ou, à éviter mais possible
-<code ini .curlrc>+''.curlrc'' 
 +<code bash>
 insecure insecure
 </code> </code>
Ligne 311: Ligne 326:
 systemctl restart jenkins systemctl restart jenkins
 </code> </code>
 +
  
 == Python == Python
Ligne 337: Ligne 353:
 wget --ca-certificate=keys/ca.crt --private-key=keys/client1.key --certificate=keys/client1.crt https://pkiweb.lan wget --ca-certificate=keys/ca.crt --private-key=keys/client1.key --certificate=keys/client1.crt https://pkiweb.lan
 </code> </code>
 +
  
 == Envoyer un fichier en ligne de commande (upload web) == Envoyer un fichier en ligne de commande (upload web)
tech/notes_curl_wget.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki