使用Linux(CentOS5.6)

1. 先安裝好CentOS5.6

2. 下載c++編碼器
ans:yum install gcc-c++

3.下載 wireshark 圖形介面和 ngrep 文字介面
ans:yum install ngrep
錯誤訊息:缺少pcap文件,因此下載ibpcap
checking for a broken redhat glibc udphdr declaration... no
checking for a broken pcap headers... no
這兩行缺少了libpacp-devel
yum install libpcap-devel libpcap
./configure
make
make install

ans:yum install wireshark
yum install wireshark-gnome

4. 編輯socket→(client、server)
ans:gcc -o tcp_client tcp_client.c
gcc -o tcp_server tcp_server.c

5. 啟動client and server
ans:./client 10.21.11.138
./server

6. 使用圖形介面或文字介面觀看封包
ans:圖形介面啟動 wireshark
         文字介面啟動 ngrep →ngrep port 1100



Top