python - How to add to the list HEX values while preserving their original form -
this code:
first_xor_list=[0xaa,0x89,0xc4,0xfe,0x46] secpnd_xor_list=[0x78,0xf0,0xd0,0x03,0xe7] after_xor=[] xor_helper=[] name = "userna" after_xor.append(hex(ord(name[0])))#first stage - xor second char end , add second char end of list in range(len(name)): if < len(name)-1: after_xor.append(hex((first_xor_list[i])^ (ord(name[i+1])))) elif < len(name): after_xor.append(hex(ord(name[1])))
the problem values go list string,this output:
['0x55', '0xd9', '0xec', '0xb6', '0xb0', '0x27', '0x73']
and because have xor values in list need them this:
[0x55, 0xd9, 0xec, 0xb6, 0xb0, 0x27, 0x73]
how can add them list in way?
delete hex, hex converts int string containing hexadecimal form.
first_xor_list=[0xaa,0x89,0xc4,0xfe,0x46] secpnd_xor_list=[0x78,0xf0,0xd0,0x03,0xe7] after_xor=[] xor_helper=[] name = "userna" after_xor.append(ord(name[0]))#first stage - xor second char end , add second char end of list in range(len(name)): if < len(name)-1: after_xor.append((first_xor_list[i])^ (ord(name[i+1]))) elif < len(name): after_xor.append(ord(name[1]))
Comments
Post a Comment