Skip to content

Instantly share code, notes, and snippets.

@j2doll
Last active August 12, 2017 07:24
Show Gist options
  • Save j2doll/75ab64e7ac33915650f315c8389133e3 to your computer and use it in GitHub Desktop.
Save j2doll/75ab64e7ac33915650f315c8389133e3 to your computer and use it in GitHub Desktop.
Remotecap
@REM ----------------------------------------------------
@REM Rewmotecap.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
@REM http://j2doll.tistory.com
@REM ----------------------------------------------------
@REM install putty and wireshark on your windows pc.
@SET PLINK_PATH="C:\Program Files\PuTTY\plink.exe"
@SET WIRESHARK_PATH="C:\Program Files\Wireshark\Wireshark.exe"
@SET REMOTE_SERVER=192.168.0.10
@SET REMOTE_ACCOUNT=root
@SET REMOTE_PASSWORD=password1234
@SET REMOTE_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment