@@ -0,0 +1,950 @@
+#!/usr/bin/python%0Aimport sys, subprocess, os, re%0A%0Aif len(sys.argv) %3C 3:%0A    print('Incorrect usage')%0A    exit(1)%0A%0Aif not os.path.isfile(sys.argv%5B1%5D):%0A    print('File does not exist')%0A    exit(1)%0A%0Aod = subprocess.check_output(%5B'/usr/bin/objdump', '-d', sys.argv%5B1%5D%5D)%0A%0Aod = od.split('%5Cn')%0A%0Acode = %5B%5D%0Arx = re.compile(r'%5E (%5B0-9%7Ca-z%5D+):(.*)')%0Afor line in od:%0A    res = rx.match(line)%0A    if not res is None:%0A        code.append(res.group(0).split('%5Ct')%5B1%5D.strip())%0A%0Ashellcode = ' '.join(code)%0Ashellcode = shellcode.replace(' ', '%5C%5Cx')%0Ashellcode = '%5C%5Cx' + shellcode%0A%0A%0Awith open(sys.argv%5B2%5D, 'w') as codeFile:%0A    codeFile.write('#include %3Cstdio.h%3E%5Cn%5Cn')%0A    codeFile.write('char code%5B%5D = %22' + shellcode + '%22;%5Cn%5Cn')%0A    codeFile.write('int main() %7B%5Cn')%0A    codeFile.write('    int (*func)();%5Cn')%0A    codeFile.write('    func = (int (*)()) code;%5Cn')%0A    codeFile.write('    (int)(*func)();%5Cn')%0A    codeFile.write('    return 0;%5Cn')%0A    codeFile.write('%7D%5Cn')%0A

Add convert to shellcode tool