Exemple #1
0
        public string Giai_captcha(string key, int timeOut = 60)
        {
            RequestHTTP request  = new RequestHTTP();
            string      Response = request.Request("GET", "http://2captcha.com/in.php?key=" + key + "&method=userrecaptcha&googlekey=6LeilUMUAAAAAMSYwJVVq4C70mYZSy6NJoMb6q0t&pageurl=https://manager.sunfrogshirts.com/Login.cfm");

            Console.WriteLine("Post Captcha: " + Response);
            if (Response.Contains("OK"))
            {
                Response = Response.Split('|')[1];
            }
            else
            {
                return("ERROR");
            }
            for (int i = 0; i < timeOut; i++)
            {
                string captcha = request.Request("GET", "http://2captcha.com/res.php?key=" + key + "&action=get&id=" + Response);
                Console.WriteLine("Captcha: " + captcha);
                if (captcha.Contains("OK"))
                {
                    return(captcha.Split('|')[1]);
                }
                Thread.Sleep(3999);
            }
            return("ERROR");
        }
Exemple #2
0
        public bool Login(ref Accounts acc, string captcha)
        {
            string get = http.Request("GET", "https://manager.sunfrogshirts.com/Login.cfm");
            Match  m   = Regex.Match(get, "name=\"botchecker\" value=\"(.*?)\"");

            if (!m.Success)
            {
                return(false);
            }
            FormData form = new FormData();

            form.Add(new FormElement("username", acc.EMAIL));
            form.Add(new FormElement("password", acc.PASS));
            form.Add(new FormElement("g-recaptcha-response", captcha));
            form.Add(new FormElement("login", ""));
            form.Add(new FormElement("botchecker", m.Groups[1].Value));
            Console.WriteLine(form.ToPostString());
            string html    = http.Request("POST", "https://manager.sunfrogshirts.com/Login.cfm", null, form.GetData(), false);
            var    headers = http.GetResponseHeaders();

            Console.WriteLine(headers.ToString());
            if (!headers.ToString().Contains("dashboard"))
            {
                return(false);
            }
            return(true);
        }
