예제 #1
0
        private void SetCookie(HttpClient httpClient, RequestUrlAndReferer requestUrlAndReferer, IPMetaDataItem mdi)
        {
            httpClient.DefaultRequestHeaders.Remove("Cookie");
            string guidStr  = Guid.NewGuid().ToString().ToUpper();
            string guidStr1 = Guid.NewGuid().ToString().ToUpper();
            string dateTime = DateTime.Now.AddDays(-random.Next(10)).ToString();
            string cookie   = string.Format("fvlid={1}; " +
                                            "sessionid={2}{6} " +
                                            "autoid={7}; " +
                                            "ahpau=1; __ah_uuid_ng=c_{3}; " +
                                            "sessionip={0}; " +
                                            "sessionvid={8}; " +
                                            "area=119999; v_no=0; visit_info_ad={4}||{9}||-1||-1||4; ref={5}"
                                            , mdi.outip, requestUrlAndReferer.fvlid,
                                            guidStr, guidStr, guidStr,
                                            HttpUtility.UrlEncode(string.Format("0|0|0|0|{0}|{1}", DateTime.Now.ToString(), dateTime))
                                            , HttpUtility.UrlEncode(string.Format("||{0}||0; ", dateTime)),
                                            Z.GetMD5LowerString(guidStr),
                                            guidStr1, guidStr1
                                            );

            httpClient.DefaultRequestHeaders.Add("Cookie", cookie);
            httpClient.DefaultRequestHeaders.Remove("Referer");
            httpClient.DefaultRequestHeaders.Add("Referer", requestUrlAndReferer.referer);
        }
예제 #2
0
        private void SetCookie(HttpClient httpClient, RequestUrlAndReferer requestUrlAndReferer, IPMetaDataItem mdi)
        {
            httpClient.DefaultRequestHeaders.Remove("Cookie");

            //this.guidStr = Guid.NewGuid().ToString().ToUpper();
            ////string guidStr1 = Guid.NewGuid().ToString().ToUpper();
            //string dateTime = DateTime.Now.AddDays(-random.Next(10)).ToString();
            //string cookie = string.Format("fvlid={1}; " +
            //    "sessionid={2}{6} " +
            //    "autoid={7}; " +
            //    "ahpau=1; __ah_uuid_ng=c_{3}; " +
            //    "sessionip={0}; " +
            //    "sessionvid=681B9A1B-2EC5-4194-8437-33DEFB091DEA; " +
            //    "area=119999; v_no=0; visit_info_ad={4}||681B9A1B-2EC5-4194-8437-33DEFB091DEA||-1||-1||4; ref={5}"
            //    , mdi.outip, mdi.fvlid,
            //    this.guidStr, this.guidStr, this.guidStr,
            //    HttpUtility.UrlEncode(string.Format("0|0|0|0|{0}|{1}", DateTime.Now.ToString(), dateTime))
            //    , HttpUtility.UrlEncode(string.Format("||{0}||0; ", dateTime)),
            //    Z.GetMD5LowerString(this.guidStr)
            //    );

            //string cookie = string.Format("fvlid={1}; " +
            //    "sessionid=C0B882EA-FEDC-43CA-8E9F-B322F35528C8%7C%7C2020-07-25+12%3A38%3A50.381%7C%7C0; " +
            //    "autoid=c933fac8868713f3f0e2d3d4b83f16b0; " +
            //    "ahpau=1; __ah_uuid_ng=c_C0B882EA-FEDC-43CA-8E9F-B322F35528C8; " +
            //    "sessionip={0}; " +
            //    "sessionvid=681B9A1B-2EC5-4194-8437-33DEFB091DEA; " +
            //    "area=119999; v_no=0; visit_info_ad=C0B882EA-FEDC-43CA-8E9F-B322F35528C8||681B9A1B-2EC5-4194-8437-33DEFB091DEA||-1||-1||4; ref=0%7C0%7C0%7C0%7C2020-08-02+08%3A00%3A14.918%7C2020-07-25+12%3A38%3A50.381"
            //    , mdi.outip, requestUrlAndReferer.fvlid);

            //this.guidStr = Guid.NewGuid().ToString().ToUpper();
            //this.guidStr1 = Guid.NewGuid().ToString().ToUpper();
            //string dateTime = DateTime.Now.AddDays(-random.Next(10)).ToString();
            //string cookie = string.Format("fvlid={1}; " +
            //    "sessionid={2}{6} " +
            //    "autoid={7}; " +
            //    "ahpau=1; __ah_uuid_ng=c_{3}; " +
            //    "sessionip={0}; " +
            //    "sessionvid={8}; " +
            //    "area=330199; v_no=1; visit_info_ad={4}||{9}||-1||-1||1; ref={5}"
            //    , mdi.outip, mdi.fvlid,
            //    this.guidStr, this.guidStr, this.guidStr,
            //    HttpUtility.UrlEncode(string.Format("0|0|0|0|{0}|{1}", DateTime.Now.ToString(), dateTime))
            //    , HttpUtility.UrlEncode(string.Format("||{0}||0; ", dateTime)),
            //    Z.GetMD5LowerString(this.guidStr),
            //     this.guidStr1, this.guidStr1
            //    );

            //string cookie = string.Format("fvlid={1}; " +
            //   "sessionid=EC51C026-F4BB-4AB0-9872-993F6CFF34A8%7C%7C2020-10-14+18%3A20%3A47.654%7C%7C0; " +
            //   "autoid=31bf984e655c9fe48f14c7176521ee08; " +
            //   "ahpau=1; __ah_uuid_ng=c_EC51C026-F4BB-4AB0-9872-993F6CFF34A8; " +
            //   "sessionip={0}; " +
            //   "sessionvid=52CD437F-1054-4AD5-A7F4-345B803C41AA; " +
            //   "area=330199; v_no=1; visit_info_ad=EC51C026-F4BB-4AB0-9872-993F6CFF34A8||52CD437F-1054-4AD5-A7F4-345B803C41AA||-1||-1||1; ref=0%7C0%7C0%7C0%7C2020-12-13+15%3A16%3A28.794%7C2020-10-14+18%3A20%3A47.654"
            //   , mdi.outip, mdi.fvlid);
            //httpClient.DefaultRequestHeaders.Add("Cookie", cookie);
            httpClient.DefaultRequestHeaders.Remove("Referer");
            //httpClient.DefaultRequestHeaders.Add("Referer", requestUrlAndReferer.referer);
        }