Exemple #1
0
 public void mail263_txt(string yahoo_txtPath, bool Auto, string cookieRemarks)
 {
     string strCookie = "";
     string str2 = "";
     int index = 0;
     int num2 = 0;
     string s = "";
     DateTime now = DateTime.Now;
     string str4 = "";
     StreamReader reader = new StreamReader(yahoo_txtPath, Encoding.Default);
     while ((strCookie = reader.ReadLine()) != null)
     {
         if (strCookie.Length > 0x19)
         {
             index = strCookie.IndexOf("DATE:");
             if (index != -1)
             {
                 num2 = strCookie.IndexOf("URL:");
                 if (num2 != -1)
                 {
                     s = strCookie.Substring(index + 5, num2 - (index + 5)).Trim();
                     if (s != "")
                     {
                         now = DateTime.Parse(s);
                     }
                     index = strCookie.IndexOf("Cookies:");
                     if (index != -1)
                     {
                         str4 = strCookie.Substring(num2 + 4, index - (num2 + 4)).Trim();
                         if (str4.Length == 0)
                         {
                             this.listBoxView.Items.Add("Url不正确请检查");
                             this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                             continue;
                         }
                         strCookie = strCookie.Substring(index + 8, strCookie.Length - (index + 8));
                     }
                 }
                 else
                 {
                     this.listBoxView.Items.Add("Url不正确请检查");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                 }
             }
             if ((str4 != "") && (str4 != null))
             {
                 str2 = this.get263Cookie(strCookie);
                 if (str2 == "")
                 {
                     this.listBoxView.Items.Add("转换失败!");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                 }
                 else
                 {
                     this.listBoxView.Items.Add("转换成功!");
                     CookieInfos cookieInfo = new CookieInfos();
                     cookieInfo.mailCookieType = "263";
                     cookieInfo.mailCookieUrl = str4;
                     cookieInfo.cookieTxx = str2;
                     cookieInfo.nowTime = now.ToString();
                     cookieInfo.UserList = this.UserList;
                     cookieInfo.Auto = Auto;
                     cookieInfo.cookieRemarks = cookieRemarks;
                     try
                     {
                         if (!this.EnqueueCookie(cookieInfo))
                         {
                             this.listBoxView.Items.Add("添加cookie失败:");
                             this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                         }
                         continue;
                     }
                     catch
                     {
                         this.listBoxView.Items.Add("写入cookie失败:");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                         continue;
                     }
                 }
             }
         }
     }
     reader.Close();
     this.ThreadCookies = this.MaxThreads;
 }
Exemple #2
0
 public void gmail_txt(string yahoo_txtPath, bool Auto, string cookieRemarks)
 {
     string str = "";
     string str2 = "";
     int index = 0;
     int num2 = 0;
     string s = "";
     DateTime now = DateTime.Now;
     StreamReader reader = new StreamReader(yahoo_txtPath, Encoding.Default);
     while ((str = reader.ReadLine()) != null)
     {
         now = now.AddSeconds(1.0);
         if (str.Length > 0x19)
         {
             index = str.IndexOf("DATE:");
             if (index != -1)
             {
                 num2 = str.IndexOf("URL:");
                 if (num2 != -1)
                 {
                     s = str.Substring(index + 5, num2 - (index + 5)).Trim();
                     if (s != "")
                     {
                         now = DateTime.Parse(s);
                     }
                     index = str.IndexOf("Cookies:");
                     if (index != -1)
                     {
                         str = str.Substring(index + 8, str.Length - (index + 8));
                     }
                 }
             }
             str2 = str;
             if (str2 == "")
             {
                 this.listBoxView.Items.Add("转换失败!");
                 this.listBoxView.SelectedIndex = GlobalValue.mainForm.listBoxView.Items.Count - 1;
             }
             else
             {
                 this.listBoxView.Items.Add("转换成功!");
                 CookieInfos cookieInfo = new CookieInfos();
                 cookieInfo.mailCookieType = "GMAIL";
                 cookieInfo.mailCookieUrl = "mail.google.com";
                 cookieInfo.cookieTxx = str2;
                 cookieInfo.nowTime = now.ToString();
                 cookieInfo.UserList = this.UserList;
                 cookieInfo.Auto = Auto;
                 cookieInfo.cookieRemarks = cookieRemarks;
                 try
                 {
                     if (!this.EnqueueCookie(cookieInfo))
                     {
                         this.listBoxView.Items.Add("添加cookie失败:");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     }
                     continue;
                 }
                 catch
                 {
                     this.listBoxView.Items.Add("写入cookie失败:");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     continue;
                 }
             }
         }
     }
     reader.Close();
     this.ThreadCookies = this.MaxThreads;
 }
