Skip to content

Instantly share code, notes, and snippets.

View zmarffy's full-sized avatar

Zeke Marffy zmarffy

  • USA
  • 04:08 (UTC -04:00)
  • Instagram zmarffy
View GitHub Profile
@zmarffy
zmarffy / passworddisplayer.sh
Last active May 23, 2020 17:59
Display SSIDs and their entered passwords on Ubuntu
#!/usr/bin/env bash
shopt -s nullglob
ssids=("/etc/NetworkManager/system-connections/*")
for ssid in ${ssids[@]}; do
ssid_name=${ssid##*/}
printf "\e[1m$ssid_name\e[0m : "
password=$(cat "$ssid" | grep "psk=" | cut -c 5-)
if [ -z "$password" ]; then
echo -e "\e[91mNo password\e[39m"