js-confuser
js-confuser copied to clipboard
Uncaught (in promise) ReferenceError: Cannot access 'CLBnqYg' before initialization
Describe the bug:
The program works before obfuscation, runs when obfuscated, but specific function doesnt work
Config and Small code sample
Config:
{
target: "browser",
preset: "medium"
}
Code:
const hardSpoof = async () => {
let game = false;
let success = 0
// changes the clientseed as a last minute attempt to override the session
await changeSeed(await genString(28, 31))
// creates a ui so the user knows whats going on
showBigToast("DevHaxx is UnRigging your session")
// add current game data to a obj so ur current game aint messed up
const session = (await getMinesGame())
if (session.hasGame) {
// stores the current gamedata in a variable
game = session.game;
// attmept to uncover a mine, so cashout is successful
await action(false, genNumber(5, 15))
await action(true, 0)
} else {
game = false;
}
// try to spoof 3 times
for (let i = 0; i < 3; i++) {
if (await mineSpoof()) {
success++
} else {
success--
}
}
// recreate game so thingies thing
game && await create(game.minesAmount, parseInt(game.betAmount));
// remove the overlay
hideBigToast()
if (success >= 2) {
return true
} else {
return false
}
};
Expected behavior
The program should outputrun function normally
Actual behavior
The program creates the UI and stalls, without doing anything else
Additional context
Seems the program gets stuck because the same variable is defined twice, shown here: