Skip to content

Commit b49cf96

Browse files
author
Alexander "Tarh
committed
[WIP] Minor cleanup committed
1 parent 22d69dc commit b49cf96

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

custom_components/xiaomi_cloud_map_extractor/ijai/aes_decryptor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ def md5key(string: str, model: str, device_mac: str):
4343

4444
tempKey = pjstr + tempModel
4545
aeskey = aesEncrypted(string, tempKey)
46-
#aeskey = string
4746

4847
temp = MD5.new(aeskey.encode('utf-8')).hexdigest()
4948
if isEncryptKeyTypeHex:
@@ -59,8 +58,5 @@ def genMD5key(wifi_info_sn: str, owner_id: str, device_id: str, model: str, devi
5958

6059

6160
def unGzipCommon(data: str, wifi_info_sn: str, owner_id: str, device_id: str, model: str, device_mac: str) -> bytes:
62-
#base64map = base64.b64encode(data)
63-
# with open("0.encrypted.map", 'wb') as file:
64-
# file.write(data)
6561
return aesDecrypted(data, genMD5key(wifi_info_sn, owner_id, device_id, model, device_mac))
6662

custom_components/xiaomi_cloud_map_extractor/ijai/map_data_parser.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,13 @@ def parse(raw: bytes, colors: Colors, drawables: Drawables, texts: Texts, sizes:
4040
_LOGGER.debug(f"Skipping {offset1} bytes, value: {buf._data[buf._offs]:#x}")
4141

4242
feature_flags = MapDataParserIjai.FEATURE_IMAGE
43-
#feature_flags = buf.get_uint32('feature_flags')
4443
map_id = buf.peek_uint32('map_id')
45-
#_LOGGER.debug('feature_flags: 0x%x, map_id: %d, some_hash: %s', feature_flags, map_id, some_hash)
4644

4745
if feature_flags & MapDataParserIjai.FEATURE_ROBOT_STATUS != 0:
4846
MapDataParserIjai.parse_section(buf, 'robot_status', map_id)
4947
buf.skip('unknown1', 0x28)
5048

5149
if feature_flags & MapDataParserIjai.FEATURE_IMAGE != 0:
52-
#MapDataParserIjai.parse_section(buf, 'image', map_id)
5350
buf.set_name('image')
5451
map_data.image, map_data.rooms, map_data.cleaned_rooms = \
5552
MapDataParserIjai.parse_image(buf, colors, image_config, DRAWABLE_CLEANED_AREA in drawables)

0 commit comments

Comments
 (0)