'parse TREE_CONNECT request message to extract the Request_Path'

def SMB_COM_TREE_CONNECT_ANDX_Request(self, data):

    try:
        (wct, andxcmd, rsrv1, andxoffset, flags, passwordlength, bytecount) = struct.unpack('<BBBHHHH', data[:11])
        if bool((passwordlength % 2)):
            pwpadlen = 0
        else:
            pwpadlen = 1
        rp_offset = ((11 + passwordlength) + pwpadlen)
        rplen = (data[rp_offset:].find('\x00\x00') + 1)
        request_path = data[rp_offset:(rp_offset + rplen)]
        return request_path
    except:
        return ''
