improved wpchecker while in vacation
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#! /usr/bin/env bash
|
||||
# Tool zum Schnellen prüfen mehrerer WordPress-Installationen
|
||||
# Maintainer: peignerpausz
|
||||
|
||||
declare -a WORDPRESS=()
|
||||
WORDPRESS="$(ls | grep wordpress)"
|
||||
printf "Beginne Prüfung der Adminnutzer\n\n"
|
||||
for wordpress in wordpress*/; do
|
||||
[[ -d "$wordpress" ]] || continue
|
||||
echo "Prüfe $wordpress"
|
||||
userlist=$(php ~/bin/wp-cli.phar user list --role=administrator --path="$wordpress" 2>/dev/null)
|
||||
if [[ -n "$userlist" ]]; then
|
||||
printf "%s\n\n" "$userlist"
|
||||
else
|
||||
printf "Fehler bei %s\n\n" "$wordpress"
|
||||
fi
|
||||
done
|
||||
for uneasy in $(find html/. -type f -name "wp-config.php" -exec dirname {} \;); do
|
||||
[[ -f "$uneasy" ]] || continue
|
||||
echo "Prüfe $uneasy"
|
||||
userlist2=$(php ~/bin/wp-cli.phar user list --role=administrator --path="$uneasy")
|
||||
echo $userlist2
|
||||
if [[ -n "$userlist2" ]]; then
|
||||
printf "%s\n\n" "$userlist2"
|
||||
else
|
||||
printf "Fehler bei %s\n\n" "$uneasy"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user