Untitled

 avatar
user_2299906
plain_text
2 years ago
4.3 kB
8
Indexable
                        string cookie =  "locale=en_GB;";
                        RequestFb request = new RequestFb(cookie, pro.UserAgent,pro.ProxyUrl);
                        pro.Status = "Load trang đăng nhập";
                        string html = request.Get("https://en-gb.facebook.com/").Result;

                        string privacy_mutation_token = RegexMatch(html, "privacy_mutation_token=(.*?)\"").Groups[1].Value;
                        pro.Status = "Click Login";
                        string temp = request.PostAsync($"https://en-gb.facebook.com/login/?privacy_mutation_token={privacy_mutation_token}", $"jazoest={request.Jazoest}&lsd={request.LSD}&email={pro.UID}&login_source=comet_headerless_login&next=&pass=" + RegexEscape(pro.Password)).Result;
                        if (string.IsNullOrEmpty(temp))
                        {
                            pro.Status = "Lỗi mạng";
                            return;
                        }
                        if (temp.IsContains("input type=\"password\""))
                        {
                            pro.Status = "Sai uid hoặc mật khẩu";
                            return;
                        }

                        string nh = RegexMatch(temp, "name=\"nh\" value=\"(.*?)\"").Groups[1].Value;
                        string jozoest = RegexMatch(temp, "name=\"jazoest\" value=\"(.*?)\"").Groups[1].Value;
                        string fb_dtsg = RegexMatch(temp, "name=\"fb_dtsg\" value=\"(.*?)\"").Groups[1].Value;
                        if (!string.IsNullOrEmpty(pro.SecrectKey))
                        {
                            if (isStopGetCookieLogin) return;
                            var tfa = new TwoFactorAuth();
                            string code = tfa.GetCode(pro.SecrectKey.Replace(" ", "").ToUpper());
                            pro.Status = "Gửi 2FA : " + code;
                            string post2FA = request.PostAsync($"https://en-gb.facebook.com/checkpoint/?next", $"jazoest={jozoest}&fb_dtsg={fb_dtsg}&nh={nh}&no_fido=true&approvals_code={code}&submit%5BContinue%5D=Continue").Result;
                            if (post2FA.IsContains("id=\"approvals_code\""))
                            {
                                pro.Status = "Nhập sai OTP";
                                return;
                            }
                        }
                        pro.Status = "Lưu trình duyệt";
                        string saveChrome = request.PostAsync($"https://en-gb.facebook.com/checkpoint/?next", $"jazoest={jozoest}&fb_dtsg={fb_dtsg}&nh={nh}&name_action_selected=save_device&submit%5BContinue%5D=Continue").Result;
                        if (saveChrome.IsContains("checkpointSubmitButton"))
                        {
                            pro.Status = "Xác nhận đăng nhập địa điểm lạ";
                            string temp1 = request.PostAsync($"https://en-gb.facebook.com/checkpoint/?next", $"jazoest={jozoest}&fb_dtsg={fb_dtsg}&nh={nh}&submit%5BContinue%5D=Continue").Result;
                            string temp2 = request.PostAsync($"https://en-gb.facebook.com/checkpoint/?next", $"jazoest={jozoest}&fb_dtsg={fb_dtsg}&nh={nh}&submit%5BThis+was+me%5D=This+was+me").Result;
                            string temp3 = request.PostAsync($"https://en-gb.facebook.com/checkpoint/?next", $"jazoest={jozoest}&fb_dtsg={fb_dtsg}&nh={nh}&name_action_selected=save_device&submit%5BContinue%5D=Continue").Result;

                            if (temp1.IsContains("submit[Download Your Information]") || temp2.IsContains("submit[Download Your Information]") || temp3.IsContains("submit[Download Your Information]"))
                            {
                                pro.Status = "Tài khoản của bạn bị vô hiệu hóa";
                                return;
                            }
                        }
                        if (saveChrome.IsContains("submit[Download Your Information]"))
                        {
                            pro.Status = "Tài khoản của bạn bị vô hiệu hóa";
                            return;
                        }

                        cookie = request.GetCookie();