Fixed the code by mixing python and shellcode in a way that really should never be done