Skip to content

Instantly share code, notes, and snippets.

@Kirill89
Created August 19, 2020 17:07
Show Gist options
  • Save Kirill89/514edad0ac80af7dfc036871ccf0f877 to your computer and use it in GitHub Desktop.
Save Kirill89/514edad0ac80af7dfc036871ccf0f877 to your computer and use it in GitHub Desktop.
Slay The Spire save edit
const fs = require('fs');
let data = fs.readFileSync('IRONCLAD.autosave.json', 'utf8');
const out = [];
for (let i = 0; i < data.length; i++) {
const key = 'key';
out.push(data.charCodeAt(i) ^ key.charCodeAt(i % key.length));
}
fs.writeFileSync('IRONCLAD.autosave', Buffer.from(out).toString('base64'));
const fs = require('fs');
let data = fs.readFileSync('IRONCLAD.autosave', 'utf8');
data = Buffer.from(data, 'base64');
const out = [];
for (let i = 0; i < data.length; i++) {
const key = 'key';
out.push(String.fromCharCode(data[i] ^ key.charCodeAt(i % key.length)));
}
fs.writeFileSync('IRONCLAD.autosave.json', out.join(''));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment