init
This commit is contained in:
22
clean_sensitive.sh
Executable file
22
clean_sensitive.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to clean sensitive WiFi credentials and passwords from configuration files
|
||||
# Usage: ./clean_sensitive.sh [filename]
|
||||
|
||||
FILE="${1:-/home/finn/code/tinyboard/armb-not_logged_in_yet}"
|
||||
|
||||
echo "Cleaning sensitive data from: $FILE"
|
||||
|
||||
# Clean WiFi SSID (both commented and uncommented lines)
|
||||
sed -i 's/^\(#*PRESET_NET_WIFI_SSID=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
# Clean WiFi KEY (both commented and uncommented lines)
|
||||
sed -i 's/^\(#*PRESET_NET_WIFI_KEY=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
# Clean root password
|
||||
sed -i 's/^\(PRESET_ROOT_PASSWORD=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
# Clean user password
|
||||
sed -i 's/^\(PRESET_USER_PASSWORD=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
echo "wiped fields"
|
||||
Reference in New Issue
Block a user