Enhance README.md formatting for code blocks and add JSR package link for @kunkun/kunkun-ext-wifi-password

This commit is contained in:
Huakun Shen 2025-01-18 06:05:52 -05:00
parent cb4196e694
commit 09aaf3fdbd
No known key found for this signature in database

View File

@ -1,24 +1,26 @@
# Wifi Password Share
[JSR Package: `@kunkun/kunkun-ext-wifi-password`](https://jsr.io/@kunkun)
## Platforms
- MacOS
```bash
networksetup -listpreferredwirelessnetworks en0
security find-generic-password -D "AirPort network password" -a $SSID -w
```
```bash
networksetup -listpreferredwirelessnetworks en0
security find-generic-password -D "AirPort network password" -a $SSID -w
```
- Windows
```powershell
$_, $ssid = ((netsh wlan show interface | findstr "Profile" | findstr /v "mode") -split ":",2).trim();
$_, $pass = ((netsh wlan show profile name=$ssid key=clear | findstr Key) -split ":").trim();
```
```powershell
$_, $ssid = ((netsh wlan show interface | findstr "Profile" | findstr /v "mode") -split ":",2).trim();
$_, $pass = ((netsh wlan show profile name=$ssid key=clear | findstr Key) -split ":").trim();
```
- Linux
```bash
ssid=$(nmcli device wifi show-password | grep SSID | cut -d : -f 2 | xargs)
password=$(nmcli device wifi show-password | grep Password | cut -d : -f 2 | xargs)
```
```bash
ssid=$(nmcli device wifi show-password | grep SSID | cut -d : -f 2 | xargs)
password=$(nmcli device wifi show-password | grep Password | cut -d : -f 2 | xargs)
```
## Features
- Reveal Wifi Password from current machine
- Generate Connection QR Code, mobile devices can scan to connect directly