rem Script anti-virus VBSFile rem por Roger Venable rem modificando el script original de Matt Rising rem en la lista NTSecurity de Russ Cooper, http://ntsecurity.ntadvice.com/ rem öGracias chicos... mi jefe est” encantado con esto! rem rem Versićn en castellano por Selesta Seguridad, http://www.selseg.com rem rem On Error resume next dim wham,pow,zowie,b52,z28,oof,bif,kapow,wazzup set kapow=CreateObject("Wscript.Shell") set wham=CreateObject("Scripting.FileSystemObject") set oof=wham.GetSpecialFolder(1) b52="Este programa crea un archivo denominado " & oof & "\ask.vbs" & vbcrlf _ & "y modifica las entradas 'Abrir' del registro de forma que sea preciso" & vbcrlf _ & "confirmar expresamente la ejecucićn de cualquier programa VBS, JS, o WSH" & vbcrlf _ & "que se intente ejecutar a partir de ahora." & vbcrlf & vbcrlf _ & "õDesea hacer esto?" & vbcrlf z28 = MsgBox(b52, vbyesno + vbquestion) if z28 = vbyes then b52="on error resume next"&vbcrlf& _ "dim ynResponse,oArgs,oShell,strArg"&vbcrlf& _ "set oArgs = WScript.Arguments"&vbcrlf& _ "set oShell = CreateObject(~WScript.SHELL~)"&vbcrlf& _ "strArg = oArgs(0)"&vbcrlf& _ "ynResponse = MsgBox(~öAVISO!~ & vbCrLf & vbCrLf _"&vbcrlf& _ " & ~Est” a punto de ejecutar en su sistema el programa ~ & strArg _"&vbcrlf& _ " & vbCrLf & ~Este tipo de programas puede contener virus.~ _"&vbcrlf& _ " & vbCrLf & vbCrLf & ~õEST SEGURO QUE DESEA EJECUTARLO?~, _"&vbcrlf& _ " vbyesno + vbquestion)"&vbcrlf& _ "if ynResponse = vbYes then"&vbcrlf& _ " oShell.Run ~wscript.exe ~ & strArg"&vbcrlf& _ "end if"&vbcrlf z28=replace(b52,"~",chr(34)) call msgbox("Este es el programa 'ask.vbs':" & vbcrlf & vbcrlf & z28,vbokonly + vbinformation) set bif=wham.CreateTextFile(oof+"\ask.vbs") bif.close set bif=wham.OpenTextFile(oof+"\ask.vbs",2) bif.write z28 bif.close call msgbox("Se ha escrito el programa '"&oof&"\ask.vbs', modificando el registro...", vbokonly + vbinformation) b52=oof & "\WScript.exe " & oof & "\ask.vbs " & chr(34) & "%1" & chr(34) & " %*" rem UNDO: b52=oof & "\WScript.exe "&chr(34)&"%1"&chr(34)&" %*" rem ----- call WriteToReg("HKCR\.VBS\", "VBSFile") call WriteToReg("HKCR\VBSFile\Shell\Open\Command\", b52) call WriteToReg("HKLM\SOFTWARE\Classes\VBSFile\Shell\Open\Command\", b52) rem ----- call WriteToReg("HKCR\.JS\", "JSFile") call WriteToReg("HKCR\JSFile\Shell\Open\Command\", b52) call WriteToReg("HKLM\SOFTWARE\Classes\JSFile\Shell\Open\Command\", b52) rem ----- call WriteToReg("HKCR\.WSH\", "WSHFile") call WriteToReg("HKCR\WSHFile\Shell\Open\Command\", b52) call WriteToReg("HKLM\SOFTWARE\Classes\WSHFile\Shell\Open\Command\", b52) b52="Operacićn finalizada. Puede volver a ejecutar este programa para verificar que la instalacićn sea correcta." & vbcrlf _ & "(Si no aparece un aviso, significa que el programa no funciona.)" call msgbox(b52, vbexclamation + vbokonly) else call msgbox("No se ha realizado ninguna accićn.", vbexclamation + vbokonly) end if sub WriteToReg(regkey,regvalue) rem on error resume next kapow.RegWrite regkey,regvalue,"REG_SZ" end sub