title: Python string to shellcode byte
body: <p>I am trying to make a program that generates shellcode, in Python3, I need to to convert a string to the &quot;\x00\x00&quot; format, for example: &quot;Hello&quot; -&gt; &quot;\x68\x65\x6c\x6c\x6f&quot;.
  I cannot figure this out, if I try to just add &quot;\\x&quot; to &quot;68&quot;, it does not work. I have tried to google everything I can, I thought this would be simple, but I'm stuck on it.</p>