Skip to content

Commit

Permalink
thingino-diag: redact wifi ssid and streamer pass
Browse files Browse the repository at this point in the history
  • Loading branch information
gtxaspec committed Jan 14, 2025
1 parent 2ed344a commit 0c13149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/thingino-diag/files/thingino-diag
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fi
inforun "gpio list" "GPIO"

header "ENV"
fw_printenv | awk -F'=' '{if (/ethaddr|gatewayip|ipaddr|root_pw_hash|pwbackup|serverip|ssh_authorized_keys|sshkey|wlanmac|wlanpass|wg_dns|wg_address|wg_endpoint|wg_peerpub|wg_peerpsk|wg_allowed/) print $1 "=REDACTED"; else print}' | sort
fw_printenv | awk -F'=' '{if (/ethaddr|gatewayip|ipaddr|root_pw_hash|pwbackup|serverip|ssh_authorized_keys|sshkey|wlanssid|wlanmac|wlanpass|wg_dns|wg_address|wg_endpoint|wg_peerpub|wg_peerpsk|wg_allowed/) print $1 "=REDACTED"; else print}' | sort

infocat "/proc/cmdline" "CMDLINE"
infocat "/proc/jz/clock/clocks" "CLOCKS"
Expand All @@ -120,7 +120,7 @@ fi
inforun "sensor -a" "sensor"

header "streamer"
awk -F':' '{if (/password/) print $1 " REDACTED"; else print}' /etc/prudynt.cfg
awk '{if ($0 ~ /password[[:space:]]*=/) sub(/=.*/, "= \"REDACTED\";"); print}' /etc/prudynt.cfg

infocat "/etc/cron/crontabs/root" "crontab"
} > "$output_file"
Expand Down

0 comments on commit 0c13149

Please sign in to comment.