User Tools

Site Tools


sk2:http

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sk2:http [2026/01/05 22:56] – [Metody HTTP] jkonczaksk2:http [2026/11/07 22:08] (current) – jkonczak
Line 4: Line 4:
    p + p   { margin-top: 1.4em }    p + p   { margin-top: 1.4em }
    pre     { margin: 0.1em 0 0 0; padding-top: 0.2em; padding-bottom: 0.2em; line-height: 1em }    pre     { margin: 0.1em 0 0 0; padding-top: 0.2em; padding-bottom: 0.2em; line-height: 1em }
-   pre     { user-select: all } +   //pre     { user-select: all } 
-   code    { user-select: all }+   //code    { user-select: all }
    pre+pre { margin-top: 0.2em }    pre+pre { margin-top: 0.2em }
    .sel    { user-select: all; background-color:#77f1; white-space: nowrap }    .sel    { user-select: all; background-color:#77f1; white-space: nowrap }
Line 299: Line 299:
 i podaj różne wartości nagłówka //Host//: raz <html><span class="sel">www.mpu.pl</span></html>, i podaj różne wartości nagłówka //Host//: raz <html><span class="sel">www.mpu.pl</span></html>,
 raz  <html><span class="sel">pbo26.um.poznan.pl</span></html>. Porównaj odpowiedzi. raz  <html><span class="sel">pbo26.um.poznan.pl</span></html>. Porównaj odpowiedzi.
-<html><pre>+<html><pre class="code">
 openssl s_client -quiet -verify_quiet -crlf <b>150.254.186.176</b>:https << EOF \ openssl s_client -quiet -verify_quiet -crlf <b>150.254.186.176</b>:https << EOF \
        | awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -        | awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -
Line 306: Line 306:
  
 EOF</pre></html> EOF</pre></html>
-<html><pre>+<html><pre class="code">
 openssl s_client -quiet -verify_quiet -crlf <b>150.254.186.176</b>:https << EOF \ openssl s_client -quiet -verify_quiet -crlf <b>150.254.186.176</b>:https << EOF \
        | awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -        | awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -
Line 917: Line 917:
 w HTTP/2 spowodowane odpowiednio komendami: w HTTP/2 spowodowane odpowiednio komendami:
 <code> <code>
-curl -v --http2            nghttp2.org nghttp2.org/documentation/ nghttp2.org/blog/+curl -v --http2            nghttp2.org nghttp2.org/documentation/ nghttp2.org/blog/  | grep '<title>.*</title>'
 </code> </code>
 <code> <code>
-curl -v --http2 --parallel nghttp2.org nghttp2.org/documentation/ nghttp2.org/blog/+curl -v --http2 --parallel nghttp2.org nghttp2.org/documentation/ nghttp2.org/blog/  | grep '<title>.*</title>'
 </code> </code>
  
 === HTTP/3 ===  === HTTP/3 === 
 +//Uwaga:// w OpenSUSE 15.6 niektóre biblioteki (m. in. OpenSSL) są w starszej wersji niż ta potrzebna dla wsparcia  HTTP/3 w curl. Dlatego do HTTP/3, zamiast systemowego programu ''curl'', użyj wersję ze wskazanego kontenera:
 +<code>
 +sudo systemctl start docker
 +</code>
 +<code>
 +alias my_curl="sudo docker run --network=host --mount type=bind,src=/tmp,dst=/tmp -e SSLKEYLOGFILE=/tmp/sslkey.log --rm alpine/curl-http3 curl"
 +</code>
 +(Po wykonaniu powyższej komendy ''alias'' "lepszy" curl będzie dostępny w tej powłoce jako ''my_curl''.)
  
 ~~Zadanie.#.#~~ ~~Zadanie.#.#~~
Line 940: Line 948:
 Stwórz pusty plik o nazwie ''sslkey.log'' w katalogu ''/tmp'' np. komendą: Stwórz pusty plik o nazwie ''sslkey.log'' w katalogu ''/tmp'' np. komendą:
 <code> <code>
-touch /tmp/sslkey.log+touch /tmp/sslkey.log && chmod a+rw /tmp/sslkey.log
 </code> </code>
 Następnie w wiresharku wejdź, wybierając z menu //Edycja// pozycję //Preferencje//, Następnie w wiresharku wejdź, wybierając z menu //Edycja// pozycję //Preferencje//,
sk2/http.1767653819.txt.gz · Last modified: (external edit)