282 www graph

 avatar
tvq2802
plain_text
a year ago
81 kB
55
Indexable
using Microsoft.SqlServer.Server;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Mail;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security.Authentication;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using TwoFactorAuthNet;
using CheckBox = System.Windows.Controls.CheckBox;
using TextBox = System.Windows.Controls.TextBox;

namespace requesttool_Unlock282checkpoin
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : System.Windows.Window, INotifyPropertyChanged
    {
        public MainWindow()
        {
            InitializeComponent();
            if (!Directory.Exists(Environment.CurrentDirectory + "\\data\\datamain")) Directory.CreateDirectory(Environment.CurrentDirectory + "\\data");
            MainDataGrid = new ObservableCollection<Profile>();
            FormLogin form = new FormLogin();
            if (form.ShowDialog() == false)
            {
                this.Close();
            }

            //string content = "test";
            //string folderPath = @"D:\avt"; // Thay đổi đường dẫn thư mục tại đây
            //RequestHTTP request = new RequestHTTP("sb=xHUZZOpXh_8TQehkE75TW70C; datr=xHUZZLjNwBhMR1Low7tqf4Fo; m_ls=%7B%22c%22%3A%7B%221%22%3A%22HCwAABaWBxbO15j5BBMFFrqkirfvvy0A%22%2C%222%22%3A%22GSwVQBxMAAAWABa6scTIDBYAABV-HEwAABYAFtDX98cMFgAAFigA%22%2C%2295%22%3A%22HCwAABYMFuD-18kLEwUWuqSKt--_LQA%22%7D%2C%22d%22%3A%22f753bbeb-b841-4e59-90f0-7e30d523342f%22%2C%22s%22%3A%220%22%2C%22u%22%3A%223j7ttv%22%7D; locale=en_US; c_user=100002625308528; xs=5%3AeOEJEihDcgAeZQ%3A2%3A1686760941%3A-1%3A3857; m_page_voice=100002625308528; presence=C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1686820276071%2C%22v%22%3A1%7D; wd=593x963; fr=0uMLsQGSZaBV5VCy8.AWUU-81vZowzraXOkBg2nvZ30dU.BkHtLZ.tZ.AAA.0.0.BkitXO.AWUcSx2340g");
            //string[] fileNames = Directory.GetFiles(folderPath);
            //string attracment = "";
            //foreach (string fileName in fileNames)
            //{
            //    string id_img = request.UploadIMG(fileName);
            //    attracment = attracment + "{\"photo\":{\"id\":\"" + id_img + "\"}},";
            //    if(!string.IsNullOrEmpty(id_img))
            //    {
            //        break;
            //    }
            //}
            //attracment = attracment.TrimEnd(',');
            //string session = Guid.NewGuid().ToString();
            //string postimage = request.GraphApi("&variables={\"input\":{\"composer_entry_point\":\"inline_composer\",\"composer_source_surface\":\"newsfeed\",\"composer_type\":\"feed\",\"idempotence_token\":\""+session+"_FEED\",\"source\":\"WWW\",\"audience\":{\"privacy\":{\"allow\":[],\"base_state\":\"EVERYONE\",\"deny\":[],\"tag_expansion_state\":\"UNSPECIFIED\"}},\"message\":{\"ranges\":[],\"text\":\""+content+"\"},\"with_tags_ids\":[],\"inline_activities\":[],\"explicit_place_id\":\"0\",\"text_format_preset_id\":\"0\",\"attachments\":["+attracment+"],\"logging\":{\"composer_session_id\":\""+session+"\"},\"navigation_data\":{\"attribution_id_v2\":\"CometHomeRoot.react,comet.home,tap_tabbar,1686820365659,379296,4748854339,\"},\"tracking\":[null],\"actor_id\":\"100002625308528\",\"client_mutation_id\":\"5\"},\"displayCommentsFeedbackContext\":null,\"displayCommentsContextEnableComment\":null,\"displayCommentsContextIsAdPreview\":null,\"displayCommentsContextIsAggregatedShare\":null,\"displayCommentsContextIsStorySet\":null,\"feedLocation\":\"NEWSFEED\",\"feedbackSource\":1,\"focusCommentID\":null,\"gridMediaWidth\":null,\"groupID\":null,\"scale\":1,\"privacySelectorRenderLocation\":\"COMET_STREAM\",\"renderLocation\":\"homepage_stream\",\"useDefaultActor\":false,\"inviteShortLinkKey\":null,\"isFeed\":true,\"isFundraiser\":false,\"isFunFactPost\":false,\"isGroup\":false,\"isEvent\":false,\"isTimeline\":false,\"isSocialLearning\":false,\"isPageNewsFeed\":false,\"isProfileReviews\":false,\"isWorkSharedDraft\":false,\"UFI2CommentsProvider_commentsKey\":\"CometModernHomeFeedQuery\",\"hashtag\":null,\"canUserManageOffers\":false,\"__relay_internal__pv__GroupsCometDelayCheckBlockedUsersrelayprovider\":false,\"__relay_internal__pv__IsWorkUserrelayprovider\":false,\"__relay_internal__pv__IsMergQAPollsrelayprovider\":false,\"__relay_internal__pv__StoriesArmadilloReplyEnabledrelayprovider\":false,\"__relay_internal__pv__StoriesRingrelayprovider\":false}&doc_id=6615147385186126").Result;
            //string url = Regex.Match(postimage, "url\":\"(.*?)\"").Groups[1].Value;


            //request add friend theo uid 
            //string step1addfr = request.GraphApi("&variables={\"parentID\":\"100000578746176\",\"renderLocation\":\"WWW_PROFILE\",\"scale\":1}&doc_id:=6376997105693662").Result;
            //string steap2addfr = request.GraphApi("&variables={\"input\":{\"attribution_id_v2\":\"ProfileCometTimelineListViewRoot.react,comet.profile.timeline.list,via_cold_start,1686760455623,818993,190055527696468,\",\"friend_requestee_ids\":[\"100000578746176\"],\"refs\":[null],\"source\":\"profile_button\",\"warn_ack_for_ids\":[],\"actor_id\":\"100002625308528\",\"client_mutation_id\":\"1\"},\"scale\":1}&doc_id=6046233292140657").Result;

        }
        public class Work
        {
            public Profile pro { get; set; }
        }
        public class Profile : INotifyPropertyChanged
        {

            public IntPtr handChrome { set; get; }

            private string _LocationSort;
            public string LocationSort { get => _LocationSort; set { _LocationSort = value; OnPropertyChanged(); } }
            private bool _IsSelected { get; set; }
            public bool IsSelected { get => _IsSelected; set { _IsSelected = value; OnPropertyChanged(); } }
            private int _ID;
            public int ID { get => _ID; set { _ID = value; OnPropertyChanged(); } }

            private string _UserAgent;
            public string UserAgent { get => _UserAgent; set { _UserAgent = value; OnPropertyChanged(); } }

            private string _ProxyUrl;
            public string ProxyUrl { get => _ProxyUrl; set { _ProxyUrl = value; OnPropertyChanged(); } }

            private string _Status;
            public string Status { get => _Status; set { _Status = value; OnPropertyChanged(); } }
            private string _Cookie { get; set; }
            public string Cookie { get => _Cookie; set { _Cookie = value; OnPropertyChanged(); } }
            private string _Token { get; set; }
            public string Token { get => _Token; set { _Token = value; OnPropertyChanged(); } }
            private string _Email;
            public string Email { get => _Email; set { _Email = value; OnPropertyChanged(); } }
            private string _PassEmail;
            public string PassEmail { get => _PassEmail; set { _PassEmail = value; OnPropertyChanged(); } }
            private string _Password;
            public string Password { get => _Password; set { _Password = value; OnPropertyChanged(); } }
            private string _SecrectKey;
            public string SecrectKey { get => _SecrectKey; set { _SecrectKey = value; OnPropertyChanged(); } }
            private string _UID;
            public string UID { get => _UID; set { _UID = value; OnPropertyChanged(); } }


            #region INotifyPropertyChanged Members

            public event PropertyChangedEventHandler PropertyChanged;

            protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
            {
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
            }
            #endregion
        }
        public class GridRow : INotifyPropertyChanged
        {
            private int _ID;
            public int ID { get => _ID; set { _ID = value; OnPropertyChanged(); } }
            private string _GroupID;
            public string GroupID { get => _GroupID; set { _GroupID = value; OnPropertyChanged(); } }
            private string _UID;
            public string UID { get => _UID; set { _UID = value; OnPropertyChanged(); } }

            private string _Process;
            public string Process { get => _Process; set { _Process = value; OnPropertyChanged(); } }

            private string _IP;
            public string IP { get => _IP; set { _IP = value; OnPropertyChanged(); } }
            private string _Status;
            public string Status { get => _Status; set { _Status = value; OnPropertyChanged(); } }

            private string _Usergarent;
            public string Usergarent { get => _Usergarent; set { _Usergarent = value; OnPropertyChanged(); } }
            private string _End;
            public string End { get => _End; set { _End = value; OnPropertyChanged(); } }
            #region INotifyPropertyChanged Members

            public event PropertyChangedEventHandler PropertyChanged;

            protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
            {
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
            }
            #endregion
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
        #endregion

        private ObservableCollection<GridRow> _DataUnlock282;
        public ObservableCollection<GridRow> DataUnlock282
        {
            get => _DataUnlock282; set { _DataUnlock282 = value; OnPropertyChanged(); }
        }

        private ObservableCollection<Profile> _MainDataGrid;
        public ObservableCollection<Profile> MainDataGrid
        {
            get => _MainDataGrid; set { _MainDataGrid = value; OnPropertyChanged(); }
        }

        private void Checkbox_CheckAll(object sender, RoutedEventArgs e)
        {
            bool flag = Check_ALL.IsChecked is true;
            foreach (Profile pro in MainDataGrid)
            {
                pro.IsSelected = flag;
            }
        }

        private void MenuItem_ClickImportVia(object sender, RoutedEventArgs e)
        {
            ImportVia imp = new ImportVia();
            if (imp.ShowDialog() == true)
            {
                string input = imp.input_text;
                string type = imp.type_input;
                List<String> listinput = input.GetAllLines();
                List<String> listtype = type.GetAllNodes("|");
                foreach (string info in listinput)
                {
                    List<String> listinfo = info.GetAllNodes("|");
                    Profile pro = new Profile();
                    pro.ID = MainDataGrid.Count + 1;
                    for (int i = 0; i < listtype.Count; i++)
                    {
                        if (i >= listinfo.Count) break;
                        switch (listtype[i])
                        {
                            case "UID":
                                pro.UID = listinfo[i];
                                break;
                            case "PASS":
                                pro.Password = listinfo[i];
                                break;
                            case "2FA":
                                pro.SecrectKey = listinfo[i];
                                break;
                            case "Email":
                                pro.Email = listinfo[i];
                                break;
                            case "Pass Email":
                                pro.PassEmail = listinfo[i];
                                break;
                            case "UserAgent":
                                pro.UserAgent = listinfo[i];
                                break;
                            case "Token":
                                pro.Token = listinfo[i];
                                break;
                            case "Cookie":
                                pro.Cookie = listinfo[i];
                                break;
                            case "Proxy":
                                pro.ProxyUrl = listinfo[i];
                                break;
                        }
                    }
                    MainDataGrid.Add(pro);
                }
                File.WriteAllText(Environment.CurrentDirectory + "\\DATA\\DataMain", JsonConvert.SerializeObject(MainDataGrid));
            }
        }

        private void MenuItem_ClickCopyVia(object sender, RoutedEventArgs e)
        {
            ImportVia import = new ImportVia();
            if (import.ShowDialog() == false) return;
            string[] cauhinh = import.type_input.Split('|');
            string temp = "";
            foreach (var pro in MainDataGrid.ToList())
            {
                if (!pro.IsSelected) continue;
                string info = "";

                foreach (string p in cauhinh)
                {
                    switch (p)
                    {
                        case "UID":
                            {
                                info += pro.UID + "|";
                            }
                            break;
                        case "PASS":
                            {
                                info += pro.Password + "|";
                            }
                            break;
                        case "2FA":
                            {
                                info += pro.SecrectKey + "|";
                            }
                            break;
                        case "Email":
                            {
                                info += pro.Email + "|";
                            }
                            break;
                        case "Pass Email":
                            {
                                info += pro.PassEmail + "|";
                            }
                            break;
                        case "Cookie":
                            {
                                info += pro.Cookie + "|";
                            }
                            break;
                        case "UserAgent":
                            {
                                info += pro.UserAgent + "|";
                            }
                            break;
                        case "Proxy":
                            {
                                info += pro.ProxyUrl + "|";
                            }
                            break;
                    }

                }
                if (!temp.Contains(info)) temp += info.TrimEnd('|') + "\n";
            }
            if (!string.IsNullOrEmpty(temp)) System.Windows.Clipboard.SetDataObject(temp.TrimEnd('\n'));  //Clipboard.SetDataObject : copy dữ liệu temp vào clipboard
        }

        private void MenuItem_SelectedCell(object sender, RoutedEventArgs e)
        {
            foreach (var items in datagrid.SelectedCells)
            {
                Profile pro = items.Item as Profile;
                pro.IsSelected = true;
            }
        }

        private void ButtonClick_DeleteProfile(object sender, RoutedEventArgs e)
        {
            List<Profile> listprofile = MainDataGrid.Where(x => x.IsSelected).ToList();
            foreach (Profile pro in listprofile)
            {
                MainDataGrid.Remove(pro);
            }
        }

        private void Click_Filter_Profile(object sender, RoutedEventArgs e)
        {
        }

        private void MainWD_Loaded(object sender, RoutedEventArgs e)
        {
            if (File.Exists(Environment.CurrentDirectory + "\\DATA\\DataMain"))
            {
                List<Profile> listProfile = JsonConvert.DeserializeObject<List<Profile>>(File.ReadAllText(Environment.CurrentDirectory + "\\DATA\\DataMain"));
                foreach (Profile pro in listProfile)
                {
                    if (pro != null)
                        MainDataGrid.Add(pro);
                }
            }
            if (File.Exists(Environment.CurrentDirectory + "\\setting.json"))
            {
                string tmp = File.ReadAllText(Environment.CurrentDirectory + "\\setting.json");
                List<element> listjson = JsonConvert.DeserializeObject<List<element>>(tmp);
                var fields = typeof(MainWindow).GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
                foreach (FieldInfo FI in fields)
                {
                    if (FI.FieldType == typeof(TextBox))
                    {
                        TextBox value = FI.GetValue(this) as TextBox;

                        foreach (element ele in listjson)
                        {
                            if (FI.Name.Equals(ele.name)) value.Text = Encoding.UTF8.GetString(Convert.FromBase64String(ele.value));
                        }
                    }
                    if (FI.FieldType == typeof(CheckBox))
                    {
                        CheckBox value = FI.GetValue(this) as CheckBox;
                        foreach (element ele in listjson)
                        {
                            if (FI.Name.Equals(ele.name)) value.IsChecked = bool.Parse(ele.value);
                        }
                    }
                    if (FI.FieldType == typeof(ComboBox))
                    {
                        ComboBox value = FI.GetValue(this) as ComboBox;
                        foreach (element ele in listjson)
                        {
                            if (FI.Name.Equals(ele.name)) value.SelectedIndex = int.Parse(ele.value);
                        }
                    }
                }
            }

        }
        public class element
        {
            public string name { set; get; }
            public string value { set; get; }
        }
        private void MainWD_Closed(object sender, EventArgs e)
        {
            File.WriteAllText(Environment.CurrentDirectory + "\\DATA\\DataMain", JsonConvert.SerializeObject(MainDataGrid));
            var fields = typeof(MainWindow).GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
            List<element> listsetting = new List<element>();
            foreach (FieldInfo FI in fields)
            {
                if (FI.FieldType == typeof(TextBox))
                {
                    TextBox value = FI.GetValue(this) as TextBox;
                    listsetting.Add(new element { name = FI.Name, value = Convert.ToBase64String(Encoding.UTF8.GetBytes(value.Text)) });
                }
                if (FI.FieldType == typeof(System.Windows.Controls.CheckBox))
                {
                    CheckBox value = FI.GetValue(this) as CheckBox;
                    listsetting.Add(new element { name = FI.Name, value = value.IsChecked.Value.ToString() });

                }
                if (FI.FieldType == typeof(System.Windows.Controls.ComboBox))
                {
                    ComboBox value = FI.GetValue(this) as ComboBox;
                    listsetting.Add(new element { name = FI.Name, value = value.SelectedIndex.ToString() });

                }
            }
            File.WriteAllText(Environment.CurrentDirectory + "\\setting.json", JsonConvert.SerializeObject(listsetting));
        }
        private static Random random = new Random();

        public static string GenerateRandomString(int length)
        {
            const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
            return new string(Enumerable.Repeat(chars, length)
              .Select(s => s[random.Next(s.Length)]).ToArray());
        }

        public static string GetRanDomName(int length)
        {
            const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
            return new string(Enumerable.Repeat(chars, length)
              .Select(s => s[random.Next(s.Length)]).ToArray());
        }
        string getdata(string html)
        {
            string datapost = "";
            List<string> list = new List<string>();
            var listnode = Regex.Matches(html, "name=\"([^\"]+)\" value=\"([^\"]+)\"");
            foreach (Match node in listnode)
            {
                string name = node.Groups[1].Value;
                if (name.Equals("_fb_noscript")) continue;
                string value = node.Groups[2].Value;
                if (list.Contains(name)) continue;
                list.Add(name);
                datapost += $"&{name}={value}";
            }
            return datapost;
        }
        
        private void Click_btnStartUnlock282(object sender, RoutedEventArgs e)
        {
            List<string> listUid = txt_listUidUnlock282.Text.GetAllLines();
            List<string> apiproxy = txt_listProxyUnlock282.Text.GetAllLines();
            List<string> listHttps = txt_listProxyUnlock282.Text.GetAllLines();
            List<string> listUsergarent = txt_listUsergarent282.Text.GetAllLines();
            List<Profile> listWork = MainDataGrid.GetProfiles(listUid);
            string typelogin = cb_loginUnlock282.Text;
            string cbwebproxy = cb_webproxyUnlock282.Text;
            string apisim = txt_apisim.Text;
            string sitePhone = cb_webphone.Text;
            string countrycode = "";
            string apiCaptcha = txt_keyCaptcha.Text;
            string siteCaptcha = cb_webCaptcha.Text;
            string webImageunlock = cb_webImgUnlock282.Text;
            string folderImg282 = txt_folderImg.Text;
            bool isVeryphone = tgbtn_Veryphone.IsChecked is true;
            int soluong = txt_soluongUnlock282.Text.ToInt(1);
            int delay = txt_delayUnlock282.Text.ToInt(1);
            List<string> newapiproxy = new List<string>();
            //var check = soluongreg % sokeyproxy;
            if (newapiproxy.Count == 0)
            {
                for (int i = 0; i < soluong; i++)
                {
                    newapiproxy.Add("NoProxy");
                }
            }
            int soProxy = newapiproxy.Count;
            if (cbwebproxy == "HTTPS/SOCK5")
            {
                if (soluong < soProxy)
                {
                    soProxy = soluong;
                }
            }
            btnStartUnlock282.IsEnabled = false; // khi start, nút start sẽ bị đen
            isStopunlock282 = false;
            DataUnlock282 = new ObservableCollection<GridRow>();
            Task tk = new Task(() =>
            {
                ParallelOptions options = new ParallelOptions();
                options.MaxDegreeOfParallelism = soluong;

                Parallel.ForEach(listWork, options, pro =>
                {
                    GridRow row = new GridRow();
                    try
                    {
                        if (isStopunlock282 == true)
                        {
                            return;
                        }
                        this.Dispatcher.Invoke(() =>
                        {
                            row.ID = pro.ID;
                            DataUnlock282.Add(row);
                            row.UID = pro.UID;
                            row.Status = "Bắt đầu Unlock 282";
                            row.Process = "Đang chạy...";
                        });
                        string proxy = "";
                        string keyapi = newapiproxy.GetRandom();
                        newapiproxy.Remove(keyapi);
                        WebProxyApi webproxy = new WebProxyApi(keyapi);
                        //code xử lý 1 luồng
                        switch (cbwebproxy)
                        {
                            case "TinsoftProxy.Com":
                                if (string.IsNullOrEmpty(webproxy.proxyurl))
                                    proxy = webproxy.GetNewProxyTinsoft();
                                else
                                {
                                    webproxy.CheckProxyTinsoft();
                                    if (webproxy.next_change <= 0) { proxy = webproxy.GetNewProxyTinsoft(); }
                                    else
                                    {
                                        Task.Delay(webproxy.next_change * 1000).Wait();
                                        proxy = webproxy.GetNewProxyTinsoft();
                                    }
                                }
                                pro.ProxyUrl = proxy;
                                break;
                            case "proxy.shoplike.vn":
                                proxy = webproxy.GetNewProxyShoplike();
                                break;
                            case "proxyv6.net":
                                RequestHTTP req = new RequestHTTP();
                                string myip = req.Get("https://api.ipify.org/").Result;
                                webproxy.MyIP = myip;
                                proxy = webproxy.getProxyv6net();
                                break;
                            case "HTTPS/SOCK5":
                                proxy = listHttps.GetRandom();
                                break;
                            case "Không Đổi IP":
                                break;
                        }
                        row.IP = proxy;
                        if (typelogin == "Id|Pass|2fa")
                        {
                            #region CODE LOGIN = 2FA RỒI GET COOKIE
                            RequestHTTP requestlogin = new RequestHTTP("", ProxyUrl: proxy);
                            row.Status = "Login ID|PASS|2FA";
                            string html1 = requestlogin.Get("https://mobile.facebook.com/login.php").Result;
                            if (string.IsNullOrEmpty(html1))
                            {
                                row.Status = "Lỗi mạng";
                                return;
                            }
                            string datapost = getdata(html1);
                            string clicklogin = requestlogin.PostAsync("https://mobile.facebook.com/login/device-based/login/async/?refsrc=deprecated&lwv=100", $"&email={pro.UID}&prefill_contact_point={pro.UID}&encpass={pro.Password}" + datapost);
                            if (clicklogin.Contains("DOCTYPE"))
                            {
                                row.Status = "Sai pass!!!";
                                return;
                            }
                            string html2 = requestlogin.Get("https://mobile.facebook.com/checkpoint/?__req=4").Result;
                            datapost = getdata(html2);
                            if (!string.IsNullOrEmpty(pro.SecrectKey))
                            {
                                string code = "";
                                var tfa = new TwoFactorAuth();
                                code = tfa.GetCode(pro.SecrectKey.Replace(" ", "").ToUpper());
                                row.Status = $"CODE : {code}";
                                string clicksend2fa = requestlogin.PostAsync("https://mobile.facebook.com/login/checkpoint/", $"&checkpoint_data=&approvals_code={code}&submit%5BSubmit+Code%5D=Submit+Code" + datapost);
                                row.Status = $"Nhập Code : {code}";
                                string clicksavedevice = requestlogin.PostAsync("https://mobile.facebook.com/login/checkpoint/", $"&checkpoint_data=&name_action_selected=save_device&submit%5BContinue%5D=Continue" + datapost);
                                while (clicksavedevice.Contains("checkpointSubmitButton") || clicksavedevice.Contains("submit[Continue]") || clicksavedevice.Contains("submit[This was me]"))
                                {
                                    if (clicksavedevice.Contains("secure_account_learn_more"))
                                    {
                                        row.Status = "CP LOGIN!";
                                        return;
                                    }
                                    row.Status = "Click Đây là tôi";
                                    clicksavedevice = requestlogin.PostAsync("https://mobile.facebook.com/login/checkpoint/", $"&checkpoint_data=&submit%5BContinue%5D=Continue" + datapost);
                                    clicksavedevice = requestlogin.PostAsync("https://mobile.facebook.com/login/checkpoint/", $"&checkpoint_data=&submit%5BThis+was+me%5D=This+was+me" + datapost);
                                    clicksavedevice = requestlogin.PostAsync("https://mobile.facebook.com/login/checkpoint/", $"&checkpoint_data=&name_action_selected=save_device&submit%5BContinue%5D=Continue" + datapost);
                                }
                            }
                            string cookie = requestlogin.GetCookie();
                            if (cookie.Contains("checkpoint") || !cookie.Contains("c_user"))
                            {
                                row.Status = "Login thất bại";
                                return;
                            }
                            row.Status = $"Đăng nhập thành công";
                            pro.Cookie = cookie;
                            #endregion
                        }
                        int demphonefail = 0;
                        RequestHTTP requestUnlock282 = new RequestHTTP(cookies: pro.Cookie, ProxyUrl: proxy);
                        string check282www = requestUnlock282.Get("https://www.facebook.com/checkpoint/1501092823525282").Result;
                        string check282 = requestUnlock282.Get("https://mbasic.facebook.com/").Result;
                        string url = requestUnlock282.ResponseURI;
                        if (string.IsNullOrEmpty(url))
                        {
                            row.Status = "Lỗi mạng";
                            row.Process = "Xong - Lỗi Unlock";
                            return;
                        }
                        if (url.Contains("disabled"))
                        {
                            row.Status = "Vhh Vĩnh Viễn!!!";
                            row.Process = "Xong - Lỗi Unlock";
                            return;
                        }
                        if (check282www.Contains("disagreed_date"))
                        {
                            string ketqua1 = Regex.Match(check282www, "disagreed_date\":\"(.*?)\"").Groups[1].Value;
                            ketqua1 = Regex.Unescape(ketqua1);
                            row.Status = $"Kháng {ketqua1}";
                            pro.Status = row.Status;
                            row.Process = "Xong - Unlock Xong";
                            return;
                        }
                        if (url.Contains("828281030927956"))
                        {
                            row.Status = "Cp 956!";
                            row.Process = "Xong - Lỗi Unlock";
                            return;
                        }
                        if (!url.Contains("1501092823525282"))
                        {
                            row.Status = "Không phải CP 282 hoặc Nick bị out";
                            row.Process = "Xong - Lỗi Unlock";
                            return;
                        }
                        string check282again = "";
                        if (check282www.Contains("change_phone_label") && check282www.Contains("resend_by_sms_label"))
                        {
                            string changePhone = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"1\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"UNSET_CONTACT_POINT\",\"enrollment_id\":null},\"scale\":1}&doc_id=6365735900161836").Result;
                            if (!changePhone.Contains("REVERIFY_PHONE_NUMBER_WITH_NEW_ADDED_PHONE_AND_WHATSAPP"))
                            {
                                row.Status = "Block đổi SĐT";
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            check282again = requestUnlock282.Get("https://mbasic.facebook.com/").Result;
                        }
                        string codeimg = "";
                        if (check282again.Contains("action_upload_image"))
                        {
                            row.Status = "282 Image!";
                            row.Status = "Tải ảnh từ site AI";
                            if (webImageunlock == "unrealperson.com")
                            {
                                string getlinkimg = requestUnlock282.GetOther("https://api.unrealperson.com/person", "https://www.unrealperson.com/");
                                string linkimg = Regex.Match(getlinkimg, "\"image_url\":\"(.*?)\"").Groups[1].Value;
                                requestUnlock282.DownloadFile($"https://api.unrealperson.com/image?name={linkimg}&type=tpdne", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.unrealperson.com/");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                else row.Status = $"Up Ảnh thành công";
                            }
                            else if (webImageunlock == "this-person-does-not-exist.com")
                            {
                                string getlinkimg = requestUnlock282.GetOther("https://this-person-does-not-exist.com/new?time=1687107303156&gender=all&age=19-25&etnic=all", "https://this-person-does-not-exist.com/en");
                                string linkimg = Regex.Match(getlinkimg, "name\":\"(.*?)\"").Groups[1].Value;
                                requestUnlock282.DownloadFile($"https://this-person-does-not-exist.com/img/{linkimg}", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.unrealperson.com/");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                else row.Status = $"Up Ảnh thành công";
                            }
                            else if (webImageunlock == "boredhumans.com")
                            {
                                string getlinkimg = requestUnlock282.GetOther("https://www.boredhumans.com/api_faces2.php", "https://www.boredhumans.com/faces.php");
                                string linkimg = Regex.Match(getlinkimg, "src=\"(.*?)\"").Groups[1].Value;
                                requestUnlock282.DownloadFile($"https://www.boredhumans.com{linkimg}", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.boredhumans.com/faces.php");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                else row.Status = $"Tải Ảnh thành công";
                            }
                            else if (webImageunlock == "thispersondoesnotexit.com")
                            {

                                requestUnlock282.DownloadFile("https://thispersondoesnotexist.com", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                else row.Status = $"Tải Ảnh thành công";
                            }
                            else if (webImageunlock == "Lấy Ảnh Từ Folder")
                            {
                                string[] fileNames = Directory.GetFiles(folderImg282);
                                if (fileNames.Length > 0)
                                {
                                    Random random = new Random();
                                    string randomImagePath = fileNames[random.Next(fileNames.Length)];
                                    codeimg = requestUnlock282.UploadIMG(randomImagePath);
                                    if (string.IsNullOrEmpty(codeimg))
                                    {
                                        row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                        row.Process = "Xong - Lỗi Unlock";
                                        return;
                                    }
                                }
                            }
                            string submitimg1 = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"6\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"UPLOAD_IMAGE\",\"image_upload_handle\":\"" + codeimg + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=9004853972920088").Result;
                            string ketqua1 = Regex.Match(submitimg1, "disagreed_date\":\"(.*?)\"").Groups[1].Value;
                            if (string.IsNullOrEmpty(ketqua1))
                            {
                                row.Status = $"Gửi ảnh thất bại!!!";
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            DateTime nowUtc1 = DateTime.UtcNow;
                            int year1 = nowUtc1.Year;
                            int month1 = nowUtc1.Month;
                            int day1 = nowUtc1.Day;
                            int hour1 = nowUtc1.Hour + 7;
                            int minute1 = nowUtc1.Minute;
                            row.Status = $"Kháng Xong {hour1}:{minute1} {day1}/{month1}/{year1}";
                            pro.Status = $"Kháng Xong {hour1}:{minute1} {day1}/{month1}/{year1}";
                            pro.Cookie = requestUnlock282.GetCookie();
                            row.Process = "Xong - Unlock Xong";
                            return;
                        }
                        if (check282again.Contains("country_code"))
                        {
                            if (check282www.Contains("\"use_different_phone_number_label\""))
                            {
                                string clickNewphone = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"USE_DIFFERENT_PHONE\",\"enrollment_id\":null},\"scale\":1}&doc_id=24140390112241280").Result;
                            }
                            if (check282www.Contains("contact_point_challenge_variant\":\"REVERIFY_PHONE_NUMBER_WITH_NEW_ADDED_PHONE_AND_WHATSAPP"))
                            {
                                string clicknewPhone2 = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"1\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"UNSET_CONTACT_POINT\",\"enrollment_id\":null},\"scale\":1}&doc_id=24140390112241280").Result;
                            }
                            if (!isVeryphone)
                            {
                                row.Status = "Phải Up Sđt";
                                return;
                            }
                        //lấy phone
                        getphoneagain:;
                            if (sitePhone == "winmail.shop(800đ)")
                            {
                                countrycode = "US";
                            }
                            else
                            {
                                countrycode = "VN";
                            }
                            SimCodeApi getPhone = new SimCodeApi(sitePhone, apisim);
                            string phone = getPhone.GetPhone();
                            row.Status = $"Lấy thành công {phone}";
                            string ClickSendphone = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SET_CONTACT_POINT\",\"contactpoint\":\"" + phone + "\",\"country_code\":\"" + countrycode + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6666461530033597").Result;
                            if (ClickSendphone.Contains("resend_code_button_label")) // kiểm tra xem sđt đó có được kh hay là kh dùng được
                            {
                                //nhập code
                                string code = getPhone.GetCode();
                                if (string.IsNullOrEmpty(code))
                                {
                                    row.Status = "Không về code";
                                    return;
                                }
                                row.Status = $"Lấy thành công {code}";
                                string ClickSendcode = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"3\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_CODE\",\"code\":\"" + code + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6666461530033597").Result;
                            }
                            else
                            {
                                row.Status = $"Lỗi, lấy số khác...";
                                demphonefail++;
                                if (demphonefail == 3)
                                {
                                    row.Status = "Không lấy được sđt";
                                    return;
                                }
                                Task.Delay(1000).Wait();
                                goto getphoneagain;
                            }
                            row.Status = "Tải ảnh từ site AI";
                            if (webImageunlock == "unrealperson.com")
                            {
                                string getlinkimg = requestUnlock282.GetOther("https://api.unrealperson.com/person", "https://www.unrealperson.com/");
                                string linkimg = Regex.Match(getlinkimg, "\"image_url\":\"(.*?)\"").Groups[1].Value;
                                requestUnlock282.DownloadFile($"https://api.unrealperson.com/image?name={linkimg}&type=tpdne", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.unrealperson.com/");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    return;
                                }
                                else row.Status = $"Tải Ảnh thành công";
                            }
                            else if (webImageunlock == "thispersondoesnotexit.com")
                            {

                                requestUnlock282.DownloadFile("https://thispersondoesnotexist.com", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    return;
                                }
                                else row.Status = $"Tải Ảnh thành công";
                            }
                            else if (webImageunlock == "Lấy Ảnh Từ Folder")
                            {
                                string[] fileNames = Directory.GetFiles(folderImg282);
                                if (fileNames.Length > 0)
                                {
                                    Random random = new Random();
                                    string randomImagePath = fileNames[random.Next(fileNames.Length)];
                                    codeimg = requestUnlock282.UploadIMG(randomImagePath);
                                    if (string.IsNullOrEmpty(codeimg))
                                    {
                                        row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                        return;
                                    }
                                }
                            }
                            else if (webImageunlock == "this-person-does-not-exist.com")
                            {
                                string getlinkimg = requestUnlock282.GetOther("https://this-person-does-not-exist.com/new?time=1687107303156&gender=all&age=19-25&etnic=all", "https://this-person-does-not-exist.com/en");
                                string linkimg = Regex.Match(getlinkimg, "name\":\"(.*?)\"").Groups[1].Value;
                                requestUnlock282.DownloadFile($"https://this-person-does-not-exist.com/img/{linkimg}", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://this-person-does-not-exist.com/en");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    return;
                                }
                                else row.Status = $"Tải Ảnh thành công";
                            }
                            else if (webImageunlock == "boredhumans.com")
                            {
                                string getlinkimg = requestUnlock282.GetOther("https://www.boredhumans.com/api_faces2.php", "https://www.boredhumans.com/faces.php");
                                string linkimg = Regex.Match(getlinkimg, "src=\"(.*?)\"").Groups[1].Value;
                                requestUnlock282.DownloadFile($"https://www.boredhumans.com{linkimg}", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.boredhumans.com/faces.php");
                                string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                                if (!File.Exists(file))
                                {
                                    row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                    return;
                                }
                                // row tai anh thanh cong
                                codeimg = requestUnlock282.UploadIMG282(file);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    return;
                                }
                                else row.Status = $"Tải Ảnh thành công";
                            }
                            string submitimg2 = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"6\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"UPLOAD_IMAGE\",\"image_upload_handle\":\"" + codeimg + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=9004853972920088").Result;
                            string ketqua2 = Regex.Match(submitimg2, "disagreed_date\":\"(.*?)\"").Groups[1].Value;
                            if (string.IsNullOrEmpty(ketqua2))
                            {
                                row.Status = $"Gửi ảnh thất bại!!!";
                                return;
                            }
                            DateTime nowUtc2 = DateTime.UtcNow;
                            int year2 = nowUtc2.Year;
                            int month2 = nowUtc2.Month;
                            int day2 = nowUtc2.Day;
                            int hour2 = nowUtc2.Hour + 7;
                            int minute2 = nowUtc2.Minute;
                            row.Status = $"Kháng Xong {hour2}:{minute2} {day2}/{month2}/{year2}";
                            pro.Status = $"Kháng Xong {hour2}:{minute2} {day2}/{month2}/{year2}";
                            pro.Cookie = requestUnlock282.GetCookie();
                            return;
                        }
                        string ClickProceed = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"1\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"PROCEED\",\"enrollment_id\":null},\"scale\":1}&doc_id=6666461530033597").Result;
                        string ClickSubmitCaptcha = ClickProceed;
                        string captcha_persist_data = Regex.Match(ClickSubmitCaptcha, "captcha_persist_data\":\"(.*?)\"").Groups[1].Value;
                        if (!string.IsNullOrEmpty(captcha_persist_data))
                        {
                            if (siteCaptcha == "anycaptcha.com")
                            {
                                if (!string.IsNullOrEmpty(captcha_persist_data))
                                {
                                    row.Status = "Giải Captcha...";
                                    AnyCaptchaHelper.AnyCaptcha anycaptcha = new AnyCaptchaHelper.AnyCaptcha();
                                    string resAnycaptcha = anycaptcha.RecaptchaV2Proxyless(apiCaptcha, "6Lc9qjcUAAAAADTnJq5kJMjN9aD1lxpRLMnCS2TR", "https://www.fbsbx.com/captcha/recaptcha/iframe/?referer=https%253A%252F%252Fwww.facebook.com&locale=vi_VN&__cci=FQAREhISAA%3D%3D.ARbgTtFw-K8J1R4kmMd4SP_pprREXHXVawWV6JsLVhdUkhRz").Result;
                                    if (string.IsNullOrEmpty(resAnycaptcha))
                                    {
                                        row.Status = "Giải Captcha thất bại!!!";
                                        row.Process = "Xong - Lỗi Unlock";
                                        return;
                                    }
                                    ClickSubmitCaptcha = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_BOT_CAPTCHA_RESPONSE\",\"bot_captcha_persist_data\":\"" + captcha_persist_data + "\",\"bot_captcha_response\":\"" + resAnycaptcha + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6457203271003396").Result;
                                }
                            }
                            else if (siteCaptcha == "1stcaptcha.com")
                            {
                                if (!string.IsNullOrEmpty(captcha_persist_data))
                                {
                                    row.Status = "Giải Captcha...";
                                    RequestHTTP request1sCaptcha = new RequestHTTP();
                                    string getTaskId = request1sCaptcha.Get($"https://api.1stcaptcha.com/recaptchav2?apikey={apiCaptcha}&sitekey=6Lc9qjcUAAAAADTnJq5kJMjN9aD1lxpRLMnCS2TR&siteurl=https://www.fbsbx.com/captcha/recaptcha/iframe/?referer=https%253A%252F%252Fwww.facebook.com&locale=vi_VN&__cci=FQAREhISAA%3D%3D.ARbgTtFw-K8J1R4kmMd4SP_pprREXHXVawWV6JsLVhdUkhRz&invisible=false").Result;
                                    string taskId = Regex.Match(getTaskId, "TaskId\":(\\d+)").Groups[1].Value;
                                    if (string.IsNullOrEmpty(taskId))
                                    {
                                        row.Status = "Giải Captcha thất bại!!!";
                                        row.Process = "Xong - Lỗi Unlock";
                                        return;
                                    }
                                    string getres1scaptcha = request1sCaptcha.Get($"https://api.1stcaptcha.com/getresult?apikey={apiCaptcha}&taskid={taskId}").Result;
                                    while (!getres1scaptcha.Contains("SUCCESS"))
                                    {
                                        Task.Delay(3000).Wait();
                                        getres1scaptcha = request1sCaptcha.Get($"https://api.1stcaptcha.com/getresult?apikey={apiCaptcha}&taskid={taskId}").Result;
                                    }
                                    string res1scaptcha = Regex.Match(getres1scaptcha, "Token\":\"(.*?)\"").Groups[1].Value;
                                    ClickSubmitCaptcha = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_BOT_CAPTCHA_RESPONSE\",\"bot_captcha_persist_data\":\"" + captcha_persist_data + "\",\"bot_captcha_response\":\"" + res1scaptcha + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6457203271003396").Result;
                                }
                            }
                            else if (siteCaptcha == "omocaptcha.com")
                            {
                                row.Status = "Giải Captcha...";
                                RequestHTTP requestOmocaptcha = new RequestHTTP();
                                string createJobomocaptcha = requestOmocaptcha.PostJson("https://omocaptcha.com/api/createJob", "{\"api_token\": \"" + apiCaptcha + "\",\"data\": {\"type_job_id\": \"2\"}}").Result    ;
                                if (!createJobomocaptcha.Contains("job_id"))
                                {
                                    row.Status = "Giải Captcha thất bại!!!";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                string jobId = Regex.Match(createJobomocaptcha, "job_id\":(\\d+)").Groups[1].Value;
                                string getJobResult = requestOmocaptcha.PostJson("https://omocaptcha.com/api/getJobResult", "{\"api_token\": \"" + apiCaptcha + "\",\"job_id\": " + jobId + "}").Result;
                                while (!getJobResult.Contains("success"))
                                {
                                    Task.Delay(3000).Wait();
                                    getJobResult = requestOmocaptcha.PostJson("https://omocaptcha.com/api/getJobResult", "{\"api_token\": \"" + apiCaptcha + "\",\"job_id\": " + jobId + "}").Result;
                                    if (getJobResult.Contains("timeout"))
                                    {
                                        row.Status = "Giải Captcha thất bại!!!";
                                        row.Process = "Xong - Lỗi Unlock";
                                        return;
                                    }
                                }
                                string resOmocaptcha = Regex.Match(getJobResult, "result\":{\"(.*?)\"").Groups[1].Value;
                                if (string.IsNullOrEmpty(resOmocaptcha))
                                {
                                    row.Status = "Giải Captcha thất bại!!!";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                ClickSubmitCaptcha = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_BOT_CAPTCHA_RESPONSE\",\"bot_captcha_persist_data\":\"" + captcha_persist_data + "\",\"bot_captcha_response\":\"" + resOmocaptcha + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6457203271003396").Result;
                            }
                            else if (siteCaptcha == "2captcha.com")
                            {
                                row.Status = "Giải Captcha...";
                                RequestHTTP request2captcha = new RequestHTTP();
                                string getRequestid = request2captcha.Get($"https://2captcha.com/in.php?key={apiCaptcha}&method=userrecaptcha&googlekey=6Lc9qjcUAAAAADTnJq5kJMjN9aD1lxpRLMnCS2TR&pageurl=https://www.fbsbx.com/captcha/recaptcha/iframe/?referer=https%253A%252F%252Fwww.facebook.com&locale=vi_VN&__cci=FQAREhISAA%3D%3D.ARbgTtFw-K8J1R4kmMd4SP_pprREXHXVawWV6JsLVhdUkhRz").Result;
                                string requestId = Regex.Match(getRequestid, "(\\d+)").Groups[1].Value;
                                if (string.IsNullOrEmpty(requestId))
                                {
                                    row.Status = "Giải Captcha thất bại!!!";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                string getRes2captcha = request2captcha.Get($"https://2captcha.com/res.php?key={apiCaptcha}&action=get&json=1&id={requestId}").Result;
                                while (getRes2captcha.Contains("CAPCHA_NOT_READY"))
                                {
                                    Task.Delay(3000).Wait();
                                    getRes2captcha = request2captcha.Get($"https://2captcha.com/res.php?key={apiCaptcha}&action=get&json=1&id={requestId}").Result;
                                }
                                string res2captcha = Regex.Match(getRes2captcha, "request\":\"(.*?)\"").Groups[1].Value;
                                // CAPCHA_NOT_READY
                                if (string.IsNullOrEmpty(res2captcha))
                                {
                                    row.Status = "Giải Captcha thất bại!!!";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                ClickSubmitCaptcha = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_BOT_CAPTCHA_RESPONSE\",\"bot_captcha_persist_data\":\"" + captcha_persist_data + "\",\"bot_captcha_response\":\"" + res2captcha + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6457203271003396").Result;
                            }
                            else if (siteCaptcha == "CAPTCHA FREE (MAX 2K/1DAY)")
                            {
                                row.Status = "Giải Captcha...";
                                int demfreecapt = 0;
                                RequestHTTP requestfreecaptcha = new RequestHTTP();
                                string getData = requestfreecaptcha.PostJson("https://api.nopecha.com/token/", "{\"key\": \"sub_1OPgq1CRwBwvt6ptW5FX94uX\", \"type\": \"recaptcha2\", \"sitekey\": \"6Lc9qjcUAAAAADTnJq5kJMjN9aD1lxpRLMnCS2TR\", \"url\": \"https://www.fbsbx.com/captcha/recaptcha/iframe/?referer=https%253A%252F%252Fwww.facebook.com&locale=vi_VN&__cci=FQAREhISAA%3D%3D.ARbgTtFw-K8J1R4kmMd4SP_pprREXHXVawWV6JsLVhdUkhRz\"}").Result;
                                string data = Regex.Match(getData, "\"data\":\"(.*?)\"").Groups[1].Value;
                                if (string.IsNullOrEmpty(data))
                                {
                                    row.Status = "Giải Captcha thất bại!!!";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                string getResfreecaptcha = requestfreecaptcha.Get($"https://api.nopecha.com/token?key=sub_1OPgq1CRwBwvt6ptW5FX94uX&id={data}").Result;
                                while (getResfreecaptcha.Contains("error")&& demfreecapt<3)
                                {
                                    demfreecapt++;
                                    Task.Delay(3000).Wait();
                                    getResfreecaptcha = requestfreecaptcha.Get($"https://api.nopecha.com/token?key=sub_1OPgq1CRwBwvt6ptW5FX94uX&id={data}").Result;
                                }
                                string res2captcha = Regex.Match(getResfreecaptcha, "data\": \"(.*?)\"").Groups[1].Value;
                                // CAPCHA_NOT_READY
                                if (string.IsNullOrEmpty(res2captcha))
                                {
                                    row.Status = "Giải Captcha thất bại!!!";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                ClickSubmitCaptcha = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_BOT_CAPTCHA_RESPONSE\",\"bot_captcha_persist_data\":\"" + captcha_persist_data + "\",\"bot_captcha_response\":\"" + res2captcha + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6457203271003396").Result;
                            }
                        }

                        if (ClickSubmitCaptcha.Contains("REVERIFY_PHONE_NUMBER_WITH_NEW_ADDED_PHONE") || ClickSubmitCaptcha.Contains("ADD_NEW_SECURITY_PHONE") || ClickSubmitCaptcha.Contains("REVERIFY_PHONE_NUMBER_WITH_NEW_ADDED_PHONE_AND_WHATSAPP"))
                        {
                            string check282www2 = requestUnlock282.Get("https://www.facebook.com/checkpoint/1501092823525282").Result;

                            if (check282www2.Contains("\"use_different_phone_number_label\""))
                            {
                                string clickNewphone = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"USE_DIFFERENT_PHONE\",\"enrollment_id\":null},\"scale\":1}&doc_id=24140390112241280").Result;
                            }
                            if (check282www2.Contains("contact_point_challenge_variant\":\"REVERIFY_PHONE_NUMBER_WITH_NEW_ADDED_PHONE_AND_WHATSAPP"))
                            {
                                string clicknewPhone2 = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"1\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"UNSET_CONTACT_POINT\",\"enrollment_id\":null},\"scale\":1}&doc_id=24140390112241280").Result;
                            }
                            row.Status = "Giải mã captcha thành công";
                            Task.Delay(1000).Wait();
                            if (!isVeryphone)
                            {
                                row.Status = "Phải Up Sđt";
                                row.Process = "Xong - Unlock Xong";
                                return;
                            }
                        //lấy phone
                        getphoneagain:;
                            if (sitePhone == "winmail.shop(800đ)")
                            {
                                countrycode = "US";
                            }
                            else
                            {
                                countrycode = "VN";
                            }
                            SimCodeApi getPhone = new SimCodeApi(sitePhone, apisim);
                            string phone = getPhone.GetPhone();
                            row.Status = $"Phone: {phone}";
                            string ClickSendphone = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"2\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SET_CONTACT_POINT\",\"contactpoint\":\"" + phone + "\",\"country_code\":\"" + countrycode + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6666461530033597").Result;
                            if (ClickSendphone.Contains("resend_code_button_label")) // kiểm tra xem sđt đó có được kh hay là kh dùng được
                            {
                                //nhập code
                                string code = getPhone.GetCode();
                                if (string.IsNullOrEmpty(code))
                                {
                                    row.Status = "Không về code";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                row.Status = $"Code: {code}";
                                string ClickSendcode = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"3\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"SUBMIT_CODE\",\"code\":\"" + code + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=6666461530033597").Result;
                            }
                            else
                            {
                                row.Status = $"Lỗi, lấy số khác...";
                                demphonefail++;
                                if (demphonefail == 3)
                                {
                                    row.Status = "Không lấy được sđt";
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                                Task.Delay(1000).Wait();
                                goto getphoneagain;
                            }
                        }
                        row.Status = "Tải ảnh từ site AI";
                        if (webImageunlock == "unrealperson.com")
                        {
                            string getlinkimg = requestUnlock282.GetOther("https://api.unrealperson.com/person", "https://www.unrealperson.com/");
                            string linkimg = Regex.Match(getlinkimg, "\"image_url\":\"(.*?)\"").Groups[1].Value;
                            requestUnlock282.DownloadFile($"https://api.unrealperson.com/image?name={linkimg}&type=tpdne", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.unrealperson.com/");
                            string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                            if (!File.Exists(file))
                            {
                                row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            // row tai anh thanh cong
                            codeimg = requestUnlock282.UploadIMG282(file);
                            if (string.IsNullOrEmpty(codeimg))
                            {
                                row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            else row.Status = $"Tải Ảnh thành công";
                        }
                        else if (webImageunlock == "thispersondoesnotexit.com")
                        {

                            requestUnlock282.DownloadFile("https://thispersondoesnotexist.com", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg");
                            string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                            if (!File.Exists(file))
                            {
                                row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                return;
                            }
                            // row tai anh thanh cong
                            codeimg = requestUnlock282.UploadIMG282(file);
                            if (string.IsNullOrEmpty(codeimg))
                            {
                                row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            else row.Status = $"Tải Ảnh thành công";
                        }
                        else if (webImageunlock == "this-person-does-not-exist.com")
                        {
                            string getlinkimg = requestUnlock282.GetOther("https://this-person-does-not-exist.com/new?time=1687107303156&gender=all&age=19-25&etnic=all", "https://this-person-does-not-exist.com/en");
                            string linkimg = Regex.Match(getlinkimg, "name\":\"(.*?)\"").Groups[1].Value;
                            requestUnlock282.DownloadFile($"https://this-person-does-not-exist.com/img/{linkimg}", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://this-person-does-not-exist.com/en");
                            string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                            if (!File.Exists(file))
                            {
                                row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            // row tai anh thanh cong
                            codeimg = requestUnlock282.UploadIMG282(file);
                            if (string.IsNullOrEmpty(codeimg))
                            {
                                row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            else row.Status = $"Tải Ảnh thành công";
                        }
                        else if (webImageunlock == "boredhumans.com")
                        {
                            string getlinkimg = requestUnlock282.GetOther("https://www.boredhumans.com/api_faces2.php", "https://www.boredhumans.com/faces.php");
                            string linkimg = Regex.Match(getlinkimg, "src=\"(.*?)\"").Groups[1].Value;
                            requestUnlock282.DownloadFile($"https://www.boredhumans.com{linkimg}", Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg", "https://www.boredhumans.com/faces.php");
                            string file = Environment.CurrentDirectory + "\\Image282\\" + pro.UID + ".jpg";

                            if (!File.Exists(file))
                            {
                                row.Status = "Lỗi tải ảnh từ site AI"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            // row tai anh thanh cong
                            codeimg = requestUnlock282.UploadIMG282(file);
                            if (string.IsNullOrEmpty(codeimg))
                            {
                                row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                row.Process = "Xong - Lỗi Unlock";
                                return;
                            }
                            else row.Status = $"Tải Ảnh thành công";
                        }
                        else if (webImageunlock == "Lấy Ảnh Từ Folder")
                        {
                            string[] fileNames = Directory.GetFiles(folderImg282);
                            if (fileNames.Length > 0)
                            {
                                Random random = new Random();
                                string randomImagePath = fileNames[random.Next(fileNames.Length)];
                                codeimg = requestUnlock282.UploadIMG(randomImagePath);
                                if (string.IsNullOrEmpty(codeimg))
                                {
                                    row.Status = "Lỗi UpLoad Ảnh"; // lỗi cú pháp 
                                    row.Process = "Xong - Lỗi Unlock";
                                    return;
                                }
                            }
                        }
                        string submitimg = requestUnlock282.GraphApi("&variables={\"input\":{\"client_mutation_id\":\"6\",\"actor_id\":\"" + pro.UID + "\",\"action\":\"UPLOAD_IMAGE\",\"image_upload_handle\":\"" + codeimg + "\",\"enrollment_id\":null},\"scale\":1}&doc_id=9004853972920088").Result;
                        string ketqua = Regex.Match(submitimg, "disagreed_date\":\"(.*?)\"").Groups[1].Value;
                        if (string.IsNullOrEmpty(ketqua))
                        {
                            row.Status = $"Gửi ảnh thất bại!!!";
                            row.Process = "Xong - Lỗi Unlock";
                            return;
                        }
                        DateTime nowUtc = DateTime.UtcNow;
                        int year = nowUtc.Year;
                        int month = nowUtc.Month;
                        int day = nowUtc.Day;
                        int hour = nowUtc.Hour + 7;
                        int minute = nowUtc.Minute;
                        row.Status = $"Kháng Xong {hour}:{minute} {day}/{month}/{year}";
                        pro.Status = $"Kháng Xong {hour}:{minute} {day}/{month}/{year}";
                        pro.Cookie = requestUnlock282.GetCookie();
                        row.Process = "Xong - Unlock Xong";
                        Task.Delay(delay * 1000).Wait();
                    }
                    catch
                    {
                        row.Status = "Lỗi mạng";
                        row.Process = "Xong - Lỗi Unlock";
                        return;
                    }
                });

                this.Dispatcher.Invoke((Action)(() => {
                    MessageBox.Show("Gỡ 282 Xong");
                    btnStopUnlock282.IsEnabled = true;
                    btnStartUnlock282.IsEnabled = true;
                }));
            }); tk.Start();
        }

        bool isStopunlock282 = false;
        private void Click_btnStopUnlock282(object sender, RoutedEventArgs e)
        {
            isStopunlock282 = true;
            btnStopUnlock282.IsEnabled=false;
        }

        private void chk_isveryphone(object sender, RoutedEventArgs e)
        {
            cb_webphone.IsEnabled= true;
        }

        private void unchk_isveryphone(object sender, RoutedEventArgs e)
        {
            cb_webphone.IsEnabled = false;
        }

        // viết code chức năng

    }
}
Editor is loading...
Leave a Comment