前言
在浏览关于火绒6.0版本更新的详细说明时,我意外发现,自己已使用颇有一段时间的火绒6.0版本,默认悄无声息地启用了加密流量拦截功能。这一设计初衷是为了更全面地为用户进行安全检查与防护,确保信息传输的安全性。
出于对个人隐私管理和网络自主权的考虑,我迅速手动关闭了这项自动开启的功能,心怀感激的同时也保持着审慎,对于火绒这份略显过度的热情保护,我特么先谢谢它。
随后,在进一步探究系统证书管理时,不期然发现火绒还有一种颇为“执着”的行为——类似顽皮小狗般自行安装证书。为了更好地掌控我的系统环境,我决定采取主动措施,编写了一个自启动脚本,旨在每次开机时自动清除这些未经明确同意便擅自加入的证书,以此维护系统的纯净与个性化设置的自主性。
删除脚本
# 指定要查找的颁发者名称中的字符
$issuerNameToDelete = "huorong"
# 定义所有要检查的证书存储区
$stores = @(
"Cert:\LocalMachine\Root",
"Cert:\LocalMachine\CA",
"Cert:\LocalMachine\My",
"Cert:\LocalMachine\TrustedPublisher",
"Cert:\LocalMachine\TrustedPeople",
"Cert:\CurrentUser\Root",
"Cert:\CurrentUser\CA",
"Cert:\CurrentUser\My",
"Cert:\CurrentUser\TrustedPublisher",
"Cert:\CurrentUser\TrustedPeople"
)
foreach ($storePath in $stores) {
Write-Host "Checking store: $storePath"
$certs = Get-ChildItem -Path $storePath
foreach ($cert in $certs) {
if ($cert.Issuer -like "*$issuerNameToDelete*") {
Write-Host "Deleting certificate: $($cert.Subject) from store: $storePath"
Remove-Item -Path "$storePath\$($cert.Thumbprint)" -Force
}
}
}
Write-Host "Completed certificate deletion."
定时任务执行
schtasks /create /tn "DeleteHuorongCertificates" /tr "powershell.exe -WindowStyle Hidden -ExecutionPolicy Bypass -File \"%文件目录%\"" /sc onstart /delay 0000:50 /rl highest /f
解压即可使用的脚本文件
请解压到C盘根目录下,用管理员权限执行create_startup_delay_task.bat文件即可。
真好呢