#!/usr/bin/env python2
import argparse
import sys

parser = argparse.ArgumentParser(description='''
convert shellcode  
''')
parser.add_argument('data', nargs='*',
    help='convert shellcode')


args = parser.parse_args()

def toshellcode(s):
    shellcode = ''
    for i in range(len(s)/2):
        shellcode += "\\x" +  s[2*i:2*i+2]
    return shellcode

if not args.data:
    print toshellcode(sys.stdin.read())
else:
    print toshellcode(''.join(args.data))


