After the daily work of the code is running on the Linux server, recently encountered a lot of HTTPS connection problems, although the communication with the agency has the various details of HTTPS, but there will always be the problem of asymmetric information, so the HTTPS capture is the most effective way, the handshake process is there, more convenient to explain the problem. Usually work with the Win7 system, can only use the tool to grasp the package remotely, at the same time need to install a capture agent on the Linux server, RPCAPD is an optimal choice, can achieve Win7 use wireshark easy to grab the package, directly on the automation script:
#!/bin/BashInstall(){ Echo "-------------------Start Install-----------------------" Yum Installglibc-Staticwgethttp//Www.winpcap.org/install/bin/WpcapSrc_4_1_2.zip UnzipWpcapsrc_4_1_2.ZipCD WinPcap/wpcap/Libpcapchmod+x Configure Runlex.SHCFLAGS=-static./Configure MakeCD RPCAPD/ Make Echo "-------------------Install success-----------------------"}start () {Echo "Start RPCAPD"nohup./WINPCAP/WPCAP/LIBPCAP/RPCAPD/RPCAPD-4-n-p8888>/dev/NULL 2>&1&Echo "Start Finish" #-p Set the port to listen #-N DoNot need Authentication}stop () {Echo "... .. stopping ...." PS-ef |grep 'RPCAPD'|grep-Vgrep|awk '{print $}'|Xargs sudo Kill-9 Echo "... .. stopped ..."}usage () {Echo "****************************************************"Echo "* Wireshark win Client usage"Echo "****************************************************"Echo "install:bash wiresharkclient.sh Install"Echo "Start:bash wiresharkclient.sh Start"Echo "Stop:bash wiresharkclient.sh Stop"Echo "usage:bash wiresharkclient.sh Usage"}if["Install"== $1]; Then Installelif["Start"== $1]; ThenStartelif["Stop"== $1]; ThenStopElseusagefi
Win7 Remote packet capture script