Last active
May 3, 2018 16:06
-
-
Save eybisi/d8fabb81c42ce0ab8d758290f61f5757 to your computer and use it in GitHub Desktop.
minesweeper
This file contains hidden or 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
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