':return: A tuple with the first identified csrf token and value'

def _find_csrf_token(self, freq):

    post_data = freq.get_raw_data()
    querystring = freq.get_querystring()
    for token in chain(post_data.iter_tokens(), querystring.iter_tokens()):
        if self.is_csrf_token(token.get_name(), token.get_value()):
            msg = 'Found    CSRF    token    %s    in    parameter    %s    for    URL    %s.'
            om.out.debug((msg % (token.get_value(), token.get_name(), freq.get_url())))
            return (token.get_name(), token.get_value())
