Add string output for guid

This commit is contained in:
Dustin Pianalto 2018-05-06 14:46:34 -08:00
parent 46c54194b3
commit aab2dbac9e

View File

@ -87,11 +87,15 @@ async def run_command(args):
def hex_to_char(a: int): def hex_to_char(a: int):
a = a & 0xf a = a & 0xf
return str(a - 10 + 0x61 if a > 9 else a + 0x30) out = str(a - 10 + 0x61 if a > 9 else a + 0x30)
print(out)
return out
def hexs_to_chars(_a, _b): def hexs_to_chars(_a, _b):
return f'{hex_to_char(_a>>4)}{hex_to_char(_a)}{hex_to_char(_b>>4)}{hex_to_char(_b)}' out = f'{hex_to_char(_a>>4)}{hex_to_char(_a)}{hex_to_char(_b>>4)}{hex_to_char(_b)}'
print(out)
return out
def to_string(guid): def to_string(guid):