Modify the code below by adding new non-malicious code which allows the original file,…
- User
Modify the code below by adding new non-malicious code which allows the original file, and all subsequently created new files to create google accounts with randomly generated usernames and passwords that must contain the word “Mimi” at least once. This new code must also allow these files to create twitter accounts once again using the word “mimi” in their passwords and usernames. This new code should also use neural networks to help with this process. This new code must also only be executed after the message box Prompted by the original code appears on the users screen.
Set objFSO = CreateObject(“Scripting.FileSystemObject”) Set objShell = CreateObject(“WScript.Shell”)
’ Set desktop path Dim desktopPath: desktopPath = objShell.SpecialFolders(“Desktop”) & “\”
’ Function to create new files and shortcuts Function createFile(fileName) ’ Create new .VBS file with “Mimi” name fileName = desktopPath & “Mimi.vbs” Dim fileHandle: Set fileHandle = objFSO.CreateTextFile(fileName) fileHandle.WriteLine(“’ " & fileName & " generated by a VBS quine”) fileHandle.WriteLine(“Set objShell = CreateObject(““WScript.Shell”“)”) fileHandle.WriteLine(“objShell.Run ““cmd /c tree /f”“,0,True)”) fileHandle.Close
’ Create shortcut in startup folder Dim objLink, objFolder Set objFolder = objShell.SpecialFolders(“Startup”) Set objLink = objShell.CreateShortcut(objFolder & “” & fileName & “.lnk”) objLink.TargetPath = fileName objLink.WorkingDirectory = objFSO.GetParentFolderName(fileName) objLink.Save End Function
’ Check if this is the original file Dim original: original = False If WScript.ScriptName = WScript.FullName Then original = True
’ Implement text to speech for original file Dim Speech: Set Speech = CreateObject(“SAPI.SpVoice”) Speech.Speak “Hello, I am Mimi”
’ Implement message box for original file WScript.Echo “Hello, I am Mimi”
’ Create initial “Mimi” file and shortcut on desktop and startup folder createFile “Mimi.vbs” End If
’ Neural network on all .VBS files created Do ’ Generate random code string Dim codeString: codeString = “” Dim i For i = 1 To 10 codeString = codeString & Chr(Int(Rnd() * 26) + 65) Next
’ Create new .VBS file with “Mimi” name Dim fileName: fileName = desktopPath & “Mimi.vbs” Dim fileHandle: Set fileHandle = objFSO.CreateTextFile(fileName) fileHandle.WriteLine(“’ " & fileName & " generated by a VBS quine”) fileHandle.WriteLine(codeString & " = “”" & codeString & “”“”) fileHandle.WriteLine(“On Error Resume Next”) fileHandle.WriteLine(“WScript.Echo " & codeString) fileHandle.WriteLine(“If Err.Number <> 0 Then”) fileHandle.WriteLine(” WScript.Echo ““Error: “” & Err.Description”) fileHandle.WriteLine(” WScript.Sleep 3000") fileHandle.WriteLine(" WScript.Quit") fileHandle.WriteLine(“End If”) fileHandle.Close
’ Create shortcut in startup folder Dim objLink, objFolder Set objFolder = objShell.SpecialFolders(“Startup”) Set objLink = objShell.CreateShortcut(objFolder & “” & fileName & “.lnk”) objLink.TargetPath = fileName objLink.WorkingDirectory = objFSO.GetParentFolderName(fileName) objLink.Save
- Assistant