Skip to content

Commit b2c0324

Browse files
authored
Merge pull request #459 from gildasio/master
Set grep to show filename that contains passwords
2 parents f0686d4 + 8ea67f3 commit b2c0324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linPEAS/builder/linpeas_parts/9_interesting_files/27_Passwords_in_logs.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
if ! [ "$SEARCH_IN_FOLDER" ]; then
1717
print_2title "Searching passwords inside logs (limit 70)"
18-
(find /var/log/ /var/logs/ /private/var/log -type f -exec grep -R -i "pwd\|passw" "{}" \;) 2>/dev/null | sed '/^.\{150\}./d' | sort | uniq | grep -v "File does not exist:\|modules-config/config-set-passwords\|config-set-passwords already ran\|script not found or unable to stat:\|\"GET /.*\" 404" | head -n 70 | sed -${E} "s,pwd|passw,${SED_RED},"
18+
(find /var/log/ /var/logs/ /private/var/log -type f -exec grep -R -H -i "pwd\|passw" "{}" \;) 2>/dev/null | sed '/^.\{150\}./d' | sort | uniq | grep -v "File does not exist:\|modules-config/config-set-passwords\|config-set-passwords already ran\|script not found or unable to stat:\|\"GET /.*\" 404" | head -n 70 | sed -${E} "s,pwd|passw,${SED_RED},"
1919
echo ""
20-
fi
20+
fi

0 commit comments

Comments
 (0)