In the past two days, the instructor has arranged a task to allow Wireshark to add text message Protocol Resolution functions, I searched for some simple examples on the Internet to prepare for the first implementation and then transition to the text message protocol.
I have already written the document. It is not very convenient to post it all. Here I will only post the part of the environment, the complete implementation and other preparations for downloading are included in my download resources. If necessary, you can download them by yourself.
Install Wireshark compiling environment in Windows:
(For compilation steps, refer to the Developer's Guide 2.2 Step-by-Step Guide on Wireshark official website)
Http://www.wireshark.org/download.html
1. Install VS2010 (VS2010 is used here. There are many options for this part. For details, refer to 4.4.1)
2. Online InstallationCygwin(The default directory is not changed)
Note that the following required packages are selected. These packages are not installed by default during Cygwin installation:
· Archive/unzip
· Devel/bison
· Devel/flex
· Interpreters/perl
· Utils/patch
· Web/wget
Select method: Expand and click skip to change it to the version number.
3. InstallPython(The default directory is not changed)
Download the python-26.msi directly from the Internet, install it.
4. Obtain the source code
Download wireshark source code from www.wireshark.org. The latest stable version is 1.6.5.
After obtaining the source code, you must modify the config. nmake file of the source code to specify the corresponding tool and related information. The main modifications are as follows:
(1). Path settings
PROGRAM_FILES: the location where the Wireshark program will be installed in the future, which is generally the default value.
MSVC_VARIANT = MSVC2010 // specify the compiler type (mainly modify this)
(2). Tool settings
CYGWIN_PATH = d:/cygwin/bin // cygwin installation path (the default path does not need to be modified)
PYTHON = "d:/python25/python.exe" // set the python path (the default path does not need to be modified)
6. Set the command line Environment
Start-> Program-> VS2010-> Visual StudioTools-> Visual Studio 2010 command prompt (the following commands are all completed in the Command Prompt window)
7. Compile Wireshark
You can compile the above settings. The specific steps are as follows:
1. Verify that the tool is correctly installed
> Nmake-f Makefile. nmake verify_tools
If no Error is reported, run the following command and check again later.
The command will output information similar to the following:
Checking for required applications:
Cl:/cygdrive/c/Programme/Microsoft Visual Studio 8/VC/BIN/cl
Link:/cygdrive/c/Programme/MicrosoftVisual Studio 8/VC/BIN/link
Nmake:/cygdrive/c/Programme/Microsoft Visual Studio 8/VC/BIN/nmake
Bash:/usr/bin/bash
Bison:/usr/bin/bison
Flex:/usr/bin/flex
Env:/usr/bin/env
Grep:/usr/bin/grep
/Usr/bin/find:/usr/bin/find
Perl:/usr/bin/perl
Env:/usr/bin/env
C:/python24/python.exe:/cygdrive/c/python24/python.exe
Sed:/usr/bin/sed
Unzip:/usr/bin/unzip
Wget:/usr/bin/wget
2. Download the installation Library File
> Nmake-f Makefile. nmake setup
Using wget to download and install library files may take some time.
3. Distclean source file
> Nmake-f Makefile. nmake distclean
Wireshark source code contains some files prepared for UNIX compilation. You must be clear about your source files before the first compilation.
4. Compile Wireshark
> Nmake-f Makefile. nmake all
It takes some time to compile. After the compilation is successful, execute the wireshark-gtk2/wireshark.exe under the wireshark root directory to check whether the compilation is successful.
If the compilation fails, modify it according to the corresponding error prompt.