6357c08bf1
- Pinned download URL for KESL 12.1.0-1297 (public Kaspersky CDN, 2024-07). - answer.txt updated to v12 autoinstall format: GROUP_CLEAN required, LOCALE=en_US.utf8 (en_US alone is rejected), INTERCEPTOR_MODE. - start.sh detects v10 (/etc/init.d/kesl-supervisor) vs v12 (/etc/init.d/kesl) and polls kesl-control until the daemon answers, because v12's first start runs an integrity check (~30s). - Modes (shell/version/scan/debug) and scan output format unchanged so existing parsers keep working. - README + build script point to tabledevil/kaspersky12. - test_smoke.sh validates image + version + EICAR; auto-skips on macOS (Rosetta blocks the daemon). Validated end-to-end on amd64 Linux: - 46 known-malicious files (LS26 detections) all flagged again - DetectSource=Local with --network=none + USE_KSN=No, no KSN calls Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57 lines
1.4 KiB
Bash
57 lines
1.4 KiB
Bash
#!/bin/bash
|
||
# Mirror of docker_kaspersky/start.sh — same modes (shell|version|scan|debug).
|
||
# Output format kept similar to v10 so existing parsers work until renovated.
|
||
|
||
function start_service() {
|
||
echo -n "Starting Service... "
|
||
# v10 uses /etc/init.d/kesl-supervisor, v12 uses /etc/init.d/kesl.
|
||
if [ -x /etc/init.d/kesl ]; then
|
||
/etc/init.d/kesl start >/dev/null
|
||
elif [ -x /etc/init.d/kesl-supervisor ]; then
|
||
/etc/init.d/kesl-supervisor start >/dev/null
|
||
else
|
||
echo "Failed (no init script)"; return 1
|
||
fi
|
||
# Poll until kesl-control can talk to the daemon (integrity check + sig load
|
||
# can take 30–60s on first start of v12).
|
||
for _ in $(seq 1 60); do
|
||
if kesl-control -S --app-info >/dev/null 2>&1; then
|
||
echo "Done!"
|
||
return 0
|
||
fi
|
||
sleep 2
|
||
done
|
||
echo "Failed (daemon did not become ready)"
|
||
return 1
|
||
}
|
||
|
||
case "${1}" in
|
||
shell )
|
||
echo "stage: ${1}"
|
||
start_service
|
||
echo "Usage:"
|
||
cat /root/readme
|
||
/bin/bash
|
||
;;
|
||
version )
|
||
echo "stage: ${1}"
|
||
start_service
|
||
kesl-control -S --app-info | grep -v '^$'
|
||
cat /etc/issue
|
||
;;
|
||
scan )
|
||
echo "stage: ${1}"
|
||
start_service
|
||
echo "Starting Scan of /data:"
|
||
kesl-control --scan-file --action Skip /data
|
||
echo "Found Threats"
|
||
kesl-control -E --query 'EventType == "ThreatDetected"'
|
||
;;
|
||
debug )
|
||
echo "stage: ${1}"
|
||
echo "Usage:"
|
||
cat /root/readme
|
||
/bin/bash
|
||
;;
|
||
esac
|