@REM ----------------------------------------------------@REM remotecap.cmd@REM Example command for captruing eremote network packet@REM using wireshark and tcpdump.@REM First written by j2doll. September 10th 2016.@REM https://github.com/j2doll/wireshark-remote-command-win@REM http://j2doll.tistory.com@REM ----------------------------------------------------@REM install putty and wireshark on your windows pc.@SETPLINK_PATH="C:\Program Files\PuTTY\plink.exe"@SETWIRESHARK_PATH="C:\Program Files\Wireshark\Wireshark.exe"@SETREMOTE_SERVER=192.168.0.10
@SETREMOTE_ACCOUNT=root
@SETREMOTE_PASSWORD=password1234
@SETREMOTE_INTERFACE=eth0
@REM execute command%PLINK_PATH% -ssh -pw %REMOTE_PASSWORD%%REMOTE_ACCOUNT%@%REMOTE_SERVER%"tcpdump -s0 -U -w - -i %REMOTE_INTERFACE% not port 22"|%WIRESHARK_PATH% -i - -k
You can fix variables for your environemnt.
Your Linux
REMOTE_SERVER : linux ip (such as 192.168.137.18)
REMOTE_ACCOUNT : linux account (Use root account. (or superuser))
REMOTE_PASSWORD : password of linux account
REMOTE_INTERFACE : linux ethernet interface (such as eth0, wlan0, etc)
If you don't know this, type command ifconfig or ip a on your linux.
Your Windows
WIRESHARK_PATH : This is where you installed wireshark execute file (wireshark.exe).
PLINK_PATH : This is where you installed putty plink execute file (plink.exe).
How to capture packet
Just run 'remotecap.cmd' on Windows. Windows may ask to you about firewall policy of Windows.