mirror of
https://github.com/ppwang06/frida_js.git
synced 2026-06-05 21:07:18 +08:00
35 lines
1.8 KiB
Python
35 lines
1.8 KiB
Python
from loguru import logger
|
|
|
|
g = """
|
|
55,65,54,68,69,55,57,56,50,57,57,66,66,52,54,55,49,68,55,55,66,48,55,65,49,68,54,52,65,49,56,66,46,99,71,70,121,89,87,48,102,89,106,70,104,89,109,74,107,78,109,73,116,77,68,82,104,89,
|
|
105,48,48,78,84,90,108,76,87,73,120,89,122,103,116,89,84,81,50,79,84,89,119,90,68,77,51,77,68,86,107,72,110,90,108,99,110,78,112,98,50,52,102,77,82,53,119,98,71,70,48,90,109,57,121,98,82,57,104,98,109,82,1
|
|
21,98,50,108,107,72,109,86,106,72,122,69,61,46,112,-21,78,34,61,67,67,18,-75,34,-91,60,-16,63,-115,-8,-85,48,-72,99,44,82,93,-43,-116,31,26,94,24,-2,68,-99,-95,-37,-4,-102,-110,45,-93,-88,-53,-80,-26,-51,7
|
|
5,25,-127,-60,3,-97,57,88,-56,-60,-6,-28,-34,123,-22,89,23,49,89,113,127,113,71,-21,-79,-121,66,39,-126,-18,-42,-4,78,123,-41,24,-75,-107,-16,-123,-34,-23,107,-17,77,30,-104,1,17,-45,81,-124,6,-43,68,120,-
|
|
90,40,12,36,-125,-35,102,120,-103,-1,27,-34,-84,36,-31,95,40,56,85,118,52,126,-97,-35,77,94,4,-45,-13,51,-32,-73,95,-28,-31,-96,98,29,52,58,43,-21,115,12,-121,-49,-87,-84,110,-26,-76,-21,114,-122,109,-22,-
|
|
73,-74,41,12,-110,70,-4,15,33,-120,52,30,-73,63,-124,117,-90,36,-125,-46,69,77,45,126,100,70,-110,113,11,52,-112,-97,123,31,111,65,127,-31,67,-28,11,-111,-83,95,-118,-122,115,-32,12,56,-3,-16,-21,56,1,47,-
|
|
35,-18,-86,107,-119,-81,116,38,-28,-124,-103,96
|
|
"""
|
|
|
|
|
|
newa = g.split(",")
|
|
cleaned_array = [int(s.replace("\n", "").replace("\r", "")) for s in newa]
|
|
logger.info(f"原始:{cleaned_array}")
|
|
|
|
|
|
def unsigned_to_signed_byte(u):
|
|
return u if u < 128 else u - 256
|
|
|
|
|
|
end_byte = [unsigned_to_signed_byte(one_byte) for one_byte in cleaned_array]
|
|
logger.info(f"有符号:{end_byte}")
|
|
|
|
bytes_list = [x + 256 if x < 0 else x for x in cleaned_array] # 转换为无符号字节值
|
|
logger.info(f"无符号:{bytes_list}")
|
|
|
|
|
|
# b = bytes(bytes_list)
|
|
# s = b.decode('utf-8')
|
|
# print(s)
|
|
|
|
|