Advertisement
Guest User

Untitled

a guest
Nov 6th, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.17 KB | None | 0 0
  1. 1. Połączyć się z telnetem z serwerem www wskazanym przez prowadzącego
  2. a) Połączyć ze wszystkimi hostami wirtualnymi.
  3. GET /index.html HTTP/1.1
  4. host: student.pl
  5.  
  6. HTTP/1.1 200 OK
  7. Date: Thu, 29 Oct 2015 07:16:31 GMT
  8. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  9. Last-Modified: Thu, 29 Oct 2015 07:07:52 GMT
  10. ETag: "20000000000d4-31-52338f8301156"
  11. Accept-Ranges: bytes
  12. Content-Length: 49
  13. Content-Type: text/html
  14.  
  15. Hej! Znajdujesz si▒ na stronie www.student.pl (4)
  16.  
  17. GET /index.html HTTP/1.1
  18. host: wykladowca.pl
  19.  
  20. HTTP/1.1 401 Authorization Required
  21. Date: Thu, 29 Oct 2015 07:19:57 GMT
  22. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  23. WWW-Authenticate: Basic realm="Podajhas▒o"
  24. Content-Length: 401
  25. Connection: close
  26. Content-Type: text/html; charset=iso-8859-1
  27.  
  28. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  29. <html><head>
  30. <title>401 Authorization Required</title>
  31. </head><body>
  32. <h1>Authorization Required</h1>
  33. <p>This server could not verify that you
  34. are authorized to access the document
  35. requested. Either you supplied the wrong
  36. credentials (e.g., bad password), or your
  37. browser doesn't understand how to supply
  38. the credentials required.</p>
  39. </body></html>
  40.  
  41.  
  42. b) Pobrać stronne index.html
  43. GET /index.html HTTP/1.1
  44. host: student.pl
  45.  
  46. HTTP/1.1 200 OK
  47. Date: Thu, 29 Oct 2015 07:58:32 GMT
  48. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  49. Last-Modified: Thu, 29 Oct 2015 07:07:52 GMT
  50. ETag: "20000000000d4-31-52338f8301156"
  51. Accept-Ranges: bytes
  52. Content-Length: 49
  53. Content-Type: text/html
  54.  
  55. Hej! Znajdujesz si▒ na stronie www.student.pl
  56.  
  57. c) Pobrać stronę, która nie istnieje na serwerze i odczytać kod błędu.
  58. GET /indem.html HTTP/1.1
  59. host: student.pl
  60.  
  61. HTTP/1.1 404 Not Found
  62. Date: Thu, 29 Oct 2015 07:27:40 GMT
  63. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  64. Last-Modified: Tue, 22 Nov 2011 09:08:00 GMT
  65. ETag: "20000000000d2-67-4b24f23d27c00"
  66. Accept-Ranges: bytes
  67. Content-Length: 103
  68. Content-Type: text/html
  69.  
  70. Hej! Znajdujesz si▒ na stronie www.student.pl <br><br>
  71.  
  72. <B>Niestety nast▒pi▒ b▒▒d <h1>404</h1></b>
  73.  
  74. Kod błędu: 404 Not found
  75.  
  76.  
  77. d) Pobrać stronę zabezpieczoną na hasło.
  78. GET /index.html HTTP/1.1
  79. host: wykladowca.pl
  80. AUTHORIZATION: basic d3lrbGFkb3djYTp3eWtsYWRvd2Nh
  81.  
  82. HTTP/1.1 200 OK
  83. Date: Thu, 29 Oct 2015 07:29:37 GMT
  84. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  85. Last-Modified: Thu, 29 Oct 2015 07:08:11 GMT
  86. ETag: "20000000000db-34-52338f956c0ca"
  87. Accept-Ranges: bytes
  88. Content-Length: 52
  89. Content-Type: text/html
  90.  
  91. Hej! Znajdujesz si▒ na stronie www.wykladowca.pl (4)
  92.  
  93. Należało skonwertować ciąg znaków „wykladowca:wykladowca” zawierający login i hasło na kodowanie base64 otrzymując dane autoryzacyjne „d3lrbGFkb3djYTp3eWtsYWRvd2Nh”
  94.  
  95.  
  96. e) Pobrać tylko nagłówek odpowiedzi z serwera.
  97. HEAD /index.html HTTP/1.1
  98. host: student.pl
  99.  
  100. HTTP/1.1 200 OK
  101. Date: Thu, 29 Oct 2015 07:31:18 GMT
  102. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  103. Last-Modified: Thu, 29 Oct 2015 07:07:52 GMT
  104. ETag: "20000000000d4-31-52338f8301156"
  105. Accept-Ranges: bytes
  106. Content-Length: 49
  107. Content-Type: text/html
  108.  
  109. f) Sprawdzenie ważności strony. Sprawdzić, jakie jest pole Last-Modified wprowadź zapytanie:
  110. GET / HTTP/1.0
  111. If-Modified-Since: …
  112. GET / HTTP/1.1
  113. host: student.pl
  114. If-Modified-Since: Mon, 01 Sep 2015 12:00:00 GMT
  115.  
  116. HTTP/1.1 200 OK
  117. Date: Thu, 29 Oct 2015 07:34:10 GMT
  118. Server: Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g
  119. Last-Modified: Mon, 26 Oct 2015 12:33:15 GMT
  120. ETag: "20000000000d5-42-523012a57d994"
  121. Accept-Ranges: bytes
  122. Content-Length: 66
  123. Content-Type: text/html
  124.  
  125. Hej! Znajdujesz si▒ na stronie www.student.pl plik start.html !
  126.  
  127. Pole Last-Modified to: Mon, 26 Oct 2015 12:33:15 GMT
  128.  
  129. 2. Połączyć się telnetem z serwerem pocztowym
  130. a) Rozesłać listy do wszystkich uczestników zajęć.
  131. 220 SMTP on InetServer (3.2.3) ready.
  132. helo student.pl
  133. 250 HELO
  134. mail from: <pai01@szssiz.tu.kielce.pl>
  135. 250 OK
  136. rcpt to: <pai02@szssiz.tu.kielce.pl>
  137. 250 OK
  138. rcpt to: <pai03@szssiz.tu.kielce.pl>
  139. 250 OK
  140. rcpt to: <pai04@szssiz.tu.kielce.pl>
  141. 250 OK
  142. rcpt to: <pai05@szssiz.tu.kielce.pl>
  143. 250 OK
  144. rcpt to: <pai06@szssiz.tu.kielce.pl>
  145. 250 OK
  146. rcpt to: <pai07@szssiz.tu.kielce.pl>
  147. 250 OK
  148. rcpt to: <pai08@szssiz.tu.kielce.pl>
  149. 250 OK
  150. data
  151. 354 Enter your data, end with <crlf>.<crlf>
  152. tu wojtek i kamil
  153. .
  154. 250 OK
  155. quit
  156. 221 Closing connection
  157.  
  158. b) Wysłać list z polami nagłówka.
  159. 220 SMTP on InetServer (3.2.3) ready.
  160. helo student.pl
  161. 250 HELO
  162. mail from: <pai01@student.pl>
  163. 250 OK
  164. rcpt to: <pai02@student.pl>
  165. 250 OK
  166. data
  167. 354 Enter your data, end with <crlf>.<crlf>
  168. Subject: wiadomosc z polami naglowka
  169.  
  170. tu kamil i wojtek
  171. :)
  172. .
  173. 250 OK
  174. quit
  175. 221 Closing connection
  176.  
  177. c) Wysłać list do nieistniejącego użytkownika.
  178. 220 SMTP on InetServer (3.2.3) ready.
  179. helo student.pl
  180. 250 HELO
  181. mail from: <pai01@student.pl>
  182. 250 OK
  183. rcpt to: <asld@student.tu.kielce.pl>
  184. 250 OK
  185. data
  186. 354 Enter your data, end with <crlf>.<crlf>
  187. wiadomosc
  188. .
  189. 250 OK
  190. quit
  191. 221 Closing connection
  192.  
  193. Serwer nie zwrócił żadnej informacji o błędzie
  194.  
  195.  
  196. d) Wysłać list od nieistniejącego użytkownika.
  197. 220 SMTP on InetServer (3.2.3) ready.
  198. helo student.pl
  199. 250 HELO
  200. mail from: <asd@assd.pl>
  201. 250 OK
  202. rcpt to: <pai01@student.pl>
  203. 250 OK
  204. data
  205. 354 Enter your data, end with <crlf>.<crlf>
  206. wiadomosc
  207. .
  208. 250 OK
  209. quit
  210. 221 Closing connection
  211.  
  212. Serwer nie zwrócił żadnej informacji o błędzie
  213.  
  214.  
  215. e) Sprawdzić zawartość swojej skrzynki odbiorczej.
  216. +OK POP3 on InetServer (3.2.3) ready.
  217. user pai01
  218. +OK user accepted
  219. pass pai01
  220. +OK welcome
  221. stat
  222. +OK 1 163
  223. list
  224. +OK 1 163
  225. 1 163
  226. .
  227. retr 1
  228. +OK 163 octets
  229. bcc: pai03@student.pl
  230. bcc: pai04@student.pl
  231. bcc: pai05@student.pl
  232. bcc: pai06@student.pl
  233. bcc: pai07@student.pl
  234. bcc: pai08@student.pl
  235.  
  236. Witojcie!
  237. .
  238. quit
  239. +OK closing connection
  240.  
  241. f) Odczytać nagłówki listów.
  242. +OK POP3 on InetServer (3.2.3) ready.
  243. user pai01
  244. +OK user accepted
  245. pass pai01
  246. +OK welcome
  247. top 1
  248. +OK showing 10 lines
  249. bcc: pai03@student.pl
  250. bcc: pai04@student.pl
  251. bcc: pai05@student.pl
  252. bcc: pai06@student.pl
  253. bcc: pai07@student.pl
  254. bcc: pai08@student.pl
  255.  
  256. Witojcie!
  257. .
  258. quit
  259. +OK closing connection
  260.  
  261. g) Spróbować przeczytać nieistniejący list.
  262. +OK POP3 on InetServer (3.2.3) ready.
  263. user pai01
  264. +OK user accepted
  265. pass pai01
  266. +OK welcome
  267. stat
  268. +OK 1 163
  269. retr 2
  270. -ERR no data found
  271. quit
  272. +OK closing connection
  273.  
  274. h) Usunąć listy
  275. +OK POP3 on InetServer (3.2.3) ready.
  276. user pai01
  277. +OK user accepted
  278. pass pai01
  279. +OK welcome
  280. stat
  281. +OK 1 163
  282. dele 1
  283. +OK Message deleted
  284. stat
  285. +OK 0 0
  286. quit
  287. +OK closing connection
  288.  
  289. 3. Połączyć się protokołem FTP z serwrem ftp
  290. a) Przetestować działanie komend protokołu ftp.
  291. C:\Documents and Settings\student>ftp
  292. ftp> open 10.0.0.4 21
  293. Połączony z 10.0.0.4.
  294. 220-FileZilla Server version 0.9.24 beta
  295. 220-written by Tim Kosse (Tim.Kosse@gmx.de)
  296. 220 Please visit http://sourceforge.net/projects/filezilla/
  297. Użytkownik (10.0.0.4:(none)): pai01
  298. 331 Password required for pai01
  299. Hasło:
  300. 230 Logged on
  301. ftp> ls
  302. 200 Port command successful
  303. 150 Opening data channel for directory list.
  304. 226 Transfer OK
  305. ftp>help
  306. Polecenia mogą zostać skrócone. Polecenia:
  307.  
  308. ! delete literal prompt send
  309. ? debug ls put status
  310. append dirmdeletepwd trace
  311. ascii disconnect mdir quit type
  312. bell get mget quote user
  313. binary glob mkdirrecv verbose
  314. bye hash mlsremotehelp
  315. cd help mput rename
  316. close lcd open rmdir
  317. ftp>mkdir test
  318. 257 "/test" created successfully
  319. ftp> cd test
  320. 250 CWD successful. "/test" is current directory.
  321. ftp> cd ../
  322. 250 CWD successful. "/" is current directory.
  323. ftp>rmdir test
  324. 250 Directory deleted successfully
  325. ftp> ls
  326. 200 Port command successful
  327. 150 Opening data channel for directory list.
  328. 226 Transfer OK
  329. ftp> status
  330. Połączony z 10.0.0.4.
  331. Typ: ascii; Pełna informacja: Wł. ; Sygnał dźwiękowy: Wył. ; Ostrzeżenie: Wł. ; Globbing: Wł.
  332. Debugowanie: Wył. ; Drukowanie znaku hash: Wył. .
  333. ftp> quit
  334. 221 Goodbye
  335.  
  336. b) Przesłać plik na serwer. Pobrać plik z serwera. Ustawić odpowiedni tryb przesyłania danych
  337. C:\Documents and Settings\student>D:
  338.  
  339. D:\>cd GR_15A\lab2\ftp
  340.  
  341. D:\Gr_15A\lab2\ftp>ftp
  342. ftp> open 10.0.0.4 21
  343. Połączony z 10.0.0.4.
  344. 220-FileZilla Server version 0.9.24 beta
  345. 220-written by Tim Kosse (Tim.Kosse@gmx.de)
  346. 220 Please visit http://sourceforge.net/projects/filezilla/
  347. Użytkownik (10.0.0.4:(none)): pai01
  348. 331 Password required for pai01
  349. Hasło:
  350. 230 Logged on
  351. ftp> ls
  352. 200 Port command successful
  353. 150 Opening data channel for directory list.
  354. 226 Transfer OK
  355. ftp> send plik.txt pliknaserwerze.txt
  356. 200 Port command successful
  357. 150 Opening data channel for file transfer.
  358. 226 Transfer OK
  359. ftp: 64d bajtów wysłanych w 0,00Sekund 16000,00Kbajtów/sek.
  360. ftp> ls
  361. 200 Port command successful
  362. 150 Opening data channel for directory list.
  363. pliknaserwerze.txt
  364. 226 Transfer OK
  365. ftp: 64d bajtów odebranych w 0,00Sekund 20000,00Kbajtów/sek.
  366. ftp>recv pliknaserwerze.txt pliksciagniety.txt
  367. 200 Port command successful
  368. 150 Opening data channel for file transfer.
  369. 226 Transfer OK
  370. ftp: 64d bajtów odebranych w 0,00Sekund 16000,00Kbajtów/sek.
  371. ftp> quit
  372. 221 Goodbye
  373.  
  374. 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ąć.
  375.  
  376.  
  377. 4. Połączyć się telnetem z serwerem ftp
  378.  
  379. Należało stworzyć dwa łącza – łącze sterowania do wydawania komend i łącze danych do odbierania wyników wywołania komend.
  380.  
  381. a) Pobrać listę plików
  382. Łączesterowania
  383. 220-FileZilla Server 0.9.53 beta
  384. 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
  385. 220 Please visit https://filezilla-project.org/
  386. user admin
  387. 331 Password required for admin
  388. pass admin
  389. 230 Logged on
  390. pasv
  391. 227 Entering Passive Mode (127,0,0,1,213,218)
  392. list
  393. 150 Opening data channel for directory listing of "/"
  394. 226 Successfully transferred "/"
  395. Łączedanych
  396. -rw-r--r-- 1 ftp ftp 6 Nov 11 22:35 plik.txt
  397.  
  398. b) Utworzyć katalog TMP
  399. Łączesterowania
  400. user admin
  401. 331 Password required for admin
  402. pass admin
  403. 230 Logged on
  404. pasv
  405. 227 Entering Passive Mode (127,0,0,1,236,173)
  406. mkd TMP
  407. 257 "/TMP" created successfully
  408. list
  409. 150 Opening data channel for directory listing of "/"
  410. 226 Successfully transferred "/"
  411. Łączedanych
  412. -rw-r--r-- 1 ftp ftp 6 Nov 11 22:35 plik.txt
  413. drwxr-xr-x 1 ftp ftp 0 Nov 11 23:19 TMP
  414.  
  415. c) Pobrać plik.
  416. Łączesterowania
  417. user admin
  418. 331 Password required for admin
  419. pass admin
  420. 230 Logged on
  421. pasv
  422. 227 Entering Passive Mode (127,0,0,1,226,107)
  423. retr plik.txt
  424. 150 Opening data channel for file download from server of "/plik.txt"
  425. 226 Successfully transferred "/plik.txt"
  426. Łączedanych
  427. asdasd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement