Exploit databaseDownload repository ZIP
GH-f2428733614e132e82caff9673930a21
nesirat/php2shell-guard
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files2
nesirat/php2shell-guardRevision abe2aeecfea1
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
tools/build-bundle.sh
Shell · 1,664 bytes#!/usr/bin/env bash
# build-bundle.sh — erzeugt eine einzelne, in sich geschlossene Datei
# (dist/php2shell-guard.sh) die per SSH/stdin auf beliebige Hosts kopiert werden kann.
set -euo pipefail
SELF_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT_DIR=$(cd "$SELF_DIR/.." && pwd)
OUT="$ROOT_DIR/dist/php2shell-guard.sh"
VERSION=$(grep -E '^P2S_VERSION=' "$ROOT_DIR/bin/php2shell-guard" | head -1 | cut -d'"' -f2)
mkdir -p "$ROOT_DIR/dist"
emit_templates() {
printf 'p2s_embedded_templates() {\n'
printf '\tcase "$1" in\n'
local pair name file
for pair in apache:apache-php2shell-guard.conf fpm:php-fpm-pool-guard.conf ini:php-ini-guard.ini nginx:nginx-php2shell-guard.conf; do
name="${pair%%:*}"
file="${pair##*:}"
printf '\t%s) cat <<'"'"'P2S_TPL_EOF'"'"'\n' "$name"
cat "$ROOT_DIR/templates/$file"
printf 'P2S_TPL_EOF\n\t\t;;\n'
done
printf '\tesac\n}\n'
}
{
printf '#!/usr/bin/env bash\n'
printf '# php2shell-guard %s — single-file bundle (generated by tools/build-bundle.sh)\n' "$VERSION"
printf '# Nicht editieren. Quelle: %s\n' "$ROOT_DIR"
printf 'set -euo pipefail\n'
printf 'P2S_VERSION="%s"\n' "$VERSION"
printf 'SELF_DIR="."\n'
printf 'P2S_EMBEDDED_TEMPLATES=1\n'
printf '\n'
for f in common detect mitigate patch verify ioc report; do
printf '\n### lib/%s.sh\n' "$f"
cat "$ROOT_DIR/lib/$f.sh"
done
printf '\n### embedded templates\n'
emit_templates
printf '\n### bin/php2shell-guard\n'
sed -e '/^SELF_DIR=/d' \
-e '/^LIB_DIR=/d' \
-e '/^\. "\$LIB_DIR/d' \
"$ROOT_DIR/bin/php2shell-guard"
} >"$OUT"
chmod +x "$OUT"
printf 'Bundle erzeugt: %s (%s Bytes)\n' "$OUT" "$(wc -c <"$OUT" | tr -d ' ')"