Beispiel #1
0
        public static string GetCookieString1(string string_0)
        {
            string        str;
            int           num           = 256;
            StringBuilder stringBuilder = new StringBuilder(256);

            if (!GetCookie.InternetGetCookie(string_0, null, stringBuilder, ref num))
            {
                if (num >= 0)
                {
                    stringBuilder = new StringBuilder(num);
                    if (GetCookie.InternetGetCookie(string_0, null, stringBuilder, ref num))
                    {
                        str = stringBuilder.ToString();
                        return(str);
                    }
                    str = null;
                    return(str);
                }
                else
                {
                    str = null;
                    return(str);
                }
            }
            str = stringBuilder.ToString();
            return(str);
        }
Beispiel #2
0
 public static void clearIECookie()
 {
     try
     {
         GetCookie.ShellExecute(IntPtr.Zero, "open", "rundll32.exe", " InetCpl.cpl,ClearMyTracksByProcess 255", "", GetCookie.ShowCommands.SW_HIDE);
         string[] files     = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache), "*", SearchOption.AllDirectories);
         string[] strArrays = files;
         for (int i = 0; i < (int)strArrays.Length; i++)
         {
             string str = strArrays[i];
             try
             {
                 File.Delete(str);
             }
             catch
             {
             }
         }
     }
     catch
     {
     }
 }
Beispiel #3
0
 public static bool checkAlimamaLogin()
 {
     return(AlimamaSvc.checkAlimamaLogin(GetCookie.GetCookieString("http://www.alimama.com")));
 }