1
mirror of https://github.com/carlospolop/PEASS-ng synced 2024-11-24 01:26:22 +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
fi
#TODO: check if imposible symbols inside the file (quotes, parenthesis...)
privatekeyfiles=`grep -rl "PRIVATE KEY-----" /home /root 2>/dev/null`
privatekeyfiles=`grep -L "\"\|'\|(" $(grep -rl "PRIVATE KEY-----" /home /root 2>/dev/null)`
if [ "$privatekeyfiles" ]; then
echo "Private SSH keys found!:\n$privatekeyfiles" | sed "s,.*,${C}[1;31m&${C}[0m," >> $file
echo "" >> $file