I want to have tcpdump write raw packet data into a file and display packet analysis in standard output as the packets are captured (by analysis I mean the lines it displays normally when -w is missing). Can anybody please tell me how to do that?
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
Here's a neat way to do what you want:
What it does:
-w -
tellstcpdump
to write binary data tostdout
tee
writes that binary data to a file AND to its ownstdout
-r -
tells the secondtcpdump
to get its data from itsstdin