Exemple #3
0
 public void mail163_txt(string yahoo_txtPath, bool Auto, string cookieRemarks)
 {
     string strCookie = "";
     string message = "";
     int index = 0;
     int num2 = 0;
     string s = "";
     DateTime now = DateTime.Now;
     string str5 = "";
     StreamReader reader = new StreamReader(yahoo_txtPath, Encoding.Default);
     while ((strCookie = reader.ReadLine()) != null)
     {
         if (strCookie.Length > 0x19)
         {
             index = strCookie.IndexOf("DATE:");
             if (index != -1)
             {
                 num2 = strCookie.IndexOf("URL:");
                 if (num2 != -1)
                 {
                     s = strCookie.Substring(index + 5, num2 - (index + 5)).Trim();
                     if (s != "")
                     {
                         now = DateTime.Parse(s);
                     }
                     index = strCookie.IndexOf("Cookies:");
                     if (index != -1)
                     {
                         str5 = strCookie.Substring(num2 + 4, index - (num2 + 4)).Trim();
                         strCookie = strCookie.Substring(index + 8, strCookie.Length - (index + 8)).Trim();
                     }
                 }
             }
             if (str5.IndexOf("fm163.163.com") != -1)
             {
                 message = this.get163MailCookieNTES_SESS(strCookie);
             }
             else if (str5.IndexOf("mail.163.com") != -1)
             {
                 message = this.get163MailCookieCoremail(strCookie);
             }
             else
             {
                 string str6 = "";
                 message = this.get163MailCookieCoremailNETEASE_SSN(strCookie);
                 if (message != "")
                 {
                     str6 = this.putstr(message, "Coremail=", " ", 0);
                     if ((str6 != "-1") && (str6.IndexOf("%") != -1))
                     {
                         str6 = this.putstr(str6, "%", ";", 0);
                         if (str6 != "-1")
                         {
                             string str7 = "";
                             str7 = this.get163wmsvr_domain(strCookie);
                             if (str7 != "")
                             {
                                 str7 = str7.Trim(new char[] { ';' });
                                 str5 = "http://" + str7 + "/js3/index.jsp?sid=" + str6;
                             }
                             else
                             {
                                 this.listBoxView.Items.Add("Url不正确");
                                 this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                             }
                         }
                         else
                         {
                             this.listBoxView.Items.Add("缺少必须的Cookie");
                             this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                             continue;
                         }
                     }
                 }
             }
             if ((message == "") || (str5 == ""))
             {
                 this.listBoxView.Items.Add("转换失败!");
                 this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
             }
             else
             {
                 this.listBoxView.Items.Add("转换成功!");
                 CookieInfos cookieInfo = new CookieInfos();
                 cookieInfo.mailCookieType = "163";
                 cookieInfo.mailCookieUrl = str5;
                 cookieInfo.cookieTxx = message;
                 cookieInfo.nowTime = now.ToString();
                 cookieInfo.UserList = this.UserList;
                 cookieInfo.Auto = Auto;
                 cookieInfo.cookieRemarks = cookieRemarks;
                 try
                 {
                     if (!this.EnqueueCookie(cookieInfo))
                     {
                         this.listBoxView.Items.Add("添加cookie失败:");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     }
                     continue;
                 }
                 catch
                 {
                     this.listBoxView.Items.Add("写入cookie失败:");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     continue;
                 }
             }
         }
     }
     reader.Close();
     this.ThreadCookies = this.MaxThreads;
 }
