mirror of
https://github.com/carlospolop/PEASS-ng
synced 2024-11-24 01:26:22 +01:00
better privatekeyfiles
This commit is contained in:
parent
c7cff8040c
commit
82b8eed6ef
3
linPE.sh
3
linPE.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user