<html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'><html><link rel='icon' href='https://e.top4top.io/p_26973oc9i1.png' sizes='20x20' type='image/png'>#!/bin/bash

# Katalog do przeskanowania
TARGET_DIR="./wp-content/plugins"

# Pliki wynikowe
TEXT_REPORT="malware_scan_report.txt"
HTML_REPORT="malware_scan_report.html"

# Lista podejrzanych funkcji
SUSPICIOUS_FUNCTIONS=(
    "eval"
    "base64_decode"
    "gzinflate"
    "str_rot13"
    "exec"
    "shell_exec"
    "passthru"
    "system"
    "proc_open"
    "popen"
    "assert"
    "create_function"
    "preg_replace.*\/e"
    "wp_insert_user"
    "file_put_contents"
    "fopen"
    "curl_exec"
    "file_get_contents"
)

# Czyszczenie poprzednich wyników
> "$TEXT_REPORT"
> "$HTML_REPORT"

# Nagłówek HTML
echo "<!DOCTYPE html><html><head><meta charset='UTF-8'><title>Raport skanowania PHP</title></head><body><h1>Raport skanowania PHP</h1><pre>" >> "$HTML_REPORT"

echo "🔍 Skanowanie katalogu: $TARGET_DIR" | tee -a "$TEXT_REPORT"
echo "----------------------------------------" | tee -a "$TEXT_REPORT"

for FUNC in "${SUSPICIOUS_FUNCTIONS[@]}"; do
    echo -e "\n➡️  Szukam: $FUNC