asked 11 Jul '12, 23:23 bigkun edited 12 Jul '12, 06:36 |
One Answer:
I believe some libpcap functions, needed for remote capturing, are not available on Mac OS X. See here
Looks like pcap_createsrcstr() is not available on Mac OS X. Thus HAVE_PCAP_REMOTE is not set and that's the reason why that feature is not built into the Mac OS X binary. UPDATE: You can implement another "remote capturing" method, by using pipes and ssh on Mac OS X.
Search for "Remote Capture". Regards answered 12 Jul '12, 08:15 Kurt Knochner ♦ edited 12 Jul '12, 08:35 |
@Kurt I typed
(192.168.0.142 is my remote host)
it not work!
and tip that:
please run the following command and check if everything works fine:
output.cap is just a regular file, not a pipe!
After a 30 seconds stop the ssh command (CTRL-C) and then open that file with 'more'. If it contains error messages, that's the reason why it does not work. If it looks like binary data, try to open it in Wireshark.
Report back the results.
If the capture file containes pcap data, you can modify the command and use this instead of a file system based pipe.
UPDATE/SOLUTION: The problem is your dumpcap command. You need to specify the capture filter with -f (as done above), otherwise the last - (after -w) will terminate the CLI parameters in bash and dumpcap prints an error message.
dumpcap: Invalid argument: port
it works well, thanks!