批處理應(yīng)用:恢復(fù)Mcafee重命名的可疑病毒文件擴(kuò)展名
更新時(shí)間:2007年04月23日 00:00:00 作者:
Mcafee識別到可疑病毒文件,但病毒庫里沒有病毒定義,就會(huì)把文件擴(kuò)展名命名為vir或vxe,固建立此批處理文件,用已恢復(fù)被修改掉的exe文件
MCAFEE更名原則:
@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
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. |
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
您可能感興趣的文章:
- 批處理ren重命名的方式
- C#使用OpenCv圖像批處理并改變圖片大小并且重命名
- Python批處理刪除和重命名文件夾的實(shí)例
- 重命名批處理python腳本
- 文件夾取其名稱前兩位重命名的批處理代碼
- 批處理重命名特殊文件名的代碼
- 全盤搜索指定文件并拷貝到指定位置[自動(dòng)重命名]的批處理
- 用批處理實(shí)現(xiàn)將文件以數(shù)字重命名的代碼
- 用批處理重命名文本文件名的代碼
- 重命名administrator賬號的批處理文件
- 批處理應(yīng)用:根據(jù)文件內(nèi)容進(jìn)行重命名操作
- 批處理應(yīng)用根據(jù)文件內(nèi)容進(jìn)行重命名操作
- 批處理重命名系列案例代碼
相關(guān)文章
批處理bat下載FTP服務(wù)器上某個(gè)目錄下的文件
這篇文章主要介紹了批處理bat下載FTP服務(wù)器上某個(gè)目錄下的文件的方法,需要的朋友可以參考下2014-07-07