tech notes

Automatic Restoration of Quarantined McAfee Files

After reading about the most recent faux-pas from McAfee where couple of system files were identified as infected I found this script which restores the quarantined files:

Option Explicit
on error resume next
Dim fso, f, str, commando, df, fdf, r, ff, WshShell, fx, strfx, rr, arrParm
Set fso = CreateObject("Scripting.FileSystemObject")

if fso.FileExists("C:\quarantine\infected.log") Then
	Set f = fso.OpenTextFile("infected.log", 1)

	Set WshShell = Wscript.CreateObject("WScript.Shell")

	Do While Not f.AtEndOfStream
		str = f.ReadLine
		arrParm = split (str, "=>")
		wscript.echo arrParm(0)
		wscript.echo arrParm(1)
		fso.copyFile Trim(arrParm(1)),Trim(arrParm(0))
	Loop
end if
f.Close

(Taken from the aforementioned link)

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Archives