Exemple #4
0
 public void CNmail_txt(string sina_txtPath, bool Auto, string cookieRemarks)
 {
     string str = "";
     int index = 0;
     int num2 = 0;
     string s = "";
     DateTime now = DateTime.Now;
     string str4 = "";
     StreamReader reader = new StreamReader(sina_txtPath, Encoding.Default);
     while ((str = reader.ReadLine()) != null)
     {
         if (str.Length > 0x19)
         {
             index = str.IndexOf("DATE:");
             if (index != -1)
             {
                 num2 = str.IndexOf("URL");
                 if (num2 != -1)
                 {
                     s = str.Substring(index + 5, num2 - (index + 5)).Trim();
                     if (s != "")
                     {
                         now = DateTime.Parse(s);
                     }
                     index = str.IndexOf("Cookies:");
                     if (index != -1)
                     {
                         str4 = str.Substring(num2 + 4, index - (num2 + 4)).Trim();
                         str = str.Substring(index + 8, str.Length - (index + 8)).Trim();
                     }
                     if (str4 == "")
                     {
                         if (str.IndexOf("21cn.com") != -1)
                         {
                             str4 = "http://hermesw2.webmail.21cn.com/webmail/signOn.do";
                         }
                         else
                         {
                             str4 = "http://hermesw2.webmail.21cn.net/webmail/signOn.do";
                         }
                     }
                 }
             }
             if (str4 == "")
             {
                 this.listBoxView.Items.Add("转换失败!");
                 this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
             }
             else
             {
                 this.listBoxView.Items.Add("转换成功!");
                 CookieInfos cookieInfo = new CookieInfos();
                 cookieInfo.mailCookieType = "21CNMAIL";
                 cookieInfo.mailCookieUrl = str4;
                 cookieInfo.cookieTxx = str;
                 cookieInfo.nowTime = now.ToString();
                 cookieInfo.UserList = this.UserList;
                 cookieInfo.Auto = Auto;
                 cookieInfo.cookieRemarks = cookieRemarks;
                 try
                 {
                     if (!this.EnqueueCookie(cookieInfo))
                     {
                         this.listBoxView.Items.Add("添加cookie失败:");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     }
                     continue;
                 }
                 catch
                 {
                     this.listBoxView.Items.Add("写入cookie失败:");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     continue;
                 }
             }
         }
     }
     reader.Close();
     this.ThreadCookies = this.MaxThreads;
 }
Exemple #5
0
 private bool EnqueueCookie(CookieInfos cookieInfo)
 {
     Monitor.Enter(this.queueCookies);
     try
     {
         this.queueCookies.Enqueue(cookieInfo);
     }
     catch (Exception exception)
     {
         this.listBoxView.Items.Add("写入用户索引失败:" + exception.Message);
     }
     Monitor.Exit(this.queueCookies);
     return true;
 }
Exemple #6
0
 private CookieInfos DequeueCookie()
 {
     CookieInfos infos = new CookieInfos();
     Monitor.Enter(this.queueCookies);
     try
     {
         infos = (CookieInfos)this.queueCookies.Dequeue();
     }
     catch (Exception)
     {
     }
     Monitor.Exit(this.queueCookies);
     return infos;
 }
Exemple #7
0
 public void yahoo_txt(string yahoo_txtPath, bool Auto, string cookieRemarks)
 {
     string strCookie = "";
     string str2 = "MISS";
     string str3 = "";
     int startIndex = 0;
     int index = 0;
     int num3 = 0;
     string s = "";
     DateTime now = DateTime.Now;
     StreamReader reader = new StreamReader(yahoo_txtPath, Encoding.Default);
     while ((strCookie = reader.ReadLine()) != null)
     {
         now = now.AddSeconds(1.0);
         if (strCookie.Length > 0x19)
         {
             startIndex = strCookie.IndexOf("YM.LC=");
             if (startIndex >= 0)
             {
                 str2 = strCookie.Substring(startIndex, strCookie.Length - startIndex);
                 startIndex = str2.IndexOf(";");
                 if (startIndex >= 0)
                 {
                     str2 = str2.Substring(0, startIndex);
                     startIndex = str2.IndexOf("&u=");
                     if (startIndex > 0)
                     {
                         str2 = str2.Substring(startIndex + 3, str2.Length - (startIndex + 3));
                     }
                 }
             }
             index = strCookie.IndexOf("DATE:");
             if (index != -1)
             {
                 num3 = strCookie.IndexOf("URL:");
                 if (num3 != -1)
                 {
                     s = strCookie.Substring(index + 5, num3 - (index + 5)).Trim();
                     if (s != "")
                     {
                         now = DateTime.Parse(s);
                     }
                     index = strCookie.IndexOf("Cookies:");
                     if (index != -1)
                     {
                         strCookie = strCookie.Substring(index + 8, strCookie.Length - (index + 8));
                     }
                 }
             }
             str3 = this.getYCookie(strCookie);
             if (str3 == "")
             {
                 this.listBoxView.Items.Add("转换失败!");
                 this.listBoxView.SelectedIndex = GlobalValue.mainForm.listBoxView.Items.Count - 1;
             }
             else
             {
                 this.listBoxView.Items.Add("转换成功!");
                 CookieInfos cookieInfo = new CookieInfos();
                 cookieInfo.mailCookieType = "YAHOOMAIL";
                 cookieInfo.mailCookieUrl = "mail.yahoo.com";
                 cookieInfo.cookieTxx = str3;
                 cookieInfo.nowTime = now.ToString();
                 cookieInfo.UserList = this.UserList;
                 cookieInfo.Auto = Auto;
                 cookieInfo.cookieRemarks = cookieRemarks;
                 try
                 {
                     if (!this.EnqueueCookie(cookieInfo))
                     {
                         this.listBoxView.Items.Add("添加cookie失败:");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     }
                     continue;
                 }
                 catch
                 {
                     this.listBoxView.Items.Add("写入cookie失败:");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     continue;
                 }
             }
         }
     }
     reader.Close();
     this.ThreadCookies = this.MaxThreads;
 }
