2012 Apr 30 11:54 PM UTC | Gaming7 Hacks9 JavaScript2 Programming18 Python4 Web13 [2012]8

Have you ever heard of Blitz Chess? It’s a type of chess, with time limits on each side.

Google developers have made an App Engine sample. You can play at blitz.appspot.com, but you need to have a Google Account.

After playing a few times, it was fun, but I thought I should go further than that. I read the server’s Python code, and found a checkmate hack exploit. I even tampered HTTP requests and deleted all the losses I had accumulated. However, the deletion hack can also be done natively.

Now, I shall share some fun with you. Execute this JavaScript, and you can might be able to now move EVERYONE’s pieces ANYWHERE. Note that moving your pawn back one space can kill one of your pieces and promote it. This is now encoded, but a lite version is provided.

I also have one to delete your losses, but I won’t give it away as-is…

Enjoy (hit Read More if needed):

Here is one lite version (pawns get 1 extra space of movement), but there is also a pro version…

Chess.prototype.validatePawn=function(move,color){var coords=Chess.toCoords(move);if(color==Chess.WHITE&&coords.to.y<=coords.from.y){return false}else if(color==Chess.BLACK&&coords.to.y>=coords.from.y){return false}if(Chess.isVertical(coords)){var numSquares=Math.abs(coords.from.y-coords.to.y);if(numSquares>3||(numSquares>2&&this.hasMoved(move.from))){return false}var index=(color==Chess.WHITE?8:-8);var i=move.from;while(1){i=i+index;if(this.getPiece(i)!=Chess.BLANK){return false}if(i==move.to){break}}return true}else{if(!Chess.isDiagonal(coords)){return false}var dx=Math.abs(coords.from.x-coords.to.x);var dy=Math.abs(coords.from.y-coords.to.y);if(dx!=dy||dx>2){return false}if(this.getPiece(move.to)!=Chess.BLANK){return true}else{var capturedPawn=this.isEnPassant(move);var opposingPawn=(color==Chess.WHITE?'p':'P');if(capturedPawn!=null&&this.getPiece(capturedPawn)==opposingPawn){var lastMove=this.getLastMove();if(lastMove){if(lastMove.to==capturedPawn&&Math.abs(lastMove.from-lastMove.to)==16){return true}}}return false}}};

Here it is: (move anything anywhere, except to kill a king)

Z2FtZS5oYW5kbGVDbGljayUzZGZ1bmN0aW9uKCklN2JpZihnYW1lLmNhbk1vdmUpJTdiaWYoJTI0KHRoaXMpLmhhc0NsYXNzKCU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mFqYXgob3B0aW9ucyklN2QpLnRleHQoJTI2JTIzMzklM2JEZWxldGUlMjYlMjMzOSUzYiklM2I=

How do you use it? Well, you have to decode it (thrice) first, then you can execute it into your browser’s JavaScript console. Finally, enjoy!