Exemple #3
0
        void CheckFullSelectedAccount()
        {
            int    live  = 0;
            string token = "";

            lblStatus.Text = "Status: Loading!";
            // Check number of selected rows
            if (dtgvLoad.SelectedRows.Count != 0)
            {
                // Login all selected rows
                for (int i = dtgvLoad.RowCount - 1; i >= 0; i--)
                {
                    token = dtgvLoad[3, i].Value.ToString();
                    // Kiểm tra token không rỗng và được chọn
                    if (dtgvLoad[3, i].Selected && token.Length > 10)
                    {
                        RequestHTTP request  = new RequestHTTP();
                        string      htmlInfo = request.Request("GET", "https://graph.facebook.com/v2.11/me?fields=id,email,mobile_phone,name,birthday,gender&access_token=" + token);
                        htmlInfo = htmlInfo.Remove(htmlInfo.IndexOf('}'));
                        htmlInfo = htmlInfo.Substring(1);
                        htmlInfo = htmlInfo.Replace('"', ' ');
                        htmlInfo = htmlInfo.Replace(",", "|");
                        htmlInfo = htmlInfo.Replace(" ", string.Empty);

                        string strInfo = htmlInfo.Split('|')[0];

                        // Khởi tạo từng thông tin
                        string id     = "";
                        string status = "";
                        if (strInfo.Split(':')[0] == "id")
                        {
                            id = strInfo.Split(':')[1];
                        }

                        if (id.Length > 0)
                        {
                            status = "live";
                            live++;
                        }
                        else
                        {
                            status = "die";
                        }
                        dtgvLoad[12, i].Value = status;
                    }
                }
                MessageBox.Show(live + " Account live & " + (dtgvLoad.SelectedRows.Count - live) + " Account died!");
            }
            else
            {
                MessageBox.Show("Not Selected yet!", "Notification!", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            }
            lblStatus.Text = "Status: Done!";
        }
 /// <summary>
 /// nghịch thôi chứ ko có gì hết á :v
 /// </summary>
 /// <param name="uid"></param>
 /// <param name="Fbdtg"></param>
 /// <returns></returns>
 public static string FacebookDateCreatedTest(string uid, string Fbdtg)
 {
     try
     {
         RequestHTTP request_api = new RequestHTTP();
         request_api.SetSSL(System.Net.SecurityProtocolType.Tls12);
         request_api.SetKeepAlive(true);
         request_api.SetDefaultHeaders(new string[] { "content-type: Text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" });
         string get_created_time = request_api.Request("POST", "https://www.facebook.com/api/graphql", null, Encoding.UTF8.GetBytes("fb_dtsg=" + Fbdtg + "&q=node(" + uid + ")hometown{name}{friends{count},subscribers{count},groups{count},created_time,timeline_feed_units.first(500){page_info,edges{node{url,feedback{reactors{count},comments{count}}}}}}}"));
         return(Regex.Match(get_created_time, "created_time.*?(\\d+)").Groups[1].Value);
     }
     catch { return("error"); }
 }
 /// <summary>
 /// get the date created of facebook by UID
 /// </summary>
 /// <param name="uid"></param>
 /// <param name="Fbdtg"></param>
 /// <returns></returns>
 public string FacebookDateCreated(string uid, string Fbdtg)
 {
     try
     {
         RequestHTTP request_api = new RequestHTTP();
         request_api.SetSSL(System.Net.SecurityProtocolType.Tls12);
         request_api.SetKeepAlive(true);
         request_api.SetDefaultHeaders(new string[] { "content-type: Text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" });
         string get_created_time = request_api.Request("POST", "https://www.facebook.com/api/graphql", null, Encoding.UTF8.GetBytes("fb_dtsg=" + Fbdtg + "&q=node(" + uid + "){created_time}"));
         return(Regex.Match(get_created_time, "created_time.*?(\\d+)").Groups[1].Value);
     }
     catch { return("error"); }
 }
Exemple #6
0
        public static string CheckKeyAndLogin(string userName, string passWord, string idKey = "", int softIndex = 9)
        {
            string str = "";

            if (idKey.Equals(""))
            {
                idKey = GetIdKey();
            }
            #region Khai báo request
            RequestHTTP request = new RequestHTTP();
            request.SetSSL(System.Net.SecurityProtocolType.Tls12);
            request.SetKeepAlive(true);
            request.SetDefaultHeaders(new string[]
            {
                "content-type: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
                "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36",
            });
            #endregion
            string link = fLogin.domain + "CheckAll/?RequestKey=" + GetAccessKey() + "&MachineSerial=" + idKey + "&UserName="******"&PassWord="******"&SoftIndex=" + softIndex;
            str = request.Request("GET", link).ToString();
            return(str);
        }
Exemple #7
0
        // Login 1 account bằng cookie
        void LoginOneCookie(int stt)
        {
            //get cookies from token

            string token = dtgvLoad[3, stt].Value.ToString(); // Token's Location (Vị trí lấy token trong datagridview)

            RequestHTTP request         = new RequestHTTP();
            string      htmlCookie      = request.Request("GET", "https://api.facebook.com/method/auth.getSessionforApp?access_token=" + token + "&format=json&new_app_id=165907476854626&generate_session_cookies=1");
            var         json_serializer = new JavaScriptSerializer();
            var         obj             = json_serializer.Deserialize <dynamic>(htmlCookie);

            List <Cookie> listCookies = new List <Cookie>();

            for (int i = 0; i < obj["session_cookies"].Length; i++)
            {
                Cookie c*k = new Cookie(obj["session_cookies"][i]["name"], obj["session_cookies"][i]["value"], ".facebook.com", "/", DateTime.Now.AddDays(10));
                listCookies.Add(c*k);
            }

            ChromeOptions options = new ChromeOptions();

            options.AddArguments("--disable-extensions");        // to disable extension
            options.AddArguments("--disable-notifications");     // to disable notification
            options.AddArguments("--disable-application-cache"); // to disable cache
            ChromeDriverService service = ChromeDriverService.CreateDefaultService();

            service.HideCommandPromptWindow = true;
            ChromeDriver chrome = new ChromeDriver(service, options);

            chrome.Navigate().GoToUrl("https://facebook.com");

            foreach (Cookie item in listCookies)
            {
                chrome.Manage().Cookies.AddCookie(item);
            }

            chrome.Navigate().GoToUrl("https://facebook.com");
        }
Exemple #8
0
        public void AddAllAccountByToken(string listAccount)
        {
            // Tách token
            string[] strAccount = listAccount.Split('\n');
            lblTotalToken.Text = "Total Account: " + strAccount.Length.ToString();

            int successToken; // Đếm số token add thành công và không thành công

            successToken = 0;

            // Duyệt từng token
            for (int i = 0; i < strAccount.Length; i++)
            {
                if (strAccount[i].Split('|').Length == 3)
                {
                    string token = strAccount[i].Split('|')[2];

                    // Kiểm tra token rỗng
                    if (token.Length > 10)
                    {
                        RequestHTTP request  = new RequestHTTP();
                        string      htmlInfo = request.Request("GET", "https://graph.facebook.com/v2.11/me?fields=id,email,mobile_phone,name,birthday,gender&access_token=" + token);
                        htmlInfo = htmlInfo.Remove(htmlInfo.IndexOf('}'));
                        htmlInfo = htmlInfo.Substring(1);
                        htmlInfo = htmlInfo.Replace('"', ' ');
                        htmlInfo = htmlInfo.Replace(",", "|");
                        htmlInfo = htmlInfo.Replace(" ", string.Empty);

                        // Xử lý kí tự đặc biệt bằng RegEx
                        htmlInfo = Regex.Replace(htmlInfo, @"\\u([\dA-Fa-f]{4})", v => ((char)Convert.ToInt32(v.Groups[1].Value, 16)).ToString());
                        htmlInfo.Replace("/", "-");

                        string[] strInfo = htmlInfo.Split('|');
                        // Khởi tạo từng thông tin
                        string id         = "";
                        string passWord   = strAccount[i].Split('|')[1];
                        string email      = "";
                        string phone      = "";
                        string name       = "";
                        string friends    = "";
                        string groups     = "";
                        string birthday   = "";
                        string gender     = "";
                        string backupDate = "";
                        string status     = "";
                        // Quét từng thông tin của token
                        for (int j = 0; j < strInfo.Length; j++)
                        {
                            if (strInfo[j].Split(':')[0] == "id")
                            {
                                id = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "password")
                            {
                                passWord = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "email")
                            {
                                email = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "mobile_phone")
                            {
                                phone = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "name")
                            {
                                name = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "friends")
                            {
                                friends = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "groups")
                            {
                                groups = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "birthday")
                            {
                                birthday = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "gender")
                            {
                                gender = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "backup date")
                            {
                                backupDate = strInfo[j].Split(':')[1];
                            }
                            if (strInfo[j].Split(':')[0] == "status")
                            {
                                status = strInfo[j].Split(':')[1];
                            }
                        }

                        string acc = "id:" + id + "|" +
                                     "password:"******"|" +
                                     "token:" + token + "|" +
                                     "email:" + email + "|" +
                                     "phone:" + phone + "|" +
                                     "name:" + name + "|" +
                                     "friends:" + friends + "|" +
                                     "groups:" + groups + "|" +
                                     "birthday:" + birthday + "|" +
                                     "gender:" + gender + "|" +
                                     "backup date:" + backupDate + "|" +
                                     "status:live";
                        if (id != "")
                        {
                            successToken++;
                            // Ghi thêm vào file text (phải check được id mới add)
                            using (StreamWriter sw = new StreamWriter(@".\Account.txt", true))
                            {
                                sw.WriteLine(acc);
                            }
                        }
                    }
                }
            }

            MessageBox.Show(successToken.ToString() + " Account successed and " + (strAccount.Length - successToken).ToString() + " Account failed!", "Result");
        }