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 20:55] – 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 241: Line 241:
 Sprawdź jak zostanie zrozumiana nazwa zasobu Sprawdź jak zostanie zrozumiana nazwa zasobu
 <html><span class="sel"></html>%C5%BB%C3%B3%C5%82%C4%87<html></span></html> i <html><span class="sel"></html>%C5%BB%C3%B3%C5%82%C4%87<html></span></html> i
-<html><span class="sel"></html>d%C4%85%C4%87+w+r%C3%B3g<html></span></html>:+<html><span class="sel"></html>%5Bd%C4%85%C4%87%20w%20r%C3%B3g%5D<html></span></html>:
 <code> <code>
 openssl s_client -crlf -quiet -verify_quiet pl.wikipedia.org:https << EOF | grep -o '<title>.*</title>' openssl s_client -crlf -quiet -verify_quiet pl.wikipedia.org:https << EOF | grep -o '<title>.*</title>'
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.
-<code> +<html><pre class="code"> 
-openssl s_client -quiet -verify_quiet -crlf 150.254.186.176: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 -
 GET / HTTP/1.0 GET / HTTP/1.0
 Host: www.mpu.pl Host: www.mpu.pl
  
-EOF +EOF</pre></html> 
-</code> +<html><pre class="code"> 
-<code> +openssl s_client -quiet -verify_quiet -crlf <b>150.254.186.176</b>:https << EOF \
-openssl s_client -quiet -verify_quiet -crlf 150.254.186.176: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 -
 GET / HTTP/1.0 GET / HTTP/1.0
 Host: pbo26.um.poznan.pl Host: pbo26.um.poznan.pl
  
-EOF +EOF</pre></html>
-</code>+
 <html><div class="sk2_spacer"></div></html> <html><div class="sk2_spacer"></div></html>
  
Line 629: Line 627:
 )): )):
 <code> <code>
-openssl s_client -verify_quiet -quiet pomoc.put.poznan.pl:https << EOF | awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -+openssl s_client -verify_quiet -quiet pomoc.put.poznan.pl:https << EOF |\ 
 +    awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -
 GET /index.php?/Base/Search/Index HTTP/1.0 GET /index.php?/Base/Search/Index HTTP/1.0
 Host: pomoc.put.poznan.pl Host: pomoc.put.poznan.pl
Line 636: Line 635:
 </code> </code>
 <code> <code>
-openssl s_client -verify_quiet -quiet pomoc.put.poznan.pl:https << EOF | awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -+openssl s_client -verify_quiet -quiet pomoc.put.poznan.pl:https << EOF |\ 
 +    awk '{if(p)print;else print>"/dev/stderr"};/^\r$/{p=1}' | w3m -T text/html -dump -
 POST /index.php?/Base/Search/Index HTTP/1.0 POST /index.php?/Base/Search/Index HTTP/1.0
 Host: pomoc.put.poznan.pl Host: pomoc.put.poznan.pl
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.1767646547.txt.gz · Last modified: (external edit)