Ada Hakka's Blog

May the force be with you.

macOS一条命令查看当前wifi密码

别处看到,甚感方便,遂记于此

在终端复制以下命令执行

current_wifi=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | \
awk '/ SSID/ {print substr($0, index($0, $2))}'`  
security find-generic-password -a "$current_wifi" -g | tail -0

接着会弹出输入框,输入本机用户名和密码。

然后终端就会打印当前所连接 WIFI 的密码。

posted on 2020-12-29 09:12  Adahakka  阅读(509)  评论(0编辑  收藏  举报

导航