independence from sus.byteorder
This commit is contained in:
1 parent
71446f6f5a
commit
187dfdda9f
4 files changed
+2
-7
No files matched your search
@@ -167,7 +167,3 @@ cython_debug/
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
|
||||
# real blocker
|
||||
*real.txt
|
||||
@@ -1 +0,0 @@
|
||||
[(11, 3), (69, 181), (92, 184), (80, 198), (71, 52), (12, 0), (65, 9), (121, 186), (43, 1), (64, 0), (6, 234), (15, 158), (114, 239), (135, 20), (50, 82), (114, 248), (84, 173), (135, 204), (116, 240), (12, 183), (14, 48), (85, 47), (117, 238), (141, 231), (68, 187), (94, 186), (116, 252), (101, 179), (96, 187), (84, 181), (88, 242), (13, 251), (93, 13), (116, 193), (133, 186), (32, 204), (5, 39), (51, 188), (73, 174), (63, 207), (105, 9), (83, 5), (132, 5), (125, 237), (142, 9), (142, 15), (88, 186), (32, 243), (102, 20), (105, 10), (14, 69), (34, 210), (50, 84), (18, 69), (22, 10), (35, 19), (101, 194), (57, 80), (34, 4), (1, 252), (84, 246), (129, 2), (49, 205), (15, 247), (71, 58), (117, 252), (65, 13), (103, 83), (116, 253), (34, 12), (12, 212), (54, 7), (0, 12), (120, 247), (112, 190), (140, 207), (34, 186), (141, 179), (116, 0), (91, 0), (127, 7), (34, 8), (132, 4), (139, 198), (28, 187), (126, 206), (87, 238), (98, 83), (8, 11), (61, 186), (87, 249), (19, 0), (126, 11), (96, 251), (33, 65), (138, 14), (99, 240), (18, 79), (49, 255), (141, 194), (130, 4), (107, 252), (98, 76), (118, 6), (45, 71), (134, 71), (7, 241), (82, 82), (53, 161), (95, 234), (54, 4), (67, 5), (137, 180), (15, 193), (140, 9), (102, 1), (138, 0), (32, 206), (95, 0), (76, 186), (26, 197), (137, 2), (67, 7), (24, 13), (12, 7), (117, 13), (88, 242), (82, 83), (79, 253), (107, 254), (99, 3), (110, 69), (3, 193), (91, 254), (24, 79), (39, 1), (13, 1)]
|
||||
@@ -85,14 +85,14 @@ def keycrypt(genkey: Iterator[tuple[int, int]], usize_length=8) -> bytearray:
|
||||
i = bytearray()
|
||||
for index, dif in genkey:
|
||||
i.extend(
|
||||
index.to_bytes(usize_length, sys.byteorder) + dif.to_bytes(1)
|
||||
index.to_bytes(usize_length) + dif.to_bytes(1)
|
||||
) # little endian? in 2025?
|
||||
return i
|
||||
|
||||
|
||||
def parse_bytecrypt(data: bytes, usize_length=8) -> Iterator[tuple[int, int]]:
|
||||
for i in range(0, len(data), usize_length + 1):
|
||||
index = int.from_bytes(data[i : i + usize_length], sys.byteorder)
|
||||
index = int.from_bytes(data[i : i + usize_length])
|
||||
offset = data[i + usize_length]
|
||||
yield (index, offset)
|
||||
|
||||
|
||||
Reference in new issue
Block a user