decrypts simdashboards .sdmap files, just a xor cipher. the decrypted files are zips
uh, i felt like it... idk
key = b"HL74VJ02NHFOXA8BL2QRDK995KTNXEW" | |
def xor_arr(chunk, bytes_read): | |
chunk = bytearray(chunk) | |
key_len = len(key) | |
chunk_size = len(chunk) | |
if chunk_size > 0: | |
for byte_index in range(0, chunk_size, 2): | |
try: | |
chunk[byte_index] ^= key[(byte_index + bytes_read) % key_len] | |
chunk[byte_index + 1] ^= key[(byte_index + 1 + bytes_read) % key_len] | |
except Exception as e: | |
pass | |
if chunk_size & 1: | |
# handles the last byte | |
chunk[0] ^= key[(0 + bytes_read) % key_len] | |
return chunk | |
j8 = 0 | |
with open("ats_hd_9.sdmap", "rb") as f: | |
with open("out.obb", "wb") as f2: | |
total_bytes_read = 0 | |
prev_progress = -1 | |
# read in chunks of 2048 | |
while True: | |
chunk = f.read(2048) | |
bytes_read = len(chunk) | |
if bytes_read != 0: | |
chunk = xor_arr(chunk, total_bytes_read) | |
total = total_bytes_read + bytes_read | |
if total > 0: | |
# update the progress | |
total_bytes_read = total | |
progress = int(min(95, ((((total_bytes_read * 100.0) / 56180771) / 100.0) * 95.0))) | |
if progress != prev_progress: | |
print("Progress: %d%%" % progress) | |
prev_progress = progress | |
else: | |
total_bytes_read = total | |
f2.write(chunk) | |
else: | |
print("100") | |
break |
de.stryder_it.simdashboard.model.MapInfo -> de.stryder_it.simdashboard.model.MapInfo: | |
void <init>(int,java.lang.String,java.lang.String,java.lang.String,int,int,java.lang.String) -> <init> | |
void <init>(int,java.lang.String,java.lang.String,java.lang.String,int,int,java.lang.String,java.lang.String) -> <init> | |
java.lang.String constructLocalFileName(int,java.lang.String) -> constructLocalFileName | |
l4.z0$h -> l4.z0$h: | |
boolean d(java.io.File) -> removeFile | |
l5.d4 -> l5.MapUtils: | |
q4.w0 d(android.content.Context,java.lang.String) -> ToMapData | |
java.lang.String e(android.content.Context) -> getExternalFilesDirAbsolute | |
java.lang.String f(java.lang.String) -> getMapfileVersionStringURI | |
boolean g(java.lang.String) -> isUHDFile | |
q4.w0 -> q4.MapData: | |
int a -> version | |
boolean b -> isLegacyMapInfo | |
boolean c -> isValid | |
int d -> minAppVersion | |
int e -> infoFormat | |
int f -> gameId | |
java.lang.String g -> modName | |
java.lang.String h -> mapName | |
java.lang.String i -> description | |
java.lang.String a() -> getDescription | |
int b() -> getGameId | |
int c() -> getInfoFormat | |
java.lang.String d() -> getMapName | |
int e() -> getMinAppVersion | |
java.lang.String f() -> getModName | |
int g() -> getVersion | |
boolean h() -> getIsLegacyMapInfo | |
boolean i() -> getIsValid | |
void k(java.lang.String) -> setDescription | |
void l(int) -> setGameId | |
void m(int) -> setInfoFormat | |
void n(boolean) -> setIsLegacyMapInfo | |
void o(java.lang.String) -> setMapName | |
void p(int) -> setMinAppVersion | |
void q(java.lang.String) -> setModName | |
void r(boolean) -> setIsValid | |
void s(int) -> setVersion |