Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
robinsmidsrod / pcap_remote.cmd
Last active February 14, 2021 08:50
Capture packets via remote tcpdump using SSH and display in local Wireshark client (Windows batch file)
@echo off
rem Figure out path to plink.exe
set putty_dir_key="HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\PuTTY_is1"
for /f "tokens=3*" %%x in ('reg query %putty_dir_key% /v "InstallLocation"') do set putty_dir=%%x %%y
if not defined putty_dir (
echo Please install PuTTY using Windows installer from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
exit /b 1
)
set plink="%putty_dir%\plink.exe"