53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
|
|
1)
|
||
|
|
On utilise la commande ncat -u -l -v -p 50000
|
||
|
|
|
||
|
|
Ncat: Version 7.94 ( https://nmap.org/ncat )
|
||
|
|
Ncat: Listening on [::]:50000
|
||
|
|
Ncat: Listening on 0.0.0.0:50000
|
||
|
|
|
||
|
|
sur un autre terminal on utilise la commande ss -lnu
|
||
|
|
|
||
|
|
UNCONN 0 0 0.0.0.0:50000 0.0.0.0:*
|
||
|
|
|
||
|
|
|
||
|
|
2)
|
||
|
|
|
||
|
|
dd if=/dev/zero of=ft-file.dat bs=1K count=9
|
||
|
|
|
||
|
|
9+0 records in
|
||
|
|
9+0 records out
|
||
|
|
9216 bytes (9.2 kB, 9.0 KiB) copied, 0.0083619 s, 1.1 MB/s
|
||
|
|
|
||
|
|
|
||
|
|
ls -lh ft-file.dat
|
||
|
|
-rw-r--r-- 1 solar students23 9.0K Mar 12 14:52 ft-file.dat
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
II)
|
||
|
|
|
||
|
|
1)
|
||
|
|
which traceroute
|
||
|
|
which: no traceroute in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
|
||
|
|
|
||
|
|
which tracepath
|
||
|
|
/usr/bin/tracepath
|
||
|
|
|
||
|
|
cela signifie que tracepath existe et non traceroute
|
||
|
|
|
||
|
|
2)
|
||
|
|
tcpdump -vvv -i eno1 -f "host 172.16.3.198 and not tcp and not udp and not arp" -w tracepath-trace.txt
|
||
|
|
|
||
|
|
tracepath 8.8.8.8
|
||
|
|
|
||
|
|
tcpdump -r tracepath-trace.txt
|
||
|
|
|
||
|
|
3)
|
||
|
|
-n permet d'afficher les ip numériques
|
||
|
|
|
||
|
|
4)
|
||
|
|
tcpdump -r tracepath-trace.txt |sed '/UDP.*$/a \\'
|
||
|
|
|
||
|
|
a)
|
||
|
|
|