📄 readme-windows.txt
字号:
wpa_supplicant for Windows==========================Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi> andcontributorsAll Rights Reserved.This program is dual-licensed under both the GPL version 2 and BSDlicense. Either license may be used at your option.This product includes software developed by the OpenSSL Projectfor use in the OpenSSL Toolkit (http://www.openssl.org/)wpa_supplicant has support for being used as a WPA/WPA2/IEEE 802.1XSupplicant on Windows. The current port requires that WinPcap(http://winpcap.polito.it/) is installed for accessing packets and thedriver interface. Both release versions 3.0 and 3.1 are supported.The current port is still somewhat experimental. It has been testedmainly on Windows XP (SP2) with limited set of NDIS drivers. Inaddition, the current version has been reported to work with Windows2000.All security modes have been verified to work (at least completeauthentication and successfully ping a wired host):- plaintext- static WEP / open system authentication- static WEP / shared key authentication- IEEE 802.1X with dynamic WEP keys- WPA-PSK, TKIP, CCMP, TKIP+CCMP- WPA-EAP, TKIP, CCMP, TKIP+CCMP- WPA2-PSK, TKIP, CCMP, TKIP+CCMP- WPA2-EAP, TKIP, CCMP, TKIP+CCMPBinary version--------------Compiled binary version of the wpa_supplicant and additional tools isavailable from http://hostap.epitest.fi/wpa_supplicant/. Thesebinaries can be used after installing WinPcap.Building wpa_supplicant with mingw----------------------------------The default build setup for wpa_supplicant is to use MinGW andcross-compiling from Linux to MinGW/Windows. It should also bepossible to build this under Windows using the MinGW tools, but thatis not tested nor supported and is likely to require some changes tothe Makefile unless cygwin is used.Building wpa_supplicant with MSVC---------------------------------wpa_supplicant can be built with Microsoft Visual C++ compiler. Thishas been tested with Microsoft Visual C++ Toolkit 2003 and VisualStudio 2005 using the included nmake.mak as a Makefile for nmake. IDEcan also be used by creating a project that includes the files anddefines mentioned in nmake.mak. Example VS2005 solution and projectfiles are included in vs2005 subdirectory. This can be used as astarting point for building the programs with VS2005 IDE.WinPcap development package is needed for the build and this can bedownloaded from http://www.winpcap.org/install/bin/WpdPack_3_1.zip. Thedefault nmake.mak expects this to be unpacked into C:\dev\WpdPack sothat Include and Lib directories are in this directory. The files can bestored elsewhere as long as the WINPCAPDIR in nmake.mak is updated tomatch with the selected directory. In case a project file in the IDE isused, these Include and Lib directories need to be added to projectproperties as additional include/library directories.OpenSSL source package can be downloaded fromhttp://www.openssl.org/source/openssl-0.9.8b.tar.gz and built andinstalled following instructions in INSTALL.W32. Note that if EAP-FASTsupport will be included in the wpa_supplicant, OpenSSL needs to bepatched to# support it openssl-tls-extensions.patch. The examplenmake.mak file expects OpenSSL to be installed into C:\dev\openssl, butthis directory can be modified by changing OPENSSLDIR variable innmake.mak.If you do not need EAP-FAST support, you may also be able to use Win32binary installation package of OpenSSL fromhttp://www.slproweb.com/products/Win32OpenSSL.html instead of buildingthe library yourself. In this case, you will need to copy Include andLib directories in suitable directory, e.g., C:\dev\openssl for thedefault nmake.mak. Copy {Win32OpenSSLRoot}\include intoC:\dev\openssl\include and make C:\dev\openssl\lib subdirectory withfiles from {Win32OpenSSLRoot}\VC (i.e., libeay*.lib and ssleay*.lib).This will end up using dynamically linked OpenSSL (i.e., .dll files areneeded) for it. Alternative, you can copy files from{Win32OpenSSLRoot}\VC\static to create a static build (no OpenSSL .dllfiles needed).Building wpa_supplicant for cygwin----------------------------------wpa_supplicant can be built for cygwin by installing the neededdevelopment packages for cygwin. This includes things like compiler,make, openssl development package, etc. In addition, developer's packfor WinPcap (WPdpack.zip) fromhttp://winpcap.polito.it/install/default.htm is needed..config file should enable only one driver interface,CONFIG_DRIVER_NDIS. In addition, include directories may need to beadded to match the system. An example configuration is available indefconfig. The library and include files for WinPcap will either needto be installed in compiler/linker default directories or theirlocation will need to be adding to .config when buildingwpa_supplicant.Othen than this, the build should be more or less identical to Linuxversion, i.e., just run make after having created .config file. Anadditional tool, win_if_list.exe, can be built by running "makewin_if_list".Building wpa_gui----------------wpa_gui uses Qt application framework from Trolltech. It can be builtwith the open source version of Qt4 and MinGW. Following commands canbe used to build the binary in the Qt 4 Command Prompt:# go to the root directory of wpa_supplicant source codecd wpa_gui-qt4qmake -o Makefile wpa_gui.promake# the wpa_gui.exe binary is created into 'release' subdirectoryUsing wpa_supplicant for Windows--------------------------------wpa_supplicant and wpa_cli behave more or less identically to Linuxversion, so instructions in README and example wpa_supplicant.confshould be applicable for most parts. In addition, there is anotherversion of wpa_supplicant, wpasvc.exe, which can be used as a Windowsservice and which reads its configuration from registry instead oftext file.When using access points in "hidden SSID" mode, ap_scan=2 mode need tobe used (see wpa_supplicant.conf for more information).Windows NDIS/WinPcap uses quite long interface names, so some carewill be needed when starting wpa_supplicant. Alternatively, theadapter description can be used as the interface name which may beeasier since it is usually in more human-readableformat. win_if_list.exe can be used to find out the proper interfacename.Example steps in starting up wpa_supplicant:# win_if_list.exeifname: \Device\NPF_GenericNdisWanAdapterdescription: Generic NdisWan adapterifname: \Device\NPF_{769E012B-FD17-4935-A5E3-8090C38E25D2}description: Atheros Wireless Network Adapter (Microsoft's Packet Scheduler)ifname: \Device\NPF_{732546E7-E26C-48E3-9871-7537B020A211}description: Intel 8255x-based Integrated Fast Ethernet (Microsoft's Packet Scheduler)Since the example configuration used Atheros WLAN card, the middle oneis the correct interface in this case. The interface name for -icommand line option is the full string following "ifname:" (the"\Device\NPF_" prefix can be removed). In other words, wpa_supplicantwould be started with the following command:# wpa_supplicant.exe -i'{769E012B-FD17-4935-A5E3-8090C38E25D2}' -c wpa_supplicant.conf -d-d optional enables some more debugging (use -dd for even more, ifneeded). It can be left out if debugging information is not needed.With the alternative mechanism for selecting the interface, thiscommand has identical results in this case:# wpa_supplicant.exe -iAtheros -c wpa_supplicant.conf -dSimple configuration example for WPA-PSK:#ap_scan=2ctrl_interface=network={ ssid="test" key_mgmt=WPA-PSK proto=WPA pairwise=TKIP psk="secret passphrase"}(remove '#' from the comment out ap_scan line to enable mode in whichwpa_supplicant tries to associate with the SSID without doingscanning; this allows APs with hidden SSIDs to be used)wpa_cli.exe and wpa_gui.exe can be used to interact with thewpa_supplicant.exe program in the same way as with Linux. Note thatctrl_interface is using UNIX domain sockets when built for cygwin, butthe native build for Windows uses named pipes and the contents of thectrl_interface configuration item is used to control access to theinterface. Anyway, this variable has to be included in the configurationto enable the control interface.Example SDDL string formats:(local admins group has permission, but nobody else):ctrl_interface=SDDL=D:(A;;GA;;;BA)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -