Last active
December 21, 2018 17:56
-
-
Save bittermandel/0bed2cb2c94e96592b52ca977a62988a to your computer and use it in GitHub Desktop.
Python decode
This file contains 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
snapshot = { | |
"ClassId": 0, | |
"AscendancyClass": 1 | |
} | |
hashes = [918, 1822, 2521, 3452, 3656, 3676, 4177, 4399, 4432, 4502, 5696, 6237, 6949, 7388, 7444, 8302, 8948, 10153, 10490, 10763, 11018, 11420, 11455, 12597, 13009, 13753, 15046, 15144, 15435, 15599, 17735, 17790, 18033, 18769, 19103, 19374, 19635, 20528, 22473, 22551, 23659, 24050, 24426, 24643, 24824, 25332, 26270, 26866, 27386, 27611, 27659, 27929, 28221, 28574, 28754, 28859, 29106, 30471, 32024, 32710, 33479, 33545, 33864, 34173, 34579, 35260, 35283, 35894, 35958, 36452, 36634, 36678, 36858, 37671, 38190, 38989, 39085, 39841, 40100, 41263, 41534, 42668, 42760, 42795, 43689, 43962, 44529, 46092, 46842, 46897, 47251, 47507, 48768, 48778, 49254, 49929, 50029, 51782, 51923, 53279, 53456, 55643, 56158, 58029, 59650, 60090, 60398, 60405, 60440, 60554, 61419, 61653, 61981, 63398, 63425, 63447, 63976, 64210] | |
bytearray = [ 0, 0, 0, 4, snapshot['ClassId'], snapshot['AscendancyClass'], 0] | |
for i in range(0, len(hashes), 2): | |
bytearray.append(hashes[i] >> 8 & 0xFF) | |
bytearray.append(hashes[i+1] & 0xFF) | |
encoded = b64encode(bytes("".join([chr(b) for b in bytearray]), encoding="utf-8")) | |
passive_tree = encoded.decode("utf-8").replace('+','-').replace('/', '_') | |
# AAAABAABAAMeCXwOXBAvEcKWFl0bw5wdbiLCqSgLK8KcLDUywrk6KDzDr0V-RlFKwq5MMFcXXMOyX0Ngw7Rmw7Jqw5tsGW7CnnDCu3EHfcOGwoIJwoR9wofCvMKJNsKMZMKPRsKPJ8KVTcKYwqHCnC_CosKswqcrwqrCusKtDMK2McK4wpPCvsKKw4AJw4NGw4ofw5Bbw5vCrcOpwrrDq8O1w6zCisOvw5XDssKmw7fDl8O5w5I= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment