使用python将字符串转换成16进制串:
mystr = ‘1234567’ print ":".join("{:02x}".format(ord(c)) for c in mystr)
得到输出:
"31:32:33:34:35:36:37"