Exemple #8
0
 public void tommail_txt(string tom_txtPath, bool Auto, string cookieRemarks)
 {
     string strCookie = "";
     string message = "";
     int index = 0;
     int num2 = 0;
     string s = "";
     DateTime now = DateTime.Now;
     string str5 = "";
     StreamReader reader = new StreamReader(tom_txtPath, Encoding.Default);
     while ((strCookie = reader.ReadLine()) != null)
     {
         if (strCookie.Length > 0x19)
         {
             index = strCookie.IndexOf("DATE:");
             if (index != -1)
             {
                 num2 = strCookie.IndexOf("URL");
                 if (num2 != -1)
                 {
                     s = strCookie.Substring(index + 5, num2 - (index + 5)).Trim();
                     if (s != "")
                     {
                         now = DateTime.Parse(s);
                     }
                     index = strCookie.IndexOf("Cookies:");
                     if (index != -1)
                     {
                         str5 = strCookie.Substring(num2 + 4, index - (num2 + 4)).Trim();
                         strCookie = strCookie.Substring(index + 8, strCookie.Length - (index + 8)).Trim();
                     }
                 }
             }
             string str6 = "";
             message = this.gettomMailCookieCoremail(strCookie);
             if (message != "")
             {
                 str6 = this.putstr(message, "Coremail=", " ", 0);
                 if (str6 != "-1")
                 {
                     str6 = this.putstr(str6, "%", ";", 0);
                     if (str6 != "-1")
                     {
                         string str7 = "";
                         str7 = this.gettomutmcsr(strCookie);
                         if (str7 != "")
                         {
                             str7 = str7.Trim(new char[] { ';' });
                             str5 = "http://bjapp6." + str7 + "/cgi/loadpage?sid=" + str6 + "&listpage=top.htm";
                         }
                         else
                         {
                             str5 = "http://bjapp6.mail.tom.com/cgi/loadpage?sid=" + str6 + "&listpage=top.htm";
                         }
                     }
                     else
                     {
                         this.listBoxView.Items.Add("缺少必须的Cookie");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                         continue;
                     }
                 }
             }
             if ((message == "") || (str5 == ""))
             {
                 this.listBoxView.Items.Add("转换失败!");
                 this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
             }
             else
             {
                 this.listBoxView.Items.Add("转换成功!");
                 CookieInfos cookieInfo = new CookieInfos();
                 cookieInfo.mailCookieType = "TOMMAIL";
                 cookieInfo.mailCookieUrl = str5;
                 cookieInfo.cookieTxx = message;
                 cookieInfo.nowTime = now.ToString();
                 cookieInfo.UserList = this.UserList;
                 cookieInfo.Auto = Auto;
                 cookieInfo.cookieRemarks = cookieRemarks;
                 try
                 {
                     if (!this.EnqueueCookie(cookieInfo))
                     {
                         this.listBoxView.Items.Add("添加cookie失败:");
                         this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     }
                     continue;
                 }
                 catch
                 {
                     this.listBoxView.Items.Add("写入cookie失败:");
                     this.listBoxView.SelectedIndex = this.listBoxView.Items.Count - 1;
                     continue;
                 }
             }
         }
     }
     reader.Close();
     this.ThreadCookies = this.MaxThreads;
 }