Skip to content

Instantly share code, notes, and snippets.

@eybisi
Last active May 3, 2018 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eybisi/d8fabb81c42ce0ab8d758290f61f5757 to your computer and use it in GitHub Desktop.
Save eybisi/d8fabb81c42ce0ab8d758290f61f5757 to your computer and use it in GitHub Desktop.
minesweeper
setImmediate(function() { //prevent timeout
console.log("[*] Starting script");
Java.performNow(function() {
Java.choose("Draziw.Button.Mines.MainActivity", {
onMatch: function (instance) {
for(var x =0; x< 16;x++){
line = ""
for(var y = 0;y<10;y++)
{
cell = instance.a(x,y)
if(cell== 10)
line += '\x1b[31mX\x1b[0m'
else {
n = 0
if(cell == 1) n = '\x1b[34m'
else if(cell == 2) n = '\x1b[32m'
else if(cell == 3) n = '\x1b[35m'
else if(cell == 4) n = '\x1b[36m'
else if(cell == 5) n = '\x1b[37m'
else n = '\x1b[37m'
line += n + cell + '\x1b[0m'
}
//console.log(" " + instance.a(x,y))
}
console.log(line)
}
},
onComplete: function () {
}
});
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment