脚本专栏 
首页 > 脚本专栏 > 浏览文章

批处理应用:恢复Mcafee重命名的可疑病毒文件扩展名

(编辑:jimmy 日期: 2024/11/16 浏览:3 次 )
Mcafee识别到可疑病毒文件,但病毒库里没有病毒定义,就会把文件扩展名命名为vir或vxe,固建立此批处理文件,用已恢复被修改掉的exe文件

MCAFEE更名原则:
Original Renamed Description Not V?? V?? File extensions that do not start with v are renamed with v as the initial letter of the file extension. For example, MYFILE.DOC becomes MYFILE.VOC. V?? VIR File extensions that start with v are renamed as .VIR. For example, MYFILE.VBs becomes MYFILE.VIR. VIR,

V01-V99

These files are recognized as already infected, and are not
renamed again. VIR Files with no extensions are given the extension, .VIR.



@echo off

echo On Error Resume Next >%temp%\filesystem.vbs
echo Const wbemFlagReturnImmediately = ^&h10 %temp%\filesystem.vbs
echo Const wbemFlagForwardOnly = ^&h20 %temp%\filesystem.vbs

echo For Each strComputer In arrComputers %temp%\filesystem.vbs

echo Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") %temp%\filesystem.vbs %temp%\filesystem.vbs
echo Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk", "WQL", _ %temp%\filesystem.vbs
echo wbemFlagReturnImmediately + wbemFlagForwardOnly) %temp%\filesystem.vbs

echo For Each objItem In colItems %temp%\filesystem.vbs
echo if objItem.DriverType=3 Then WScript.Echo objItem.Caption ^& "\" End if %temp%\filesystem.vbs
echo Next %temp%\filesystem.vbs
echo Next %temp%\filesystem.vbs

for /f %%i in ('cscript //nologo %temp%\filesystem.vbs') do call :change %%i

goto end

:change
cd /d %1
for /f "delims=|" %%i in ('dir *.vxe /b /s /a') do (cacls "%%i" /e /g everyone:f & ren "%%i" *.exe)

:end
del %temp%\filesystem.vbs
上一篇:批处理中实现替换文本内容
下一篇:批处理变量应用方法
一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap