REM ######################################################################################################################### REM ################ This script was created by github.com/MarkCyber ############ REM ################ This is a follow-up script to the RansomwareSimulation ############ REM ################ This script is to revert all changes from the RansomwareSimulation script ############ REM ######################################################################################################################### DELAY 500 GUI r DELAY 100 STRING powershell -Command "Start-Process powershell -Verb runAs" ENTER DELAY 500 ALT y DELAY 500 REM Revert file renamings in specified locations, removing .locked from all files STRING $locations = @('MyDocuments', 'Desktop', 'Pictures', 'Music'); foreach ($loc in $locations) { $path = [Environment]::GetFolderPath($loc); Get-ChildItem -Path $path -File | Where-Object { $_.Extension -eq '.locked' } | Rename-Item -NewName {$_.Name.Replace('.locked', '')} } ENTER DELAY 1000 STRING exit ENTER