private void button1_Click(object sender, EventArgs e)
 {
     this.button1.Enabled = false;
     try
     {
         TcpClient tcpClient = new TcpClient();
         this.labelActivationStatus.Text = "Connecting...";
         if (!tcpClient.smethod_7(this.string_0, 2798, 5000))
         {
             throw new Exception("Could not connect to server");
         }
         NetworkStream stream = tcpClient.GetStream();
         stream.smethod_3(this.textBox1.Text.Trim());
         int num = stream.smethod_4();
         stream.Close();
         if (num == 1)
         {
             MessageBox.Show("Key activation successful!\r\nYou can use that key to login now.", "Success", MessageBoxButtons.OK, MessageBoxIcon.None);
             base.Close();
             return;
         }
         this.labelActivationStatus.Text = "";
         MessageBox.Show("This key already active or invalid!!\r\n\r\nYou only have to activate the key once.\r\nThen you can login with it", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     catch (Exception ex)
     {
         this.labelActivationStatus.Text = "Error: " + ex.Message;
     }
     this.button1.Enabled = true;
 }
Пример #2
0
 private static void smethod_1()
 {
     if (!Class92.AuthenticationFaulted)
     {
         string text = Class91.smethod_2("SessionHost");
         string text2 = Class91.smethod_2("SessionPort");
         string text3 = Class91.smethod_2("SessionID");
         if (string.IsNullOrWhiteSpace(text) || string.IsNullOrWhiteSpace(text2) || string.IsNullOrWhiteSpace(text3))
         {
             Class92.AuthenticationFaulted = true;
         }
         else
         {
             text = text.Replace("\r", "").Replace("\n", "");
             text2 = text2.Replace("\r", "").Replace("\n", "");
             text3 = text3.Replace("\r", "").Replace("\n", "");
             int int_ = 0;
             if (!int.TryParse(text2, out int_))
             {
                 Class92.AuthenticationFaulted = true;
             }
             else
             {
                 TcpClient tcpClient = new TcpClient();
                 tcpClient.ReceiveTimeout = 10000;
                 tcpClient.SendTimeout = 10000;
                 try
                 {
                     if (!tcpClient.smethod_7(text, int_, 10000))
                     {
                         Class92.dateTime_0 = DateTime.Now + Class92.timeSpan_0;
                     }
                     else
                     {
                         NetworkStream stream = tcpClient.GetStream();
                         if (!Class92.FirstTimeAuthDone)
                         {
                             stream.smethod_5(0);
                         }
                         else
                         {
                             stream.smethod_5(1);
                         }
                         stream.smethod_3(text3);
                         stream.smethod_5(Process.GetCurrentProcess().Id);
                         int num = stream.smethod_4();
                         if (num == 0)
                         {
                             Class92.AuthenticationFaulted = true;
                         }
                         else
                         {
                             if (num == 1)
                             {
                                 Class92.FirstTimeAuthDone = true;
                                 Class92.LastAuth = DateTime.Now;
                                 Class92.dateTime_0 = DateTime.Now + Class92.timeSpan_1;
                             }
                         }
                     }
                 }
                 finally
                 {
                     tcpClient.Close();
                 }
             }
         }
     }
 }
Пример #3
0
 private void method_6()
 {
     int num = 2797;
     string text = Class4.smethod_2("SessionID");
     DateTime now = DateTime.Now;
     while (true)
     {
         try
         {
             TcpClient tcpClient = new TcpClient();
       if (tcpClient.smethod_7("1", num, 10000))// if (tcpClient.smethod_7("193.192.58.73", num, 10000))
             {
                 NetworkStream stream = tcpClient.GetStream();
                 stream.smethod_5(2);
                 stream.smethod_3(text);
                 int num2 = stream.smethod_4();
                 stream.Close();
                 if (num2 != 1)
                 {
                     break;
                 }
                 now = DateTime.Now;
                 Thread.Sleep(TimeSpan.FromMinutes(2.0));
             }
             goto IL_AB;
         }
         catch (Exception ex)
         {
             MessageBox.Show("Auth error: " + ex.Message, "error");
             goto IL_AB;
         }
         IL_9C:
         Thread.Sleep(5000);
         continue;
         IL_AB:
         if (DateTime.Now - now > TimeSpan.FromMinutes(10.0))
         {
             break;
         }
         goto IL_9C;
     }
     base.BeginInvoke(new MethodInvoker(this.method_7));
     TaskFactory arg_100_0 = Task.Factory;
     if (ProfileManager.action_0 == null)
     {
         ProfileManager.action_0 = new Action(ProfileManager.smethod_2);
     }
     arg_100_0.StartNew(ProfileManager.action_0);
 }