mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 13:37:19 +00:00
strip passwords from debug logs users can generate
This commit is contained in:
parent
a5fd7dc57f
commit
fb2ba96f5b
@ -13,7 +13,6 @@ else
|
|||||||
create_dir
|
create_dir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#cat * | grep 2C | sed 's/^.*\(RTSP_PASSWORD=\).*$/\1/' | sed 's/-U[^-P]*//'
|
|
||||||
echo "copy wz_mini logs"
|
echo "copy wz_mini logs"
|
||||||
cp /opt/wz_mini/log/* /opt/wz_mini/tmp/log_gather/
|
cp /opt/wz_mini/log/* /opt/wz_mini/tmp/log_gather/
|
||||||
|
|
||||||
@ -39,7 +38,7 @@ echo "gather libcallback logs"
|
|||||||
logread | grep "\[command\]" > /opt/wz_mini/tmp/log_gather/libcallback.log
|
logread | grep "\[command\]" > /opt/wz_mini/tmp/log_gather/libcallback.log
|
||||||
|
|
||||||
echo "gather process list"
|
echo "gather process list"
|
||||||
ps -T | sed 's/-U[^-P]*//' > /opt/wz_mini/tmp/log_gather/ps.log
|
ps -T > /opt/wz_mini/tmp/log_gather/ps.log
|
||||||
|
|
||||||
echo "gather mounts"
|
echo "gather mounts"
|
||||||
mount > /opt/wz_mini/tmp/log_gather/mount.log
|
mount > /opt/wz_mini/tmp/log_gather/mount.log
|
||||||
@ -62,6 +61,17 @@ if [ -f /tmp/sd_check_result.txt ]; then
|
|||||||
cp /tmp/sd_check_result.txt /opt/wz_mini/tmp/log_gather/sd_check_result.txt
|
cp /tmp/sd_check_result.txt /opt/wz_mini/tmp/log_gather/sd_check_result.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$RTSP_PASSWORD" == "" ]]; then
|
||||||
|
echo "password is blank in config"
|
||||||
|
RTSP_PASSWORD=$(cat /opt/wz_mini/tmp/wlan0_mac)
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd /opt/wz_mini/tmp/log_gather
|
||||||
|
echo $RTSP_PASSWORD
|
||||||
|
sed -e s/"$RTSP_PASSWORD"//g -i *
|
||||||
|
cd /
|
||||||
|
|
||||||
|
|
||||||
echo "compress to /media/mmc/log_gather_$(date +"%F_T%H%M").tar.gz"
|
echo "compress to /media/mmc/log_gather_$(date +"%F_T%H%M").tar.gz"
|
||||||
tar -czf /media/mmc/log_gather_$(date +"%F_T%H%M").tar.gz -C /opt/wz_mini/tmp log_gather/
|
tar -czf /media/mmc/log_gather_$(date +"%F_T%H%M").tar.gz -C /opt/wz_mini/tmp log_gather/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user