Skip to content

Instantly share code, notes, and snippets.

@2PacIsAlive
Created December 30, 2021 06:00
Show Gist options
  • Save 2PacIsAlive/82c5021ccdd37d5d17f3bd5c9604118f to your computer and use it in GitHub Desktop.
Save 2PacIsAlive/82c5021ccdd37d5d17f3bd5c9604118f to your computer and use it in GitHub Desktop.
hack your bitburner (https://danielyxie.github.io/bitburner/) savefile to give yourself max funds
window.indexedDB
.open('bitburnerSave', 1)
.onsuccess = (openEvent) => {
var objectStore = openEvent.target.result
.transaction(['savestring'], 'readwrite')
.objectStore('savestring')
objectStore.get('save')
.onsuccess = (getEvent) => {
var saveObject = JSON.parse(atob(getEvent.target.result)),
playerSave = JSON.parse(saveObject['data']['PlayerSave'])
playerSave['data']['money'] = Number.MAX_SAFE_INTEGER
saveObject['data']['PlayerSave'] = JSON.stringify(playerSave)
objectStore.put(btoa(JSON.stringify(saveObject)), 'save')
.onsuccess = () => {
console.log('save hacked, reloading')
location.reload()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment