我想在 ubuntu 18.04 上安装 Fluxion 5.9 及其依赖项,但是在使用包“mdk4”时遇到问题,并且安装在出现许多警告后中止make: *** [install] Error 127
。
apt-get install pkg-config libnl-3-dev libnl-genl-3-dev libpcap-dev
git clone https://github.com/aircrack-ng/mdk4
cd mdk4
make
sudo make install
安装失败并出现许多错误和警告:
channelhopper.c: In function ‘init_channel_hopper’:
channelhopper.c:592:19: warning: unused variable ‘i’ [-Wunused-variable]
int lpos = 0, i;
^
At top level:
channelhopper.c:240:14: warning: ‘dfs_state_name’ defined but not used [-Wunused-function]
static char *dfs_state_name(enum nl80211_dfs_state state)
^~~~~~~~~~~~~~
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v1 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -g -O3 -Wall -Wextra -c -o ghosting.o ghosting.c
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v1 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -g -O3 -Wall -Wextra -c -o fragmenting.o fragmenting.c
make -C attacks
make[2]: Entering directory '/mdk4/src/attacks'
cc -g -O3 -Wall -Wextra -c -o attacks.o attacks.c
attacks.c: In function ‘load_attacks’:
attacks.c:8:29: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
struct attacks *attacks = malloc(sizeof(struct attacks) * attack_count);
答案1
您需要在 make 和 make install 之前执行此操作
sudo apt-get install build-essential autoconf automake libtool pkg-config libnl-3-dev libnl-genl-3-dev libssl-dev ethtool shtool rfkill zlib1g-dev libpcap-dev libsqlite3-dev libpcre3-dev libhwloc-dev libcmocka-dev hostapd wpasupplicant tcpdump screen iw usbutils clang
然后
git clone https://github.com/aircrack-ng/mdk4
cd mdk4
sudo make
sudo make install
sudo 对于 make 部分不是必需的,只有 make install 部分才需要,但我对 make 使用 sudo 以确保不会发生错误,因为如果没有它某些编译就会失败。
我刚刚在我的 ubuntu 18.04 上执行了此操作,效果很好。Fluxion 在这些步骤之后检测到它已安装,并且使用已安装的 RTL8812AU DKMS 内核模块,RTL8812AU 芯片组一切运行顺利。