'Note that this method only makes sense if called in a loop with the
other check_* methods.
:param web_socket_url: The URL of the web socket
:param web_socket_version: The protocol version
:return: True if the web socket does NOT check the origin for
connections but DOES require basic authentication to connect'

def check_need_basic_auth_origin_not_restricted(self, web_socket_url, web_socket_version):

    upgrade_request = build_ws_upgrade_request(web_socket_url, web_socket_version=web_socket_version, origin=self.W3AF_ORIGIN)
    upgrade_response = self._uri_opener.send_mutant(upgrade_request, cookies=False, use_basic_auth=True)
    if (not is_successful_upgrade(upgrade_response)):
        return False
    msg = 'Cross-Site    WebSocket    Hijacking    has    been    found    at    "%s"'
    msg %= web_socket_url
    v = Vuln.from_fr('Websockets    CSRF    vulnerability', msg, severity.HIGH, upgrade_response.id, self.get_name(), upgrade_request)
    self.kb_append_uniq(self, 'websocket_hijacking', v)
    return True
