Skip to content

getGJSecretReward.php

Gets the rewards from the Secret Room ("Wraith") vault depending on the entered code, which can be found in the tower select level screen at the bottom right.

Parameters

ParameterExplanationRequired
udidThe player's UDID (Unique Device Identifier). Used to identify unregistered usersYes
secretCommon Secret: Wmfd2893gb7Yes
chkRewards CHK using the chest rewards keyYes
gameVersionA number representing the game's version. The current value is 22 for 2.2
binaryVersionA number representing the game's small version. The current value is 47 for 2.2081 on PC and 48 for 2.208 on mobile
accountIDThe player's account ID (not to be confused with user ID). Used for authorization
gjp2The player's account password, encoded with GJP2. Used for authorization
uuidIn modern versions, this is sent as the user ID. See the previous format here
dvsA number added in 2.208 representing the device the player is using. Corresponds to the Cocos2d CC_TARGET_PLATFORM macro: 1 for iOS, 2 for Android, 3 for Windows, 8 for macOS
rewardKeyThe input reward key string

Response

A list of attributes of the Rewards, separated by colons : as follows:

  • A random string of 5 characters
  • The number used to verify the chk
  • The rewardID
  • The chest type (1 small, 2 large)
  • comma separated chest reward in the format {itemid},{total1},{itemid2},{total2},...

Where each itemID is as follows:

itemIDType
1Fire Shard
2Ice Shard
3Poison Shard
4Shadow Shard
5Lava Shard
6Demon Key
7Orbs
8Diamonds
10Earth Shard
11Blood Shard
12Metal Shard
13Light Shard
14Soul Shard
15Gold Key

If the itemID is greater than 1000, it seems to be treated as a special reward (unlock type), where

itemID - 1000Unlock Type
1Cube
2Col1
3Col2
4Ship
5Ball
6Bird
7Dart
8Robot
9Spider
10Streak
11Death
12GJItem
13Swing
14Jetpack
15ShipFire

This list is then XOR'd and URL-Safe Base64 encoded. Then it is separated with its hash by a pipe |. It also has a random string of 5 characters appended to the front.

Error code -1 is returned if the reward key is incorrect.

Example

Python

py
import random
import requests
import base64


def xor_cipher(text: str, key: str) -> str:
    """
    XOR cipher function: Encrypts or decrypts a text using a key.
    """
    return ''.join(
        chr(ord(char) ^ ord(key[i % len(key)])) for i, char in enumerate(text)
    )


def generate_chk() -> str:
    """
    Generates the 'chk' parameter by combining a random string and 
    an XOR-ciphered, base64-encoded random integer.
    """
    random_string = ''.join(random.choice("1234567890qwertyuiopaqsdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM") for _ in range(5))
    random_number = str(random.randint(10000, 1000000))
    xor_ciphered = xor_cipher(random_number, "59182")
    encoded = base64.b64encode(xor_ciphered.encode()).decode()
    return random_string + encoded


def decode_response(response_text: str) -> str:
    """
    Decodes the response text from the server.
    """
    try:
        encoded_part = response_text.split("|")[0][5:]
        decoded_part = base64.urlsafe_b64decode(encoded_part.encode()).decode()
        return xor_cipher(decoded_part, "59182")
    except Exception:
        return response_text


url = "https://www.boomlings.com/database/getGJSecretReward.php"
headers = {"User-Agent": ""}
data = {
    "accountID": "1688850", #iAndyHD accountID
    "binaryVersion": "42", 
    "gameVersion": "22",
    "gjp2": "***", #iAndyHD gjp2
    "secret": "Wmfd2893gb7",
    "udid": "ffffffff-88c5-aa6d-ffff-ffffcd72151b",
    "uuid": "4460760",
    "rewardKey": "backstreetboy",
    "chk": generate_chk(),
}
# Send POST request
response = requests.post(url, headers=headers, data=data).text
# Decode and print response
print(f"Response: {response}")
decoded_text = decode_response(response)
print(f"Decoded: {decoded_text}")

Response

plain
Response: bHR3IU2oCVGoPDQgAAgEKCwsDDwsLCQIFAR0LBQ==|4adffcb7db1fdad7a665a96fa68da46157cbed78
Decoded: fS3lX:498043:31:2:1008,37