Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Połączyć się z telnetem z serwerem www wskazanym przez prowadzącego
- a) Połączyć ze wszystkimi hostami wirtualnymi.
- GET /index.html HTTP/1.1
- host: student.pl
- HTTP/1.1 200 OK
- Date: Thu, 29 Oct 2015 07:16:31 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- Last-Modified: Thu, 29 Oct 2015 07:07:52 GMT
- ETag: "20000000000d4-31-52338f8301156"
- Accept-Ranges: bytes
- Content-Length: 49
- Content-Type: text/html
- Hej! Znajdujesz si▒ na stronie www.student.pl (4)
- GET /index.html HTTP/1.1
- host: wykladowca.pl
- HTTP/1.1 401 Authorization Required
- Date: Thu, 29 Oct 2015 07:19:57 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- WWW-Authenticate: Basic realm="Podajhas▒o"
- Content-Length: 401
- Connection: close
- Content-Type: text/html; charset=iso-8859-1
- <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
- <html><head>
- <title>401 Authorization Required</title>
- </head><body>
- <h1>Authorization Required</h1>
- <p>This server could not verify that you
- are authorized to access the document
- requested. Either you supplied the wrong
- credentials (e.g., bad password), or your
- browser doesn't understand how to supply
- the credentials required.</p>
- </body></html>
- b) Pobrać stronne index.html
- GET /index.html HTTP/1.1
- host: student.pl
- HTTP/1.1 200 OK
- Date: Thu, 29 Oct 2015 07:58:32 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- Last-Modified: Thu, 29 Oct 2015 07:07:52 GMT
- ETag: "20000000000d4-31-52338f8301156"
- Accept-Ranges: bytes
- Content-Length: 49
- Content-Type: text/html
- Hej! Znajdujesz si▒ na stronie www.student.pl
- c) Pobrać stronę, która nie istnieje na serwerze i odczytać kod błędu.
- GET /indem.html HTTP/1.1
- host: student.pl
- HTTP/1.1 404 Not Found
- Date: Thu, 29 Oct 2015 07:27:40 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- Last-Modified: Tue, 22 Nov 2011 09:08:00 GMT
- ETag: "20000000000d2-67-4b24f23d27c00"
- Accept-Ranges: bytes
- Content-Length: 103
- Content-Type: text/html
- Hej! Znajdujesz si▒ na stronie www.student.pl <br><br>
- <B>Niestety nast▒pi▒ b▒▒d <h1>404</h1></b>
- Kod błędu: 404 Not found
- d) Pobrać stronę zabezpieczoną na hasło.
- GET /index.html HTTP/1.1
- host: wykladowca.pl
- AUTHORIZATION: basic d3lrbGFkb3djYTp3eWtsYWRvd2Nh
- HTTP/1.1 200 OK
- Date: Thu, 29 Oct 2015 07:29:37 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- Last-Modified: Thu, 29 Oct 2015 07:08:11 GMT
- ETag: "20000000000db-34-52338f956c0ca"
- Accept-Ranges: bytes
- Content-Length: 52
- Content-Type: text/html
- Hej! Znajdujesz si▒ na stronie www.wykladowca.pl (4)
- Należało skonwertować ciąg znaków „wykladowca:wykladowca” zawierający login i hasło na kodowanie base64 otrzymując dane autoryzacyjne „d3lrbGFkb3djYTp3eWtsYWRvd2Nh”
- e) Pobrać tylko nagłówek odpowiedzi z serwera.
- HEAD /index.html HTTP/1.1
- host: student.pl
- HTTP/1.1 200 OK
- Date: Thu, 29 Oct 2015 07:31:18 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- Last-Modified: Thu, 29 Oct 2015 07:07:52 GMT
- ETag: "20000000000d4-31-52338f8301156"
- Accept-Ranges: bytes
- Content-Length: 49
- Content-Type: text/html
- f) Sprawdzenie ważności strony. Sprawdzić, jakie jest pole Last-Modified wprowadź zapytanie:
- GET / HTTP/1.0
- …
- If-Modified-Since: …
- …
- GET / HTTP/1.1
- host: student.pl
- If-Modified-Since: Mon, 01 Sep 2015 12:00:00 GMT
- HTTP/1.1 200 OK
- Date: Thu, 29 Oct 2015 07:34:10 GMT
- Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
- Last-Modified: Mon, 26 Oct 2015 12:33:15 GMT
- ETag: "20000000000d5-42-523012a57d994"
- Accept-Ranges: bytes
- Content-Length: 66
- Content-Type: text/html
- Hej! Znajdujesz si▒ na stronie www.student.pl plik start.html !
- Pole Last-Modified to: Mon, 26 Oct 2015 12:33:15 GMT
- 2. Połączyć się telnetem z serwerem pocztowym
- a) Rozesłać listy do wszystkich uczestników zajęć.
- 220 SMTP on InetServer (3.2.3) ready.
- helo student.pl
- 250 HELO
- mail from: <pai01@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai02@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai03@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai04@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai05@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai06@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai07@szssiz.tu.kielce.pl>
- 250 OK
- rcpt to: <pai08@szssiz.tu.kielce.pl>
- 250 OK
- data
- 354 Enter your data, end with <crlf>.<crlf>
- tu wojtek i kamil
- .
- 250 OK
- quit
- 221 Closing connection
- b) Wysłać list z polami nagłówka.
- 220 SMTP on InetServer (3.2.3) ready.
- helo student.pl
- 250 HELO
- mail from: <pai01@student.pl>
- 250 OK
- rcpt to: <pai02@student.pl>
- 250 OK
- data
- 354 Enter your data, end with <crlf>.<crlf>
- Subject: wiadomosc z polami naglowka
- tu kamil i wojtek
- :)
- .
- 250 OK
- quit
- 221 Closing connection
- c) Wysłać list do nieistniejącego użytkownika.
- 220 SMTP on InetServer (3.2.3) ready.
- helo student.pl
- 250 HELO
- mail from: <pai01@student.pl>
- 250 OK
- rcpt to: <asld@student.tu.kielce.pl>
- 250 OK
- data
- 354 Enter your data, end with <crlf>.<crlf>
- wiadomosc
- .
- 250 OK
- quit
- 221 Closing connection
- Serwer nie zwrócił żadnej informacji o błędzie
- d) Wysłać list od nieistniejącego użytkownika.
- 220 SMTP on InetServer (3.2.3) ready.
- helo student.pl
- 250 HELO
- mail from: <asd@assd.pl>
- 250 OK
- rcpt to: <pai01@student.pl>
- 250 OK
- data
- 354 Enter your data, end with <crlf>.<crlf>
- wiadomosc
- .
- 250 OK
- quit
- 221 Closing connection
- Serwer nie zwrócił żadnej informacji o błędzie
- e) Sprawdzić zawartość swojej skrzynki odbiorczej.
- +OK POP3 on InetServer (3.2.3) ready.
- user pai01
- +OK user accepted
- pass pai01
- +OK welcome
- stat
- +OK 1 163
- list
- +OK 1 163
- 1 163
- .
- retr 1
- +OK 163 octets
- bcc: pai03@student.pl
- bcc: pai04@student.pl
- bcc: pai05@student.pl
- bcc: pai06@student.pl
- bcc: pai07@student.pl
- bcc: pai08@student.pl
- Witojcie!
- .
- quit
- +OK closing connection
- f) Odczytać nagłówki listów.
- +OK POP3 on InetServer (3.2.3) ready.
- user pai01
- +OK user accepted
- pass pai01
- +OK welcome
- top 1
- +OK showing 10 lines
- bcc: pai03@student.pl
- bcc: pai04@student.pl
- bcc: pai05@student.pl
- bcc: pai06@student.pl
- bcc: pai07@student.pl
- bcc: pai08@student.pl
- Witojcie!
- .
- quit
- +OK closing connection
- g) Spróbować przeczytać nieistniejący list.
- +OK POP3 on InetServer (3.2.3) ready.
- user pai01
- +OK user accepted
- pass pai01
- +OK welcome
- stat
- +OK 1 163
- retr 2
- -ERR no data found
- quit
- +OK closing connection
- h) Usunąć listy
- +OK POP3 on InetServer (3.2.3) ready.
- user pai01
- +OK user accepted
- pass pai01
- +OK welcome
- stat
- +OK 1 163
- dele 1
- +OK Message deleted
- stat
- +OK 0 0
- quit
- +OK closing connection
- 3. Połączyć się protokołem FTP z serwrem ftp
- a) Przetestować działanie komend protokołu ftp.
- C:\Documents and Settings\student>ftp
- ftp> open 10.0.0.4 21
- Połączony z 10.0.0.4.
- 220-FileZilla Server version 0.9.24 beta
- 220-written by Tim Kosse (Tim.Kosse@gmx.de)
- 220 Please visit http://sourceforge.net/projects/filezilla/
- Użytkownik (10.0.0.4:(none)): pai01
- 331 Password required for pai01
- Hasło:
- 230 Logged on
- ftp> ls
- 200 Port command successful
- 150 Opening data channel for directory list.
- 226 Transfer OK
- ftp>help
- Polecenia mogą zostać skrócone. Polecenia:
- ! delete literal prompt send
- ? debug ls put status
- append dirmdeletepwd trace
- ascii disconnect mdir quit type
- bell get mget quote user
- binary glob mkdirrecv verbose
- bye hash mlsremotehelp
- cd help mput rename
- close lcd open rmdir
- ftp>mkdir test
- 257 "/test" created successfully
- ftp> cd test
- 250 CWD successful. "/test" is current directory.
- ftp> cd ../
- 250 CWD successful. "/" is current directory.
- ftp>rmdir test
- 250 Directory deleted successfully
- ftp> ls
- 200 Port command successful
- 150 Opening data channel for directory list.
- 226 Transfer OK
- ftp> status
- Połączony z 10.0.0.4.
- Typ: ascii; Pełna informacja: Wł. ; Sygnał dźwiękowy: Wył. ; Ostrzeżenie: Wł. ; Globbing: Wł.
- Debugowanie: Wył. ; Drukowanie znaku hash: Wył. .
- ftp> quit
- 221 Goodbye
- b) Przesłać plik na serwer. Pobrać plik z serwera. Ustawić odpowiedni tryb przesyłania danych
- C:\Documents and Settings\student>D:
- D:\>cd GR_15A\lab2\ftp
- D:\Gr_15A\lab2\ftp>ftp
- ftp> open 10.0.0.4 21
- Połączony z 10.0.0.4.
- 220-FileZilla Server version 0.9.24 beta
- 220-written by Tim Kosse (Tim.Kosse@gmx.de)
- 220 Please visit http://sourceforge.net/projects/filezilla/
- Użytkownik (10.0.0.4:(none)): pai01
- 331 Password required for pai01
- Hasło:
- 230 Logged on
- ftp> ls
- 200 Port command successful
- 150 Opening data channel for directory list.
- 226 Transfer OK
- ftp> send plik.txt pliknaserwerze.txt
- 200 Port command successful
- 150 Opening data channel for file transfer.
- 226 Transfer OK
- ftp: 64d bajtów wysłanych w 0,00Sekund 16000,00Kbajtów/sek.
- ftp> ls
- 200 Port command successful
- 150 Opening data channel for directory list.
- pliknaserwerze.txt
- 226 Transfer OK
- ftp: 64d bajtów odebranych w 0,00Sekund 20000,00Kbajtów/sek.
- ftp>recv pliknaserwerze.txt pliksciagniety.txt
- 200 Port command successful
- 150 Opening data channel for file transfer.
- 226 Transfer OK
- ftp: 64d bajtów odebranych w 0,00Sekund 16000,00Kbajtów/sek.
- ftp> quit
- 221 Goodbye
- Zawartość pliku “plik.txt” i pliku “pliksciagniety.txt” jest taka sama, co oznacza że udało się prawidłowo wgrać plik na serwer a następnie ten sam plik ściągnąć.
- 4. Połączyć się telnetem z serwerem ftp
- Należało stworzyć dwa łącza – łącze sterowania do wydawania komend i łącze danych do odbierania wyników wywołania komend.
- a) Pobrać listę plików
- Łączesterowania
- 220-FileZilla Server 0.9.53 beta
- 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
- 220 Please visit https://filezilla-project.org/
- user admin
- 331 Password required for admin
- pass admin
- 230 Logged on
- pasv
- 227 Entering Passive Mode (127,0,0,1,213,218)
- list
- 150 Opening data channel for directory listing of "/"
- 226 Successfully transferred "/"
- Łączedanych
- -rw-r--r-- 1 ftp ftp 6 Nov 11 22:35 plik.txt
- b) Utworzyć katalog TMP
- Łączesterowania
- user admin
- 331 Password required for admin
- pass admin
- 230 Logged on
- pasv
- 227 Entering Passive Mode (127,0,0,1,236,173)
- mkd TMP
- 257 "/TMP" created successfully
- list
- 150 Opening data channel for directory listing of "/"
- 226 Successfully transferred "/"
- Łączedanych
- -rw-r--r-- 1 ftp ftp 6 Nov 11 22:35 plik.txt
- drwxr-xr-x 1 ftp ftp 0 Nov 11 23:19 TMP
- c) Pobrać plik.
- Łączesterowania
- user admin
- 331 Password required for admin
- pass admin
- 230 Logged on
- pasv
- 227 Entering Passive Mode (127,0,0,1,226,107)
- retr plik.txt
- 150 Opening data channel for file download from server of "/plik.txt"
- 226 Successfully transferred "/plik.txt"
- Łączedanych
- asdasd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement