Kleine Shell Befehle die es einem erlauben Webseiten abzufragen. Auf dem Mac werden diese in der System App Terminal ausgeführt. Auf dem PC lässt sich die Kommandozeile über cmd.exe bzw. Windows Terminal öffnen.
HTTP Header Kurzversion
eingabe
curl -A "Mozilla" -I "https://www.web.de"
Ausgabe
curl -A "Mozilla" -I "https://www.web.de"
HTTP/2 301
date: Tue, 25 Feb 2025 20:25:03 GMT
server: Apache
strict-transport-security: max-age=31536000; includeSubdomains; preload
location: https://web.de/
content-type: text/html; charset=iso-8859-1
HTTP Header ausführlich
Eingabe
curl -v -I -H "Header Testing:" https://stackoverflow.com/
Ausgabe
* Host stackoverflow.com:443 was resolved.
* IPv6: (none)
* IPv4: 104.18.32.7, 172.64.155.249
* Trying 104.18.32.7:443...
* Connected to stackoverflow.com (104.18.32.7) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
* subject: CN=stackoverflow.com
* start date: Jan 2 17:50:49 2025 GMT
* expire date: Apr 2 17:50:48 2025 GMT
* subjectAltName: host "stackoverflow.com" matched cert's "stackoverflow.com"
* issuer: C=US; O=Let's Encrypt; CN=E5
* SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://stackoverflow.com/
* [HTTP/2] [1] [:method: HEAD]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: stackoverflow.com]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
> HEAD / HTTP/2
> Host: stackoverflow.com
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/2 302
HTTP/2 302
< date: Tue, 25 Feb 2025 20:30:18 GMT
date: Tue, 25 Feb 2025 20:30:18 GMT
< location: /questions
location: /questions
< cf-ray: 917a73d38d3e6a77-TXL
cf-ray: 917a73d38d3e6a77-TXL
< cf-cache-status: DYNAMIC
cf-cache-status: DYNAMIC
< cache-control: private
cache-control: private
< set-cookie: prov=20dd41aa-b2f6-420f-a4a8-cbc0be543b8a; expires=Wed, 25 Feb 2026 20:30:18 GMT; domain=.stackoverflow.com; path=/; secure; samesite=none; httponly
set-cookie: prov=20dd41aa-b2f6-420f-a4a8-cbc0be543b8a; expires=Wed, 25 Feb 2026 20:30:18 GMT; domain=.stackoverflow.com; path=/; secure; samesite=none; httponly
< strict-transport-security: max-age=15552000
strict-transport-security: max-age=15552000
< content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
< feature-policy: microphone 'none'; speaker 'none'
feature-policy: microphone 'none'; speaker 'none'
< x-frame-options: SAMEORIGIN
x-frame-options: SAMEORIGIN
< x-request-guid: 4373fd12-2913-4fcb-913c-62e5b342daf6
x-request-guid: 4373fd12-2913-4fcb-913c-62e5b342daf6
< x-worker-origin-response-time: 109
x-worker-origin-response-time: 109
< x-dns-prefetch-control: off
x-dns-prefetch-control: off
< set-cookie: __cflb=0H28vFHtoAR1ohjxFgDZBwZ5H5NWURYNGatWyyoUvcC; SameSite=Lax; path=/; expires=Wed, 26-Feb-25 19:30:18 GMT; HttpOnly
set-cookie: __cflb=0H28vFHtoAR1ohjxFgDZBwZ5H5NWURYNGatWyyoUvcC; SameSite=Lax; path=/; expires=Wed, 26-Feb-25 19:30:18 GMT; HttpOnly
< set-cookie: __cf_bm=nskx4hDp49fazYqMhy9Spz9fhLnentnLSbwbzfodqOc-1740515418-1.0.1.1-cxnrPAGPIfpRf6qlehfalIww_5v5I6.z7p8Uuea38khhQOlgwIt_5FZgcWMRieP5.hbnhF.TFBxJC8EBWyYmgg; path=/; expires=Tue, 25-Feb-25 21:00:18 GMT; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
set-cookie: __cf_bm=nskx4hDp49fazYqMhy9Spz9fhLnentnLSbwbzfodqOc-1740515418-1.0.1.1-cxnrPAGPIfpRf6qlehfalIww_5v5I6.z7p8Uuea38khhQOlgwIt_5FZgcWMRieP5.hbnhF.TFBxJC8EBWyYmgg; path=/; expires=Tue, 25-Feb-25 21:00:18 GMT; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
< set-cookie: _cfuvid=WK6X_X1JDV7RxFViiRcC7Gxa1_QRg6PvqsWUzrLJzkY-1740515418299-0.0.1.1-604800000; path=/; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=WK6X_X1JDV7RxFViiRcC7Gxa1_QRg6PvqsWUzrLJzkY-1740515418299-0.0.1.1-604800000; path=/; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
< server: cloudflare
server: cloudflare
<
* Connection #0 to host stackoverflow.com left intact
TTL & IP-Adresse einer Webseite anzeigen
Einhabe
ping -c 3 usability-now.com
Ausgabe
ping -c 3 usability-now.com
PING usability-now.com (151.252.49.217): 56 data bytes
64 bytes from 151.252.49.217: icmp_seq=0 ttl=58 time=25.657 ms
64 bytes from 151.252.49.217: icmp_seq=1 ttl=58 time=26.591 ms
64 bytes from 151.252.49.217: icmp_seq=2 ttl=58 time=26.250 ms
--- usability-now.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 25.657/26.166/26.591/0.386 ms
Traceroute Befehl
Eingabe. Ermitteln welche Hops / Welcher Server Antworten
traceroute hamburg.de
Ausgabe
traceroute to hamburg.de (212.1.41.48), 64 hops max, 40 byte packets
1 speedport.ip (192.168.2.1) 4.193 ms 6.706 ms 2.461 ms
2 p3e9bf170.dip0.t-ipconnect.de (62.155.241.112) 10.825 ms 10.269 ms 9.004 ms
3 hh-ea13-i.hh.de.net.dtag.de (217.5.86.254) 10.741 ms
hh-ea13-i.hh.de.net.dtag.de (217.5.74.102) 13.203 ms
hh-ea13-i.hh.de.net.dtag.de (217.5.74.106) 10.476 ms
4 80.156.163.106 (80.156.163.106) 8.670 ms 10.295 ms 8.606 ms
5 vip-48.hamburg.de (212.1.41.48) 10.158 ms 8.970 ms 11.875 ms
HTTP Status abfragen
curl -IL http://www.web.de
Gibt den http Status-Code zurück. In diesem Beispiel einen 301 redirect zur https Version.
HTTP/1.1 301 Moved Permanently
Date: Sat, 22 Jan 2022 09:46:19 GMT
Server: Apache
Location: https://web.de/
Content-Type: text/html; charset=iso-8859-1
HTTP/2 200
date: Sat, 22 Jan 2022 09:46:19 GMT
server: Apache
strict-transport-security: max-age=31536000; includeSubdomains; preload
expires: Thu, 01 Jan 1970 00:00:00 GMT
pragma: no-cache
cache-control: no-cache, no-store
x-frame-options: deny
content-security-policy: frame-ancestors 'none'
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: origin-when-cross-origin
feature-policy: microphone 'none'; camera 'none'
vary: Accept-Encoding
content-type: text/html;charset=UTF-8
set-cookie: clktype=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly
set-cookie: ui_cid=OPTOUT; Max-Age=31536000; Expires=Sun, 22-Jan-2023 09:46:19 GMT; Path=/; Secure; HttpOnly
set-cookie: SSLB=.0; domain=.web.de ;path=/
WebP Bilder als .png über die Shell Runterladen
Eingabe um mit einem HTTP Befehl auf der EingabeKonsole ein WebP Bilder herunterzuladen.
Eingabe:
curl -o foo.png https://www.domain.de/bild.webp
Ausgabe:
Bild wird im Download Ordner als .png runtergeladen.