Hi all,
I've been doing some tests trying to understand the format of the data contained in the qr codes of cubic ninja.
I developed a program that extracts the data from them as byte array using open source zxing library.
The data don't seem to follow any obvious pattern, and it looks like it's compressed. Do you guys know what type of data does it use?
Edit1:
Edit2:
Edit3:
Ok, I made a quick GUI for you (and quite ugly), so you don't have to use console (I didn't take care with GUI errors, so probably the program will throw errors pretty easily if you do strange things).
About the program
-------------------------
Last version: 1.0b
1. What it does right now:
Give the program an image input file
Select where to save the binary output file.
Press Run
The program generates a .bin file (it contains the bytes contained in the QR Code) and a clean QR Code.
2. Objetives
- Understand the Cubic Ninja QR Format.
- Understand other games format (AC new leaf is already solved, but there are other games that would be ok to get info about)
3. Requeriments:
- Java virtual machine: The program should work in any enviroment with java >= 6, but I've tested it only with oracle java 8 and openjdk 7.
4. FAQ
- ¿What do I mean with a clean QR Code?
You can take a photo with your mobile phone in bad quality and the program will generate a clean and equivalent output image for you.
- It is broken/ I get error ...
Please, tell me what you did (Screenshots would be awesome) and I will try to help you
- Does it only work with Cubic Ninja?
Right now I've only tested it with Cubic Ninja.
- The QR Code it generates it's different
The QR Code it generates contains the same data, it's an equivalent QR-code, QR Codes can vary depending on Size, Mask etc. There are more than many outputs for the same input (they all contain the same data).
5. Known problems/Errors:
-It only admits jpg images
- Sometimes it doesn't recognize the image QR Code
- Problems with Java 7? (try to use console and if it prints an error post it here!)
6. Tested on:
- OpenJDK 7, Oracle Java 8, Oracle Java 7
- Image types: JPG, PNG
7.Downloads:
GUI-Version: https://dl.dropboxusercontent.com/u/4593493/QR_BinExtractor.jar
Console Version: https://dl.dropboxusercontent.com/u/4593493/QBE_NOGUI.jar
Use -> java -jar QBE_NOGUI.jar inputFile.jpg outputFile.bin
Thanks
I've been doing some tests trying to understand the format of the data contained in the qr codes of cubic ninja.
I developed a program that extracts the data from them as byte array using open source zxing library.
The data don't seem to follow any obvious pattern, and it looks like it's compressed. Do you guys know what type of data does it use?
Edit1:
This is how the file that I have looks like in hex (the byte array that I extracted from QR):
PD: The QR I used:
PD: The QR I used:
Edit2:
Ok, Cubic Ninja QR-Codes contains a timestamp, so for each level every time you generate a QR-Code you get a new different QR-Code.
The game allows you to create 3 kinds of levels (Type A, Type B or Type C). I have created an empty A type level and generated two QR-Codes from it, so the only data that can change is the timestamp.
QR 1:
QR 2:
I uploaded the QR binaries so you can see the data more easily.
The game allows you to create 3 kinds of levels (Type A, Type B or Type C). I have created an empty A type level and generated two QR-Codes from it, so the only data that can change is the timestamp.
QR 1:
Image:
Data:
Data:
QR 2:
Image:
Data:
Data:
I uploaded the QR binaries so you can see the data more easily.
Edit3:
I got it working, now I can make equivalent and clean QR-Codes. I was getting the bytes as UTF-8 and looks like it should be ISO-8859-1 codification.
Now the data has quite more sense.
I'm going to refactor my code to give you my Java QR Extract tool. See you in a while!
Now the data has quite more sense.
I'm going to refactor my code to give you my Java QR Extract tool. See you in a while!
Ok, I made a quick GUI for you (and quite ugly), so you don't have to use console (I didn't take care with GUI errors, so probably the program will throw errors pretty easily if you do strange things).
About the program
-------------------------
Last version: 1.0b
1. What it does right now:
Give the program an image input file
Select where to save the binary output file.
Press Run
The program generates a .bin file (it contains the bytes contained in the QR Code) and a clean QR Code.
2. Objetives
- Understand the Cubic Ninja QR Format.
- Understand other games format (AC new leaf is already solved, but there are other games that would be ok to get info about)
3. Requeriments:
- Java virtual machine: The program should work in any enviroment with java >= 6, but I've tested it only with oracle java 8 and openjdk 7.
4. FAQ
- ¿What do I mean with a clean QR Code?
You can take a photo with your mobile phone in bad quality and the program will generate a clean and equivalent output image for you.
- It is broken/ I get error ...
Please, tell me what you did (Screenshots would be awesome) and I will try to help you
- Does it only work with Cubic Ninja?
Right now I've only tested it with Cubic Ninja.
- The QR Code it generates it's different
The QR Code it generates contains the same data, it's an equivalent QR-code, QR Codes can vary depending on Size, Mask etc. There are more than many outputs for the same input (they all contain the same data).
5. Known problems/Errors:
-
- Sometimes it doesn't recognize the image QR Code
- Problems with Java 7? (try to use console and if it prints an error post it here!)
6. Tested on:
- OpenJDK 7, Oracle Java 8, Oracle Java 7
- Image types: JPG, PNG
7.Downloads:
GUI-Version: https://dl.dropboxusercontent.com/u/4593493/QR_BinExtractor.jar
Console Version: https://dl.dropboxusercontent.com/u/4593493/QBE_NOGUI.jar
Use -> java -jar QBE_NOGUI.jar inputFile.jpg outputFile.bin
Thanks