code: def convert(self, code):
          '''
          Note:
  
          If the shellcode starts with '66' controls, it needs to be changed to add [BITS 32] or
          [BITS 64] to the start.
  
          To use:
  
          convert()
          '''
          code = code.replace(' ', '')
          lines = []
          for l in code.splitlines(False):
              lines.append(l)
          code = ''.join(lines)  # Remove new lines
          return code.decode('hex')
docs: Note:
  
          If the shellcode starts with '66' controls, it needs to be changed to add [BITS 32] or
          [BITS 64] to the start.
  
          To use:
  
          convert("""
              55
              53
              50
              BDE97F071E
              FFD5
              BDD67B071E
              FFD5
              5D
              5B
              58
              C3
              """)