In [5]: unhex(b'b12')
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-5-4ac64938706a> in <module>
----> 1 unhex(b'b12')
~/tools/pwntools/pwnlib/util/fiddling.py in unhex(s)
41 s = s.strip()
42 if len(s) % 2 != 0:
---> 43 s = '0' + s
44 return binascii.unhexlify(s)
45
TypeError: can only concatenate str (not "bytes") to str
It tries to prepend a
'0'
string to a bytestring.