Tag:Big end

  • Analysis of Python protocol

    Time:2020-11-25

    1. Use the byte method to parse and package the protocol bin_buff = bytes() bin_buff += (0x1234).to_bytes(2, byteorder = ‘big’) bin_buff += (0x56).to_bytes(1, byteorder = ‘big’) print(‘0x%s’ % bin_ buff.hex ()) ා output 0x123456 b1 = int.from_bytes(bin_buff[1:3], byteorder = ‘big’) Print (‘0x% X ‘% B1) ා output 0x3456 2. If you press struct in C, […]