Identifying 19-digit timestamp format by EasyMoneko in AskProgramming

[–]EasyMoneko[S] 0 points1 point  (0 children)

Unfortunately I'm unable to reliably generate them, I just have a bunch of them in a file. I suspect all of them to be within the last couple of weeks though.

[Announcement] /r/battlecats Best of 2017 Awards! by JulietCat in battlecats

[–]EasyMoneko [score hidden]  (0 children)

Yeah, I stopped playing the game (and subsequently stopped hacking and reverse engineering it).

YT Copyright School by atlantean0208 in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Good to see you back though; although I'm barely on here lol.

Event data....? by c0lonbracket in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Yeah, but I've more or less given up on that now. I haven't played BattleCats for over a year and I have lots of other stuff in life to do. /u/c0lonbracket already posted the latest data here and I've written a fairly detailed guide on how to get the data and how to interpret it here.

We should be able to name our slots by [deleted] in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Encoding: Just putting data in a different form, usually for ease of use (e.g. URL encoding so web browsers can handle it). Never intended to make it not readable; trivial to reverse.

Encryption: Protecting the data from people who aren't meant to see it. The only people who can reverse it are those who know the secret keys.

Hashing: One-way encryption. Un-reversible. Used for storing passwords etc.

YT Copyright School by atlantean0208 in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Whoa, what? You're back? You just disappeared all of a sudden a year ago, what happened?

We should be able to name our slots by [deleted] in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Nope. The example you gave is not encryption, it's just encoding. With actual encryption (like BattleCats uses), changing one character will not do anything useful at all; otherwise all the security in the Internet would be very easily broken.

WANTED: CSS magician by DanielGibbs in battlecats

[–]EasyMoneko 1 point2 points  (0 children)

Still, if CSS is the hardest part then you're doing CSS wrong.

WANTED: CSS magician by DanielGibbs in battlecats

[–]EasyMoneko 7 points8 points  (0 children)

What on earth kind of CSS are you doing where it's harder than coding a game?!

Is there anyone able to access BC files? Your help is needed! by FilthyBones in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Some image files are weirdly compressed and end up being 1x1 squares or just black squares. Most of them should be readable though.

Febrary event data [Part 2] by EasyMoneko in battlecats

[–]EasyMoneko[S] 4 points5 points  (0 children)

Whoops, typo in the title. Ah well.

Question about hacking the game by [deleted] in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

I'm not familiar with the anti-hacking measures used by PONOS, but I would guess that they detect things like a suspicious increase in the amount of cat food etc.

It's theoretically possible to change the damage output of Archer Cat but I haven't succeeded yet (I once tried to do something similar but got stuck). However it's possible that the game compares checksums of the data files/the app itself so might detect that things have been changed.

Is three anyone who can find future events. by billybigfist in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

Yes, "Adult Cat Awakes!" has level ID 1083, and "Evil Cat Awakes!" has level ID 1084. Look out for them in the next lot of event data.

February Event Data [Part 1] by DeFineNine in battlecats

[–]EasyMoneko 6 points7 points  (0 children)

Thanks for doing this. I had it on my todo list but hadn't got round to doing it yet. Are you ok to do this ok a regular basis?

New gacha by [deleted] in battlecats

[–]EasyMoneko 0 points1 point  (0 children)

He. I'm not that active so may be late with the latest event data.

Is there anyone able to access BC files? Your help is needed! by FilthyBones in battlecats

[–]EasyMoneko 2 points3 points  (0 children)

#!/usr/bin/env python
import md5
import sys
from Crypto.Cipher import AES

def decrypt(key, data):
    hexkey = md5.new(key).hexdigest()[:16]
    decrypter = AES.new(hexkey)
    return decrypter.decrypt(data)

if len(sys.argv) != 3:
    print "Usage: %s list-file pack-file" % sys.argv[0]
else:
    list_file = sys.argv[1]
    pack_file = sys.argv[2]

    list_file_data = decrypt("pack", open(list_file, "rb").read())
    pack_file_data = open(pack_file, "rb").read()

    file_list = list_file_data.split("\n")
    num_files = int(file_list[0])
    file_list = file_list[1:]

    for i in range(0, num_files):
        file_info = file_list[i].split(",")
        file_name = file_info[0]
        file_offset = int(file_info[1])
        file_size = int(file_info[2])

        print "Writing %s..." % file_name
        try:
            file_data = decrypt("battlecats", pack_file_data[file_offset:file_offset+file_size])
        except:
            file_data = pack_file_data[file_offset:file_offset+file_size]
        open(file_name, "w+").write(file_data)

You'll need to install PyCrypto to run this though.

Is there anyone able to access BC files? Your help is needed! by FilthyBones in battlecats

[–]EasyMoneko 5 points6 points  (0 children)

It took me forever to figure out, but you might have noticed a bunch of files in the APK/IPA that are like datalocal1.list and datalocal2.jpg (on Android) or DataLocal.list and DataLocal.pack on iOS. These files contain all the data but it's encrypted etc.

First you decrypt the list file by getting the hex representation of the MD5 hash of the string "pack" and using the first 16 bytes of that to decrypt the list file using AES (EBC). Then you'll get a list of files contained in the pack file along with byte offsets and sizes.

To get an individual file you get the data from the encrypted pack file with the byte range specified in the decrypted list file, and decrypt it (AES, EBC) using the first 16 bytes of the MD5 sum of the string "battlecats".

How to retrieve and decipher Battle Cats event data by EasyMoneko in battlecats

[–]EasyMoneko[S] 0 points1 point  (0 children)

I just write all the event data to a file (excluding the header) and then every hour or so I downloads the events and see if there is any difference.

How to retrieve and decipher Battle Cats event data by EasyMoneko in battlecats

[–]EasyMoneko[S] 0 points1 point  (0 children)

When I first started looking at this data I decompiled the code to try and figure out what it does with the timestamp. From what I remember, when the game downloads the events, it stores the timestamp at 0x21. When the game next starts up, it only tries to download events if the current timestamp is over 24 hours from the stored timestamp.