Họ tên Trần Nguyễn Thái Bình
MSSV 23520161
Lớp IT005.P13

1. Wireshark

image.png

http://clearwonderouswholespell.neverssl.com/online/

2. Phân tích các bytes

47 45 54 -> GET

20 -> [SPACE]

2f 6f 6e 6c 69 6e 65 2f -> /online/

20 -> [SPACE]

48 54 54 50 2f 31 2e 31 0d 0a -> HTTP/1.1\\r\\n

48 6f 73 74 3a 20 63 6c 65 61 72 77 6f 6e 64 65 72 6f 75 73 77 68 6f 6c 65 73 70 65 6c 6c 2e 6e 65 76 65 72 73 73 6c 2e 63 6f 6d 0d 0a 
-> Host: clearwonderouswholespell.neverssl.com\\r\\n

43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 
-> Connection: keep-alive\\r\\n

50 72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 
-> Pragma: no-cache\\r\\n

43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 
-> Cache-Control: no-cache\\r\\n

55 70 67 72 61 64 65 2d 49 6e 73 65 63 75 72 65 2d 52 65 71 75 65 73 74 73 3a 20 31 0d 0a 
-> Upgrade-Insecure-Requests: 1\\r\\n

55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f 35 2e 30 20 28 57 69 6e 64 6f 77 73 20 4e 54 20 31 30 2e 30 3b 20 57 69 6e 36 34 3b 20 78 36 34 29 20 41 70 70 6c 65 57 65 62 4b 69 74 2f 35 33 37 2e 33 36 20 28 4b 48 54 4d 4c 2c 20 6c 69 6b 65 20 47 65 63 6b 6f 29 20 43 68 72 6f 6d 65 2f 31 32 38 2e 30 2e 30 2e 30 20 53 61 66 61 72 69 2f 35 33 37 2e 33 36 0d 0a 
-> User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36\\r\\n

41 63 63 65 70 74 3a 20 74 65 78 74 2f 68 74 6d 6c 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 68 74 6d 6c 2b 78 6d 6c 2c 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 6d 6c 3b 71 3d 30 2e 39 2c 69 6d 61 67 65 2f 61 76 69 66 2c 69 6d 61 67 65 2f 77 65 62 70 2c 69 6d 61 67 65 2f 61 70 6e 67 2c 2a 2f 2a 3b 71 3d 30 2e 38 0d 0a 
-> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8\\r\\n

53 65 63 2d 47 50 43 3a 20 31 0d 0a 
-> Sec-GPC: 1\\r\\n

41 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69 70 2c 20 64 65 66 6c 61 74 65 0d 0a 
-> Accept-Encoding: gzip, deflate\\r\\n

41 63 63 65 70 74 2d 4c 61 6e 67 75 61 67 65 3a 20 65 6e 2d 47 42 2c 65 6e 3b 71 3d 30 2e 39 2c 76 69 3b 71 3d 30 2e 38 0d 0a 
-> Accept-Language: en-GB,en;q=0.9,vi;q=0.8\\r\\n

0d 0a 
-> \\r\\n

3. Phân tích các request

3.1. HTTP

https://jsonplaceholder.typicode.com/

3.1.1. GET

$ curl -vvv --trace request_get.txt <http://jsonplaceholder.typicode.com/posts/1>
{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
  "body": "quia et suscipit\\nsuscipit recusandae consequuntur expedita et cum\\nreprehenderit molestiae ut ut quas totam\\nnostrum rerum est autem sunt rem eveniet architecto"
}

3.1.2. POST

$ curl -X POST --data "title=foo" --data "body=bar" --data "userId=1" --trace request_post.txt --header "application/json; charset=UTF-8" "<http://jsonplaceholder.typicode.com/posts>"
{
  "title": "foo",
  "body": "bar",
  "userId": "1",
  "id": 101
}

3.1.3. PUT