系统:kail
硬件:TL-WN722N
1.更新源(为了安装某些库)
deb http://mirrors.163.com/debian/ squeeze main non-free contrib
deb http://mirrors.163.com/debian/ squeeze-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ squeeze main non-free contrib
deb-src http://mirrors.163.com/debian/ squeeze-proposed-updates main non-free contrib
2.安装hostapd
安装第三方库
$ apt-get update
Ubuntu/Debian/Kali Building
$ apt-get install libssl-dev libnl-dev
if you're using Kali 2.0 install:
$ apt-get install libssl-dev libnl-genl-3-dev
hostapd安装&&打补丁
$ git clone https://github.com/OpenSecurityResearch/hostapd-wpe
$ wget http://hostap.epitest.fi/releases/hostapd-2.2.tar.gz
$ tar -zxf hostapd-2.2.tar.gz
$ cd hostapd-2.2
$ patch -p1 < ../hostapd-wpe/hostapd-wpe.patch
$ cd hostapd
修改文件
$ vi defconfig
$ CONFIG_LIBNL32=y
编译
$ make
生成证书&&配置文件
$ cd ../../hostapd-wpe/certs
$ ./bootstrap
启动测试
$ cd ../../hostapd-2.2/hostapd
$ ./hostapd-wpe hostapd-wpe.conf
出现如下错误:
Configuration file: hostapd.conf
nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started
请执行:
sudo nmcli radio wifi off
sudo rfkill unblock wlan
网友评论