CURL
Allgemeines
Request/Response Information
curl -iv –head https://www.netzwissen.de oder
curl https://www.netzwissen.de -I
* Rebuilt URL to: https://www.netzwissen.de/ * Trying 138.201.52.53... * TCP_NODELAY set * Connected to www.netzwissen.de (138.201.52.53) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: CN=www2.netzwissen.de * start date: Nov 27 15:13:22 2019 GMT * expire date: Feb 25 15:13:22 2020 GMT * subjectAltName: host "www.netzwissen.de" matched cert's "www.netzwissen.de" * issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3 * SSL certificate verify ok.> HEAD / HTTP/1.1> Host: www.netzwissen.de> User-Agent: curl/7.58.0> Accept: */*> <HTTP/1.1 301 Moved Permanently HTTP/1.1 301 Moved Permanently <Date: Sat, 21 Dec 2019 07:09:44 GMT Date: Sat, 21 Dec 2019 07:09:44 GMT <Server: Apache/2.4.29 (Ubuntu) Server: Apache/2.4.29 (Ubuntu) <Strict-Transport-Security: max-age=31536000; includeSubDomains Strict-Transport-Security: max-age=31536000; includeSubDomains <X-Content-Type-Options: nosniff X-Content-Type-Options: nosniff <Set-Cookie: 21529421b0cb0cfcd6db3ee5cf2b926a=f0uvjqlmf5eos249i316kh3hfr; path=/; domain=netzwissen.de; secure; HttpOnly Set-Cookie: 21529421b0cb0cfcd6db3ee5cf2b926a=f0uvjqlmf5eos249i316kh3hfr; path=/; domain=netzwissen.de; secure; HttpOnly <Expires: Wed, 17 Aug 2005 00:00:00 GMT Expires: Wed, 17 Aug 2005 00:00:00 GMT <Last-Modified: Sat, 21 Dec 2019 07:09:45 GMT Last-Modified: Sat, 21 Dec 2019 07:09:45 GMT <Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0 <Pragma: no-cache Pragma: no-cache <Location: https://www.netzwissen.de/de/ Location: https://www.netzwissen.de/de/ <Content-Type: text/html; charset=utf-8 Content-Type: text/html; charset=utf-8 <* Connection #0 to host www.netzwissen.de left intact
Proxy Anfragen
Basis Syntax
curl -x proxy_address:proxy_port URL
Mit dieser Anfrage bekommt an die eigene IP zurück, als Beweis, dass der Proxy selber tut:
curl -x 195.154.243.38:8080 https://httpbin.org/ip
Proxy Auth
curl --proxy-user username:password -x proxy_address https://httpbin.org/ip
Kaputte Zertifikate umgehen
curl --proxy http://proxy.example.com:8080 --insecure https://httpbin.org/ip
Proxy Request mit Header
curl -x proxy_address -H "Header-Name: Header-Value" https://httpbin.org/ip