1
mirror of https://github.com/carlospolop/PEASS-ng synced 2024-11-27 14:13:38 +01:00

better privatekeyfiles

This commit is contained in:
carlospolop 2019-05-04 23:00:25 +02:00
parent c7cff8040c
commit 82b8eed6ef

View File

@ -336,8 +336,7 @@ if [ "$sshrootlogin" = "yes" ]; then
echo "" >> $file echo "" >> $file
fi fi
#TODO: check if imposible symbols inside the file (quotes, parenthesis...) privatekeyfiles=`grep -L "\"\|'\|(" $(grep -rl "PRIVATE KEY-----" /home /root 2>/dev/null)`
privatekeyfiles=`grep -rl "PRIVATE KEY-----" /home /root 2>/dev/null`
if [ "$privatekeyfiles" ]; then if [ "$privatekeyfiles" ]; then
echo "Private SSH keys found!:\n$privatekeyfiles" | sed "s,.*,${C}[1;31m&${C}[0m," >> $file echo "Private SSH keys found!:\n$privatekeyfiles" | sed "s,.*,${C}[1;31m&${C}[0m," >> $file
echo "" >> $file echo "" >> $file