树莓派kali系统配置wifi网络自动连接

安装Kali系统的树莓派配置开机wifi自动连接

0x00生成wifi配置文件

[email protected]:~# wpa_passphrase "HUAWEI" "12345678"
network={
ssid="HUAWEI"
#psk="12345678"
psk=fcd71f4ae6313684afe9c5f10226db0e8895f2778f9a246ac8bd9cbca92945a1
}

配置文件写入到/etc/wpa_supplicant/wpa_supplicant.conf


0x01连接测试

1)连接wifi

nohup wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &

2)获取ip

dhclient wlan0

3)测试网络

ping 1.1.1.1


0x02启动网卡配置

/etc/network/interfaces
vim /etc/network/interfaces
只留如下内容:
auto lo
iface lo inet loopback

vim /etc/NetworkManager/NetworkManager.conf

/etc/NetworkManager/NetworkManager.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[connection]
#wifi配置文件
id=kalivi
uuid=d102dc2c-a799-4926-9e39-0489d72e4ddf
type=wifi
autoconnect-priority=3
#对应网卡
interface-name=wlan0
permissions=
[wifi]
#自己wlan网卡的MAC地址
mac-address=B8:27:EB:A8:12:F6
mac-address-blacklist=
mode=infrastructure
#wifi名称
ssid=HUAWEI
[wifi-security]
key-mgmt=wpa-psk
#密码
psk=12345678
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=ignore