Ho cercato di filtrare l'output tcpdump in base alle lunghezze dei pacchetti. Ma non ho avuto fortuna.Come filtrare l'output tcpdump in base alla lunghezza del pacchetto
Questo è l'output semplice per un comando;
tcpdump -n -i eth0 DST porta 443 -A
17:03:30.866890 IP 192.168.0.149.45104 > 62.75.148.60.443: Flags [S], seq 2685064927, win 14600, options [mss 1460,sackOK,TS val 7028787 ecr 0,nop,wscale 4], length 0
E..<[email protected]@.......>K.<.0...
........9............
[email protected]
17:03:30.867658 IP 192.168.0.149.45104 > 62.75.148.60.443: Flags [.], ack 2285019097, win 913, options [nop,nop,TS val 7028787 ecr 974439509], length 0
[email protected]@.......>K.<.0...
...2.............
[email protected]:..U
17:03:30.867928 IP 192.168.0.149.45104 > 62.75.148.60.443: Flags [P.], seq 0:171, ack 1, win 913, options [nop,nop,TS val 7028787 ecr 974439509], length 171
[email protected]@..f....>K.<.0...
...2.............
[email protected]:..U...........Opw2.....l..".T.7.q.]h..8W..%.....H...
.......9.8.......5... .....E.D.3.2...........A...../.........
...1.........alice.sni.velox.ch.
.................#..
17:03:30.869712 IP 192.168.0.149.45104 > 62.75.148.60.443: Flags [.], ack 1319, win 1078, options [nop,nop,TS val 7028788 ecr 974439511], length 0
[email protected]@.......>K.<.0...
...2.....6.......
[email protected]:..W
17:03:30.870724 IP 192.168.0.149.45104 > 62.75.148.60.443: Flags [P.], seq 171:178, ack 1319, win 1078, options [nop,nop,TS val 7028788 ecr 974439511], length 7
E..;[email protected]@.......>K.<.0...
...2.....6.......
[email protected]:..W......0
voglio vedere i pacchetti solo se hanno più di 100bytes lunghezza. per questo caso, solo il 3 ° pacchetto.
opzioni [nop, NOP, TS val 7.028.787 ecr 974.439.509], lunghezza 171
Ho guardato pagine man di tcpdump, ma non ho trovato alcun parametro utile. c'è un'espressione "maggiore lunghezza" menzionata qui; http://www.ethereal.com/docs/man-pages/tcpdump.8.html ma non potrei usare anche quell'espressione.
$ tcpdump -n -i eth0 dst port 443 -A -x greater 100
tcpdump: syntax error
Grazie per qualsiasi aiuto.