jina verze
This commit is contained in:
@@ -98,50 +98,19 @@ wgpwpp-cache.php
|
||||
installatron_hide_status_test.php
|
||||
"
|
||||
|
||||
run vhostsList error fileList "$olsVhostsPath" d || { printDanger "$error"; return 1; }
|
||||
run vhostsList error fileList "$vhostsPath" d || { printDanger "$error"; return 1; }
|
||||
while read -r dir; do
|
||||
local found=0 pluginList
|
||||
|
||||
# unknown
|
||||
run itemList error fileList "$olsVhostsPath/$dir/www/wp-content/mu-plugins/" f || continue
|
||||
local found=0
|
||||
run itemList error fileList "$vhostsPath/$dir/www/wp-content/mu-plugins/" f || continue
|
||||
while read -r item; do
|
||||
if grep -qF '($i){static $a=null' "$olsVhostsPath/$dir/www/wp-content/mu-plugins/$item"; then
|
||||
if grep -qF '($i){static $a=null' "$vhostsPath/$dir/www/wp-content/mu-plugins/$item"; then
|
||||
(( found++ )) || printSection "$dir"
|
||||
printDotText "$item" "${fontRed}malware$fontReset"
|
||||
elif ! listContains "$item" "$allowedFiles"; then
|
||||
(( found++ )) || printSection "$dir"
|
||||
printDotText "/wp-content/mu-plugins/$item" "$labelUnknown"
|
||||
printDotText "$item" "${fontYellow}warning$fontReset"
|
||||
fi
|
||||
done < <(awk 'NF' <<< "$itemList")
|
||||
|
||||
# wp2shell
|
||||
pluginList=$(find "$olsVhostsPath/$dir/www/wp-content/plugins" -maxdepth 1 -type d -name 'wp2shell*' 2>/dev/null)
|
||||
if [ -n "$pluginList" ]; then
|
||||
while IFS= read -r item; do
|
||||
(( found++ )) || printSection "$dir"
|
||||
printDotText "${item#"$olsVhostsPath/$dir/www"}" "${fontRed}malware$fontReset"
|
||||
done <<< "$pluginList"
|
||||
fi
|
||||
|
||||
# wp-static-cache
|
||||
pluginList=$(find "$olsVhostsPath/$dir/www/wp-content/plugins" -maxdepth 1 -type d -name 'wp-static-cache*' 2>/dev/null)
|
||||
if [ -n "$pluginList" ]; then
|
||||
while IFS= read -r item; do
|
||||
(( found++ )) || printSection "$dir"
|
||||
printDotText "${item#"$olsVhostsPath/$dir/www"}" "${fontRed}malware$fontReset"
|
||||
done <<< "$pluginList"
|
||||
fi
|
||||
|
||||
# other
|
||||
for subdir in wp-content/mu-plugins wp-content/plugins; do
|
||||
pluginList=$(find "$olsVhostsPath/$dir/www/$subdir" -maxdepth 1 -regextype posix-extended -regex '^.*[^0-9a-f][0-9a-f]{6,8}(\.php)?$' 2>/dev/null)
|
||||
if [ -n "$pluginList" ]; then
|
||||
while IFS= read -r item; do
|
||||
(( found++ )) || printSection "$dir"
|
||||
printDotText "${item#"$olsVhostsPath/$dir/www"}" "${fontYellow}warning$fontReset"
|
||||
done <<< "$pluginList"
|
||||
fi
|
||||
done
|
||||
done < <(awk 'NF' <<< "$vhostsList")
|
||||
}
|
||||
|
||||
@@ -153,7 +122,7 @@ function cmdMalwareFilesCheck() {
|
||||
|
||||
if [[ -z "$target" ]]; then
|
||||
printDanger "Target not specified";
|
||||
elif ! run vhostList error openlitespeedConfigVhostList; then
|
||||
elif ! run vhostList error openlitespeedVhostList; then
|
||||
printDanger "Cannot get vhost list: $error";
|
||||
elif [[ "$target" == "all" ]]; then
|
||||
local domain
|
||||
|
||||
Reference in New Issue
Block a user