亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cookies.c

?? 基于minigui的瀏覽器. 這是最新版本.
?? C
?? 第 1 頁 / 共 3 頁
字號:
{   int i;   for (i = 1; i <= 12; i++) {      if (!g_strncasecmp(months[i], month_name, 3))         return i;   }   return 0;}/* * Return a local timestamp from a GMT date string * Accept: RFC-1123 | RFC-850 | ANSI asctime | Old Netscape format. * *   Wdy, DD-Mon-YY HH:MM:SS GMT *   Wdy, DD-Mon-YYYY HH:MM:SS GMT *   Weekday, DD-Mon-YY HH:MM:SS GMT *   Weekday, DD-Mon-YYYY HH:MM:SS GMT *   Tue May 21 13:46:22 1991\n *   Tue May 21 13:46:22 1991 * * (return 0 on malformed date string syntax) */static time_t Cookies_create_timestamp(const char *expires){   time_t ret;   int day, month, year, hour, minutes, seconds;   gchar *cp;   gchar *E_msg =      "Expire date is malformed!\n"      " (should be RFC-1123 | RFC-850 | ANSI asctime)\n"      " Ignoring cookie: ";   cp = strchr(expires, ',');   if (!cp && (strlen(expires) == 24 || strlen(expires) == 25)) {      /* Looks like ANSI asctime format... */      cp = (gchar *)expires;      day = strtol(cp + 8, NULL, 10);       /* day */      month = Cookies_get_month(cp + 4);    /* month */      year = strtol(cp + 20, NULL, 10);     /* year */      hour = strtol(cp + 11, NULL, 10);     /* hour */      minutes = strtol(cp + 14, NULL, 10);  /* minutes */      seconds = strtol(cp + 17, NULL, 10);  /* seconds */   } else if (cp && (cp - expires == 3 || cp - expires > 5) &&                    (strlen(cp) == 24 || strlen(cp) == 26)) {      /* RFC-1123 | RFC-850 format | Old Netscape format */      day = strtol(cp + 2, NULL, 10);      month = Cookies_get_month(cp + 5);      year = strtol(cp + 9, &cp, 10);      /* todo: tricky, because two digits for year IS ambiguous! */      year += (year < 70) ? 2000 : ((year < 100) ? 1900 : 0);      hour = strtol(cp + 1, NULL, 10);      minutes = strtol(cp + 4, NULL, 10);      seconds = strtol(cp + 7, NULL, 10);   } else {      MSG("%s%s\n", E_msg, expires);      return (time_t) 0;   }   /* Error checks  --this may be overkill */   if (!(day > 0 && day < 32 && month > 0 && month < 13 && year > 1970 &&         hour >= 0 && hour < 24 && minutes >= 0 && minutes < 60 &&         seconds >= 0 && seconds < 60)) {      MSG("%s%s\n", E_msg, expires);      return (time_t) 0;   }   /* Calculate local timestamp.    * [stolen from Lynx... (http://lynx.browser.org)] */   month -= 3;   if (month < 0) {      month += 12;      year--;   }   day += (year - 1968) * 1461 / 4;   day += ((((month * 153) + 2) / 5) - 672);   ret = (time_t)((day * 60 * 60 * 24) +                  (hour * 60 * 60) +                  (minutes * 60) +                  seconds);   MSG("Expires in %ld seconds, at %s",       (long)ret - time(NULL), ctime(&ret));   return ret;}/* * Parse a string containing a list of port numbers. */static void Cookies_parse_ports(gint url_port, CookieData_t *cookie,                                const char *port_str){   if ((!port_str || !port_str[0]) && url_port != 0) {      /* There was no list, so only the calling urls port should be allowed. */      cookie->ports = g_list_append(cookie->ports,                                    GINT_TO_POINTER(url_port));   } else if (port_str[0] == '"' && port_str[1] != '"') {      char **tokens, **i;      int port;      tokens = g_strsplit(port_str + 1, ",", -1);      for (i = tokens; *i; ++i) {         port = strtol(*i, NULL, 10);         if (port > 0) {            cookie->ports = g_list_append(cookie->ports,                                          GINT_TO_POINTER(port));         }      }      g_strfreev(tokens);   }}/* * Build a string of the ports in 'cookie'. */static char *Cookies_build_ports_str(CookieData_t *cookie){   GString *gstr;   GList *list;   char *ret;   gstr = g_string_new("\"");   for (list = cookie->ports; list; list = g_list_next(list))      g_string_sprintfa(gstr, "%d,", GPOINTER_TO_INT(list->data));   /* Remove any trailing comma */   if (gstr->len > 1)      g_string_erase(gstr, gstr->len - 1, 1);   g_string_append(gstr, "\"");   ret = gstr->str;   g_string_free(gstr, FALSE);   return ret;}/* * Used by g_list_insert_sorted() to sort the cookies by most specific path */static gint Cookies_compare(gconstpointer a, gconstpointer b){   const CookieData_t *ca = a, *cb = b;   return strcmp(ca->path, cb->path);}static void Cookies_add_cookie(CookieData_t *cookie){   GList *domain_cookies, *tmp;   char *domain_str;   /* Don't add an expired cookie */   if (!cookie->session_only && cookie->expires_at < time(NULL)) {      Cookies_free_cookie(cookie);      return;   }   domain_cookies = g_hash_table_lookup(cookies, cookie->domain);   if (domain_cookies) {      /* Respect the limit of 20 cookies per domain */      if (g_list_length(domain_cookies) > 20) {         MSG("There are too many cookies for this domain (%s)\n",             cookie->domain);         Cookies_free_cookie(cookie);         return;      }      /* Remove any cookies with the same name and path */      while ((tmp = g_list_find_custom(domain_cookies, cookie,                                       Cookies_equals))) {         Cookies_remove_cookie(tmp->data);         domain_cookies = g_hash_table_lookup(cookies, cookie->domain);      }   }   /* Allocate string key when no domain_cookies are left    * (because remove_cookie has then killed the key, when it was there) */   domain_str = domain_cookies ? cookie->domain : g_strdup(cookie->domain);   domain_cookies = g_list_insert_sorted(domain_cookies, cookie,                                         Cookies_compare);   g_hash_table_insert(cookies, domain_str, domain_cookies);}/* * Remove the cookie from the domain list. * If the domain list is empty, free the hash table entry. * Free the cookie. */static void Cookies_remove_cookie(CookieData_t *cookie){   GList *list;   gpointer orig_key;   gpointer orig_val;   if (g_hash_table_lookup_extended(cookies, cookie->domain,                                    &orig_key, &orig_val)) {      list = g_list_remove(orig_val, cookie);      if (list) {         /* Make sure that we have the correct start of the list stored */         g_hash_table_insert(cookies, cookie->domain, list);      } else {         g_hash_table_remove(cookies, cookie->domain);         g_free(orig_key);      }   } else {      MSG("Attempting to remove a cookie that doesn't exist!\n");   }   Cookies_free_cookie(cookie);}/* * Return the attribute that is present at *cookie_str. This function * will also attempt to advance cookie_str past any equal-sign. */static char *Cookies_parse_attr(char **cookie_str){   char *str = *cookie_str;   guint i, end = 0;   gboolean got_attr = FALSE;   for (i = 0; ; i++) {      switch (str[i]) {      case ' ':      case '\t':      case '=':      case ';':         got_attr = TRUE;         if (end == 0)            end = i;         break;      case ',':         *cookie_str = str + i;         return g_strndup(str, i);         break;      case '\0':         if (!got_attr) {            end = i;            got_attr = TRUE;         }         /* fall through! */      default:         if (got_attr) {            *cookie_str = str + i;            return g_strndup(str, end);         }         break;      }   }   return NULL;}/* * Get the value starting at *cookie_str. * broken_syntax: watch out for stupid syntax (comma in unquoted string...) */static char *Cookies_parse_value(char **cookie_str,                                 gboolean broken_syntax,                                 gboolean keep_quotes){   guint i, end;   char *str = *cookie_str;   for (i = end = 0; !end; ++i) {      switch (str[i]) {      case ' ':      case '\t':         if (!broken_syntax && str[0] != '\'' && str[0] != '"') {            *cookie_str = str + i + 1;            end = 1;         }         break;      case '\'':      case '"':         if (i != 0 && str[i] == str[0]) {            char *tmp = str + i;            while (*tmp != '\0' && *tmp != ';' && *tmp != ',')               tmp++;            *cookie_str = (*tmp == ';') ? tmp + 1 : tmp;            if (keep_quotes)               i++;            end = 1;         }         break;      case '\0':         *cookie_str = str + i;         end = 1;         break;      case ',':         if (str[0] != '\'' && str[0] != '"' && !broken_syntax) {            /* A new cookie starts here! */            *cookie_str = str + i;            end = 1;         }         break;      case ';':         if (str[0] != '\'' && str[0] != '"') {            *cookie_str = str + i + 1;            end = 1;         }         break;      default:         break;      }   }   /* keep i as an index to the last char */   --i;   if ((str[0] == '\'' || str[0] == '"') && !keep_quotes) {      return i > 1 ? g_strndup(str + 1, i - 1) : NULL;   } else {      return g_strndup(str, i);   }}/* * Parse one cookie... */static CookieData_t *Cookies_parse_one(gint url_port, char **cookie_str){   CookieData_t *cookie;   char *str = *cookie_str;   char *attr;   char *value;   int num_attr = 0;   gboolean max_age = FALSE;   gboolean discard = FALSE;   cookie = g_new0(CookieData_t, 1);   cookie->session_only = TRUE;   /* Iterate until there is nothing left of the string OR we come    * across a comma representing the start of another cookie */   while (*str != '\0' && *str != ',') {      /* Skip whitespace */      while (isspace(*str))         str++;      /* Get attribute */      attr = Cookies_parse_attr(&str);      if (!attr) {         MSG("Failed to parse cookie attribute!\n");         Cookies_free_cookie(cookie);         return NULL;      }      /* Get the value for the attribute and store it */      if (num_attr == 0) {         /* The first attr, which always is the user supplied attr, may          * have the same name as an ordinary attr. Hence this workaround. */         cookie->name = g_strdup(attr);         cookie->value = Cookies_parse_value(&str, FALSE, TRUE);      } else if (g_strcasecmp(attr, "Path") == 0) {         value = Cookies_parse_value(&str, FALSE, FALSE);         cookie->path = value;      } else if (g_strcasecmp(attr, "Domain") == 0) {         value = Cookies_parse_value(&str, FALSE, FALSE);         cookie->domain = value;      } else if (g_strcasecmp(attr, "Discard") == 0) {         cookie->session_only = TRUE;         discard = TRUE;      } else if (g_strcasecmp(attr, "Max-Age") == 0) {         if (!discard) {            value = Cookies_parse_value(&str, FALSE, FALSE);            if (value) {               cookie->expires_at = time(NULL) + strtol(value, NULL, 10);               cookie->session_only = FALSE;               max_age = TRUE;               g_free(value);            } else {               MSG("Failed to parse cookie value!\n");               Cookies_free_cookie(cookie);               return NULL;            }         }      } else if (g_strcasecmp(attr, "Expires") == 0) {         if (!max_age && !discard) {            MSG("Old netscape-style cookie...\n");            value = Cookies_parse_value(&str, TRUE, FALSE);            if (value) {               cookie->expires_at = Cookies_create_timestamp(value);               cookie->session_only = FALSE;               g_free(value);            } else {               MSG("Failed to parse cookie value!\n");               Cookies_free_cookie(cookie);               return NULL;            }         }      } else if (g_strcasecmp(attr, "Port") == 0) {         value = Cookies_parse_value(&str, FALSE, TRUE);         Cookies_parse_ports(url_port, cookie, value);         g_free(value);      } else if (g_strcasecmp(attr, "Comment") == 0) {         value = Cookies_parse_value(&str, FALSE, FALSE);         cookie->comment = value;      } else if (g_strcasecmp(attr, "CommentURL") == 0) {         value = Cookies_parse_value(&str, FALSE, FALSE);         cookie->comment_url = value;      } else if (g_strcasecmp(attr, "Version") == 0) {         value = Cookies_parse_value(&str, FALSE, FALSE);         if (value) {            cookie->version = strtol(value, NULL, 10);            g_free(value);         } else {            MSG("Failed to parse cookie value!\n");            Cookies_free_cookie(cookie);            return NULL;         }      } else if (g_strcasecmp(attr, "Secure") == 0) {         cookie->secure = TRUE;      } else {         /* Oops! this can't be good... */         g_free(attr);         Cookies_free_cookie(cookie);         MSG("Cookie contains illegal attribute!\n");         return NULL;      }      g_free(attr);      num_attr++;   }   *cookie_str = (*str == ',') ? str + 1 : str;   if (cookie->name && cookie->value) {      return cookie;   } else {      MSG("Cookie missing name and/or value!\n");      Cookies_free_cookie(cookie);      return NULL;   }}/* * Iterate the cookie string until we catch all cookies. * Return Value: a list with all the cookies! (or NULL upon error) */static GSList *Cookies_parse_string(gint url_port, char *cookie_string){   CookieData_t *cookie;   GSList *ret = NULL;   char *str = cookie_string;   /* The string may contain several cookies separated by comma.    * We'll iterate until we've catched them all */   while (*str) {      cookie = Cookies_parse_one(url_port, &str);      if (cookie) {         ret = g_slist_append(ret, cookie);      } else {         MSG("Malformed cookie field, ignoring cookie: %s\n", cookie_string);         return NULL;      }   }   return ret;}/* * Compare cookies by name and path (return 0 if equal) */static gint Cookies_equals(gconstpointer a, gconstpointer b){   const CookieData_t *ca = a, *cb = b;   return (strcmp(ca->name, cb->name) || strcmp(ca->path, cb->path));}/* * Validate cookies domain against some security checks. */static gboolean Cookies_validate_domain(CookieData_t *cookie, gchar *host,                                         gchar *url_path){   int dots, diff, i;   gboolean is_ip;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲3atv精品一区二区三区| 国产在线麻豆精品观看| 精品国产一区二区国模嫣然| 欧美天堂亚洲电影院在线播放| 成人午夜电影小说| 国产麻豆视频精品| 国产麻豆91精品| 国产成人av电影在线| 国产成人精品免费网站| 丁香六月综合激情| 91久久线看在观草草青青| 91免费看片在线观看| 99久久精品情趣| 99综合电影在线视频| 成人国产在线观看| 99久久精品国产毛片| 欧美性大战久久久久久久| 337p日本欧洲亚洲大胆色噜噜| 精品国产网站在线观看| 亚洲视频一二区| 亚洲国产精品一区二区www| 亚洲电影欧美电影有声小说| 国产精品一区在线观看乱码 | 国产传媒日韩欧美成人| 色视频成人在线观看免| 欧美性一级生活| 精品盗摄一区二区三区| 亚洲尤物在线视频观看| 午夜欧美一区二区三区在线播放| 日本亚洲三级在线| 国产真实乱对白精彩久久| 在线中文字幕一区二区| 日韩免费观看高清完整版| 精品国产一二三区| 亚洲成av人片| 色综合久久综合中文综合网| 久久精子c满五个校花| 亚洲欧美综合在线精品| 亚洲一级二级在线| 成人在线视频首页| 精品久久久久久久久久久久包黑料 | 国产亚洲欧美一级| 日韩电影在线免费| 91久久国产综合久久| 国产欧美一二三区| 亚洲最色的网站| 久久精品久久综合| 91亚洲精品久久久蜜桃网站| 精品成人一区二区| 日本午夜一本久久久综合| 91亚洲国产成人精品一区二区三| 久久综合色8888| 日本vs亚洲vs韩国一区三区二区| 高清在线不卡av| 精品国产乱码久久久久久1区2区| 丝袜亚洲另类欧美综合| 国产suv精品一区二区三区| 91精品国产欧美一区二区18| 欧美国产精品专区| 亚洲v日本v欧美v久久精品| 91丨porny丨最新| 亚洲国产精品激情在线观看| 国产在线精品不卡| 久久丝袜美腿综合| 精品写真视频在线观看| 日本精品一区二区三区高清 | 国产真实精品久久二三区| 欧美一区国产二区| 丝袜a∨在线一区二区三区不卡| 欧美在线视频日韩| 国产网站一区二区| 国产乱码精品一区二区三区忘忧草 | 中文字幕在线一区| 日产欧产美韩系列久久99| 欧美视频一区二区在线观看| 一区2区3区在线看| 欧美视频一区二区| 日韩电影免费一区| 欧美一级艳片视频免费观看| 麻豆成人综合网| 欧日韩精品视频| 一区二区三区日韩欧美| 欧美亚日韩国产aⅴ精品中极品| 亚洲影院久久精品| 欧美精品一二三四| 亚洲精品成a人| 国产高清亚洲一区| 国产日韩欧美电影| 成人高清视频在线观看| 亚洲免费观看高清| 不卡电影一区二区三区| 国产精品第13页| 在线日韩国产精品| 午夜电影一区二区三区| 欧美一区二区三区视频| 狠狠网亚洲精品| 国产精品久久久久久久久搜平片| 91网站最新网址| 午夜精品久久久久影视| 精品少妇一区二区三区在线播放| 国产美女精品在线| 《视频一区视频二区| 欧美亚洲丝袜传媒另类| 免费精品视频在线| 国产亚洲欧美日韩在线一区| 91在线你懂得| 日本大胆欧美人术艺术动态| 久久久久久久久久美女| 美女视频黄免费的久久| 久久精品视频免费观看| 91网上在线视频| 日本成人在线不卡视频| 国产亚洲欧美一级| 欧美少妇一区二区| 国产麻豆9l精品三级站| 一区二区三区成人| 欧美刺激脚交jootjob| 成人国产在线观看| 日韩av一级片| 国产精品久久免费看| 欧美精品久久一区| 国产.欧美.日韩| 日韩成人一区二区三区在线观看| 国产欧美一区二区精品性色超碰| 在线亚洲+欧美+日本专区| 久久国产欧美日韩精品| 综合久久国产九一剧情麻豆| 91精品在线免费| 蜜桃精品视频在线| 亚洲欧洲三级电影| 日韩小视频在线观看专区| 久久精品国产澳门| 悠悠色在线精品| 久久久久久久精| 欧美人与z0zoxxxx视频| 奇米精品一区二区三区在线观看 | 波多野结衣91| 日日夜夜免费精品| 亚洲色图都市小说| 久久亚洲精品国产精品紫薇| 欧美三日本三级三级在线播放| 亚洲成人免费在线| 中文字幕亚洲精品在线观看| 欧美一区二区久久| 欧亚洲嫩模精品一区三区| 成人综合婷婷国产精品久久免费| 日韩精品成人一区二区在线| 亚洲欧美成aⅴ人在线观看| 国产日韩v精品一区二区| 91精品国产综合久久香蕉麻豆 | 亚洲福利国产精品| 国产精品污www在线观看| 一本久久综合亚洲鲁鲁五月天 | 国产欧美日韩另类视频免费观看| 欧美久久久久久蜜桃| 91在线高清观看| 成人精品视频一区二区三区| 精品一区二区在线播放| 日本中文在线一区| 一区二区高清视频在线观看| 自拍av一区二区三区| 久久久一区二区三区捆绑**| 日韩一区二区在线观看| 欧美伊人久久久久久午夜久久久久| 成人动漫一区二区三区| 国产精品123| 国产一区91精品张津瑜| 国内精品自线一区二区三区视频| 蜜臀av一区二区在线观看| 三级成人在线视频| 图片区日韩欧美亚洲| 亚洲综合激情小说| 亚洲另类春色国产| 亚洲天堂a在线| 亚洲三级视频在线观看| 国产精品久久久久久妇女6080| 欧美激情中文字幕| 国产三级精品视频| 国产女人水真多18毛片18精品视频| 2017欧美狠狠色| www久久久久| 国产视频一区二区在线| 国产午夜精品在线观看| 国产欧美日韩综合精品一区二区| 国产午夜精品美女毛片视频| 国产日韩欧美麻豆| 国产精品国产三级国产普通话99| 国产精品国产自产拍高清av王其| 国产精品久久久久婷婷二区次| 亚洲欧洲99久久| 一区二区高清在线| 日日夜夜一区二区| 另类的小说在线视频另类成人小视频在线 | 国产一区二区福利视频| 国产精品自产自拍| 成人av电影在线观看| 色综合中文综合网| 日韩精品成人一区二区在线| 日韩 欧美一区二区三区| 麻豆国产精品视频|