コード例 #1
0
ファイル: RomDetails.cs プロジェクト: theteebox/HISuite-Proxy
 private static string GetPackageURL(string url)
 {
     int where = url.IndexOf("/full/");
     if (where != -1)
     {
         where += 6;
         gZipWebClient client = new gZipWebClient();
         client.Proxy = null;
         client.SetTimeout(10000);
         string baseurl  = url.Substring(0, where);
         string response = client.DownloadString(baseurl + "/filelist.xml");
         where = response.IndexOf("package=");
         if (where != -1)
         {
             where += 9;
             int    finish      = response.IndexOf('"', where);
             string packagename = response.Substring(where, finish - where);
             return(baseurl + packagename);
         }
         else
         {
             throw new Exception("Error in processing 'filelist.xml'");
         }
     }
     else
     {
         throw new Exception("Invalid URL Passed, Couldn't find '/full/'");
     }
 }
コード例 #2
0
 private void Authenticate()
 {
     for (int i = 0; i < 3; i++)
     {
         AppendMessage("Sending Data to Authentication Bridge", GreenColor);
         try
         {
             gZipWebClient client = new gZipWebClient();
             client.Headers.Set(HttpRequestHeader.Cookie, cookie);
             string response = client.UploadString("http://instagramnumber.byethost31.com/auth/index.php", UploadData);
             int where = response.LastIndexOf("data=");
             if (where == -1)
             {
                 AppendMessage("Unexpected Authentication Response Received, Retrying...", OrangeColor);
             }
             else
             {
                 responsedata = response;
                 Success      = true;
                 Close();
                 return;
             }
         }
         catch (Exception e)
         {
             if (i != 2)
             {
                 AppendMessage("Authentication Through Bridge Failed, Retrying...", OrangeColor);
             }
             else
             {
                 AppendMessage("Authentication Through Bridge Failed, Process Aborted.", OrangeColor);
                 AppendMessage(e.Message, OrangeColor);
             }
         }
     }
     AppendMessage("Authentication Through Bridge Failed, Process Aborted.", OrangeColor);
     responsedata = null;
     Success      = false;
 }
コード例 #3
0
 private void BypassRobot()
 {
     for (int i = 0; i < 3; i++)
     {
         AppendMessage("Connecting to Authentication Bridge", GreenColor);
         try
         {
             gZipWebClient client   = new gZipWebClient();
             string        response = client.DownloadString("http://instagramnumber.byethost31.com/auth/index.php");
             int where = response.LastIndexOf("toNumbers");
             if (where == -1)
             {
                 AppendMessage("Unexpected Response Received, Retrying...", OrangeColor);
             }
             else
             {
                 where += 11;
                 int    finish = response.IndexOf('"', where);
                 string iphex  = response.Substring(where, finish - where);
                 cookie = "__test=" + DecryptIP(iphex);
                 Authenticate();
                 return;
             }
         }
         catch (Exception e)
         {
             if (i != 2)
             {
                 AppendMessage("Connection to Authentication Bridge Failed, Retrying...", OrangeColor);
             }
             else
             {
                 AppendMessage("Connection to Authentication Bridge Failed, Process Aborted.", OrangeColor);
                 AppendMessage(e.Message, OrangeColor);
             }
         }
     }
     AppendMessage("Connection to Authentication Bridge Failed, Process Aborted.", RedColor);
 }