22 lines
816 B
Bash
22 lines
816 B
Bash
|
|
#!/usr/bin/env bash
|
|||
|
|
# skyworth_security_test.sh - 创维广播白名单校验测试
|
|||
|
|
# 用非白名单 sender 包名投递创维 VOD 广播,验证被 SkyworthVoiceAdapter 丢弃
|
|||
|
|
# 用法: skyworth_security_test.sh [fakeSenderPkg]
|
|||
|
|
# fakeSenderPkg 默认 com.attacker.malicious
|
|||
|
|
|
|||
|
|
set -e
|
|||
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|||
|
|
# shellcheck disable=SC1091
|
|||
|
|
source "${SCRIPT_DIR}/lib/common.sh"
|
|||
|
|
|
|||
|
|
require_adb
|
|||
|
|
check_skyworth_adapter_exists
|
|||
|
|
|
|||
|
|
FAKE_SENDER="${1:-com.attacker.malicious}"
|
|||
|
|
|
|||
|
|
print_header "创维广播安全校验(sender=${FAKE_SENDER})"
|
|||
|
|
send_skyworth_broadcast "越权点播片" "${FAKE_SENDER}"
|
|||
|
|
|
|||
|
|
log_ok "投递完成,预期 sender 不在白名单时被丢弃(logcat: dropped sender not in whitelist)"
|
|||
|
|
log_warn "验证方法:adb logcat -v threadtime VoiceCommand:V '*:S' 过滤 dropped 日志"
|