better colors

This commit is contained in:
nbillard 2022-12-15 18:57:53 +01:00
parent 6afb61b449
commit d22c938adc

107
tp.md
View file

@ -398,51 +398,88 @@ __Reprendre la Question 1 et capturer les trammes Ethernet avec `tcpdump`__
sudo tcpdump -xx port 5678
```
Trame TCP (numéro de protocole 6)
Trame TCP (numéro de protocole <span style="color:red">6</span>)
---
0x0000: 1866 da44 b21f 1866 da44 b5ac 0800 4500 \
0x0010: 0052 ffb4 4000 40<span style="color:red">06</span> 2483 0a01 0136 0a01 \
0x0020: 0137 82d5 162e 71c3 ecc9 8136 b67a 8018 \
0x0030: 003f 307c 0000 0101 080a f647 4eb2 2513 \
0x0040: 93ec 2020 2020 3161 6161 6161 6161 6161 \
0x0000: 1866 da44 b21f 1866 da44 b5ac 0800 4500
0x0010: 0052 ffb4 4000 40<span style="color:red">06</span> 2483 0a01 0136 0a01
0x0020: 0137 82d5 162e 71c3 ecc9 8136 b67a 8018
0x0030: 003f 307c 0000 0101 080a f647 4eb2 2513
0x0040: 93ec 2020 2020 3161 6161 6161 6161 6161
0x0050: 6161 6161 6161 6161 6161 6161 6161 6161
Trame UDP (numéro de protocole 17)
---
0x0000: 1866 da44 b21f 1866 da44 b5ac 0800 4500 \
0x0010: 003a 5137 4000 40<span style="color:red">11</span> d30d 0a01 0136 0a01 \
0x0020: 0137 9535 162e 0026 3b9e 2020 2020 3161 \
0x0030: 6161 6161 6161 6161 6161 6161 6161 6161 \
Trame UDP (numéro de protocole <span style="color:red">17</span>)
---
0x0000: 1866 da44 b21f 1866 da44 b5ac 0800 4500
0x0010: 003a 5137 4000 40<span style="color:red">11</span> d30d 0a01 0136 0a01
0x0020: 0137 9535 162e 0026 3b9e 2020 2020 3161
0x0030: 6161 6161 6161 6161 6161 6161 6161 6161
0x0040: 6161 6161 6161 6161
### Analyse des résultats
Adresse Ethernet de la source: 18:66:da:44:b5:ac \
Adresse IP de la source: 10.1.1.54 \
Port de la source: 33493
Adresse Ethernet de la source: <span style="color:blue">18:66:da:44:b5:ac</span>
Adresse IP de la source: <span style="color:green">10.1.1.54</span>
Port de la source: <span style="color:red">33493</span>
---
0x0000: 1866 da44 b21f <span style="color:blue">1866 da44 b5ac </span>0800 4500
0x0010: 0052 ffb4 4000 4006 2483 <span style="color:green">0a01 0136 </span>0a01
0x0020: 0137 <span style="color:red">82d5</span> 162e 71c3 ecc9 8136 b67a 8018
0x0030: 003f 307c 0000 0101 080a f647 4eb2 2513
0x0040: 93ec 2020 2020 3161 6161 6161 6161 6161
0x0000: 1866 da44 b21f <span style="color:red">1866 da44 b5ac </span>0800 4500 \
0x0010: 0052 ffb4 4000 4006 2483 <span style="color:red">0a01 0136 </span>0a01 \
0x0020: 0137 <span style="color:red">82d5</span> 162e 71c3 ecc9 8136 b67a 8018 \
0x0030: 003f 307c 0000 0101 080a f647 4eb2 2513 \
0x0040: 93ec 2020 2020 3161 6161 6161 6161 6161 \
0x0050: 6161 6161 6161 6161 6161 6161 6161 6161
Adresse Ethernet du puits: 18:66:da:44:b2:1f \
Adresse IP du puits: 10.1.1.55 \
Port du puits: 5678
---
Adresse Ethernet du puits: <span style="color:blue">18:66:da:44:b2:1f</span>
Adresse IP du puits: <span style="color:green">10.1.1.55</span>
Port du puits: <span style="color:red">5678</span>
---
0x0000: <span style="color:blue">1866 da44 b21f</span> 1866 da44 b5ac 0800 4500
0x0010: 0052 ffb4 4000 4006 2483 0a01 0136 <span style="color:green">0a01</span>
0x0020: <span style="color:green">0137</span> 82d5 <span style="color:red">162e</span> 71c3 ecc9 8136 b67a 8018
0x0030: 003f 307c 0000 0101 080a f647 4eb2 2513
0x0040: 93ec 2020 2020 3161 6161 6161 6161 6161
0x0000: <span style="color:red">1866 da44 b21f</span> 1866 da44 b5ac 0800 4500 \
0x0010: 0052 ffb4 4000 4006 2483 0a01 0136 <span style="color:red">0a01</span> \
0x0020: <span style="color:red">0137</span> 82d5 <span style="color:red">162e</span> 71c3 ecc9 8136 b67a 8018 \
0x0030: 003f 307c 0000 0101 080a f647 4eb2 2513 \
0x0040: 93ec 2020 2020 3161 6161 6161 6161 6161 \
0x0050: 6161 6161 6161 6161 6161 6161 6161 6161
tsock en mode source choisi un port au hasard probablement entre 1024 et 65535 (non spécifié dans le manuel)
## Question 5
@ -458,10 +495,16 @@ Le mode broadcast permet de transmettre des trames à toutes les machines sur le
sudo tcpdump -xx broadcast
```
Adresse de broadcast: ff:ff:ff:ff:ff:ff
Adresse de broadcast: <span style="color:red">ff:ff:ff:ff:ff:ff</span>
---
0x0000: <span style="color:red">ffff ffff ffff</span> f8a2 d66e dac3 0806 0001
0x0010: 0800 0604 0001 f8a2 d66e dac3 0a20 2965
0x0020: 0000 0000 0000 a9fe a9fe 0000 0000 0000
0x0000: <span style="color:red">ffff ffff ffff</span> f8a2 d66e dac3 0806 0001 \
0x0010: 0800 0604 0001 f8a2 d66e dac3 0a20 2965 \
0x0020: 0000 0000 0000 a9fe a9fe 0000 0000 0000 \
0x0030: 0000 0000 0000 0000