コード例 #1
0
        public static void Register(string proxy, bool uploadalso)
        {
            string username    = RandomValues.GenerateEmailandUserName(2);
            string password    = RandomValues.GenerateEmailandUserName(2);
            string email       = RandomValues.GenerateEmailandUserName(1);
            string name        = RandomValues.GetName();
            string registerurl = "http://likes.com/api/signupprocess?ajax=true&mobile=true&email=" + email + "&name=" + name + "&nickname=" + username + "&password="******"&redirect_url=%2F&error_redirect=%2F&token=&referer_url=";
            string regpage     = HTTP.GetSource(registerurl, Form1.timeout, proxy, new CookieContainer());

            if (regpage.Contains("\"success\": true"))
            {
                string details = username + ":" + password + ":" + email + ":" + name;
                Form1.details.Add(details);
                if (uploadalso)
                {
                    Upload(details, proxy);
                }
                if (Form1.pfiles.Length > 0)
                {
                    CookieContainer cookieC        = new CookieContainer();
                    string          loginurl       = "http://likes.com/login";
                    string          loginpage      = HTTP.GetSource(loginurl, Form1.timeout, proxy, cookieC);
                    string[]        ldetails       = details.Split(':');
                    string          PostData       = "username="******"&password="******"&ajax=true";
                    string          responsestring = HTTP.PostData(PostData, "http://likes.com/api/login", Form1.timeout, proxy, cookieC);
                    string          uploadimageurl = "http://" + ldetails[0] + ".likes.com" + "/api/uploadprocess?form_id=mobile_settings_form";
                    string          profilepic     = Form1.pfiles[rad.Next(Form1.pfiles.Length)];
                    string          uploadtext     = HTTP.UploadImage(profilepic, uploadimageurl, Form1.timeout, proxy, cookieC);
                    try
                    {
                        string imageurl = uploadtext.Substring(uploadtext.IndexOf("http://likes.images"));
                        imageurl = imageurl.Substring(0, imageurl.IndexOf("\""));
                        string profiledata      = "name=" + ldetails[3] + "&user_name=" + ldetails[0] + "&homepage_url=&about=&is_mature=0&picture=" + imageurl;
                        string profileupdateurl = "http://" + ldetails[0] + ".likes.com" + "/api/update_user_info";
                        //MessageBox.Show(profileupdateurl);
                        string responseadd = HTTP.PostData(profiledata, profileupdateurl, Form1.timeout, proxy, cookieC);
                    }
                    catch (Exception chec)
                    {
                        //MessageBox.Show(chec.ToString());
                    }
                }
            }
        }
コード例 #2
0
 private void ThreadTask(string userid, string posturl, Uri baseUrl)
 {
     try
     {
         while (stop)
         {
             string proxi = null;
             if (checkBox3.Checked && proxies.Count > 0)
             {
                 proxi = proxies[rad.Next(proxies.Count)];
             }
             string postData = "page=" + i.ToString() + "&id_type=subscribers&user_id=" + userid;
             i = i + 1;
             string response = HTTP.PostData(postData, posturl, 60, proxi, new System.Net.CookieContainer());
             if (response.Contains("{\"success\": false"))
             {
                 stop = false;
             }
             else
             {
                 HtmlAgilityPack.HtmlDocument page1 = new HtmlAgilityPack.HtmlDocument();
                 try
                 {
                     page1.LoadHtml(response);
                     HtmlAgilityPack.HtmlNodeCollection hnc = page1.DocumentNode.SelectNodes("//a[contains(@class,'blue underline')]");
                     foreach (var hn in hnc)
                     {
                         string purl = new Uri(baseUrl, hn.GetAttributeValue("href", "")).AbsoluteUri.Replace("&", "&");
                         scrapedusers.Add(purl);
                     }
                 }
                 catch
                 {
                 }
                 finally
                 {
                     page1.LoadHtml("");
                 }
             }
         }
     }
     catch { }
 }
コード例 #3
0
        public static bool Login(string logindetails, string proxy, CookieContainer cookieC)
        {
            string loginurl  = "http://friendlife.com/login";
            string loginpage = HTTP.GetSource(loginurl, Form1.timeout, proxy, cookieC);

            string[] ldetails       = logindetails.Split(':');
            string   PostData       = "username="******"&password="******"&ajax=true";
            string   responsestring = HTTP.PostData(PostData, "http://friendlife.com/api/login", Form1.timeout, proxy, cookieC);

            Console.WriteLine(responsestring);
            if (responsestring.Contains("true"))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #4
0
        public static void Upload(string logindetails, string proxy)
        {
            CookieContainer cookieC   = new CookieContainer();
            string          loginurl  = "http://likes.com/login";
            string          loginpage = HTTP.GetSource(loginurl, Form1.timeout, proxy, cookieC);

            string[] ldetails       = logindetails.Split(':');
            string   PostData       = "username="******"&password="******"&ajax=true";
            string   responsestring = HTTP.PostData(PostData, "http://likes.com/api/login", Form1.timeout, proxy, cookieC);
            string   uploadimageurl = "http://" + ldetails[0] + ".likes.com" + "/api/uploadprocess?form_id=upload_file_form";
            string   postimageurl   = "http://" + ldetails[0] + ".likes.com" + "/api/add_image";

            foreach (string file in Form1.files)
            {
                try
                {
                    Bitmap bit = new Bitmap(file);
                    //string uploadtext = HTTP.UploadImage(file,uploadimageurl, Form1.timeout, proxy, cookieC);
                    string uploadtext = HTTP.HttpUploadFile(uploadimageurl, file, proxy, "uploaded", "image/jpeg", new NameValueCollection(), cookieC);
                    string imageurl   = null;
                    string caption    = Form1.captions[rad.Next(Form1.captions.Count)];
                    if (uploadtext.Contains("likes.images"))
                    {
                        imageurl = uploadtext.Substring(uploadtext.IndexOf("http://likes.images"));
                        imageurl = imageurl.Substring(0, imageurl.IndexOf("\""));
                        //string postData = "caption=" + caption + "&nsfw=0&source_url=" + imageurl + "&add_source=mobile_add";
                        string postData    = "source_url=" + imageurl + "&nsfw=0&add_image_url=" + imageurl + "&add_source=file_upload&ft_tag=" + Form1.fttag + "&caption=" + caption + "&tags=" + Form1.fttag;
                        string responseadd = HTTP.PostData(postData, postimageurl, Form1.timeout, proxy, cookieC);
                        string imageid     = responseadd.Substring(responseadd.IndexOf("\":") + 3);
                        imageid = imageid.Substring(0, imageid.IndexOf(","));
                        string postedimageurl = "http://" + ldetails[0] + ".likes.com" + "/" + imageid;
                        Form1.postedimages.Add(postedimageurl);
                        Form1.tuploaded = Form1.tuploaded + 1;
                    }
                }
                catch (Exception ex)
                {
                    //MessageBox.Show(ex.ToString());
                }
            }
            Thread.Sleep(30000);
        }
コード例 #5
0
        public static void Comment(string imageurl, string proxy, string logindetails, bool like, bool docmt, bool share)
        {
            CookieContainer cookieC   = new CookieContainer();
            string          loginurl  = "http://likes.com/login";
            string          loginpage = HTTP.GetSource(loginurl, Form1.timeout, proxy, cookieC);

            string[] ldetails       = logindetails.Split(':');
            string   PostData       = "username="******"&password="******"&ajax=true";
            string   responsestring = HTTP.PostData(PostData, "http://likes.com/api/login", Form1.timeout, proxy, cookieC);
            string   imageid        = imageurl.Substring(imageurl.LastIndexOf("/") + 1);

            imageurl = "http://" + ldetails[0] + ".likes.com/" + imageid;
            HTTP.GetSource(imageurl, Form1.timeout, proxy, cookieC);
            if (docmt)
            {
                string postcommenturl = "http://" + ldetails[0] + ".likes.com" + "/api/add_comment";
                string comment        = Form1.comments[rad.Next(Form1.comments.Count)];
                string commentdata    = "image_id=" + imageid + "&comment_text=" + comment;
                string commentstring  = HTTP.PostData(commentdata, postcommenturl, Form1.timeout, proxy, cookieC);
                if (commentstring.Contains("\"success\": true"))
                {
                    Form1.pcomments = Form1.pcomments + 1;
                }
            }
            if (share)
            {
                string shareactionurl = "http://likes.com/api/reshare_image";
                string sharepostdata  = "reshared_image_id=" + imageid + "&caption=&add_source=mobile_reshare";
                HTTP.PostData(sharepostdata, shareactionurl, Form1.timeout, proxy, cookieC);
                Form1.pcomments = Form1.pcomments + 1;
            }
            if (like)
            {
                string likeactionurl = "http://likes.com/api/add_like";
                string likepostdata  = "image_id=" + imageid;
                HTTP.PostData(likepostdata, likeactionurl, Form1.timeout, proxy, cookieC);
                Form1.pcomments = Form1.pcomments + 1;
            }
        }
コード例 #6
0
 public static void FollowAllTest(string profileurl, string proxy, string logindetails)
 {
     HtmlAgilityPack.HtmlDocument page = new HtmlAgilityPack.HtmlDocument();
     try
     {
         CookieContainer cookieC        = new CookieContainer();
         string          loginurl       = "http://likes.com/login";
         string          loginpage      = HTTP.GetSource(loginurl, Form1.timeout, proxy, cookieC);
         string[]        ldetails       = logindetails.Split(':');
         string          PostData       = "username="******"&password="******"&ajax=true";
         string          responsestring = HTTP.PostData(PostData, "http://likes.com/api/login", Form1.timeout, proxy, cookieC);
         string          profilepage    = HTTP.GetSource(profileurl, Form1.timeout, proxy, cookieC);
         page.LoadHtml(profilepage);
         string userid         = page.DocumentNode.SelectSingleNode("//div[contains(@id,'top_subscribe_button')]").GetAttributeValue("user_id", "");
         string followdata     = "id=" + userid + "&id_type=subscribers";
         string followedstring = HTTP.PostData(followdata, profileurl + "api/follow_all", Form1.timeout, proxy, cookieC);
     }
     catch { }
     finally
     {
         page.LoadHtml("");
     }
 }
コード例 #7
0
 private void GrabLinks(string tag)
 {
     System.Net.CookieContainer   cookieC = new System.Net.CookieContainer();
     HtmlAgilityPack.HtmlDocument page    = new HtmlAgilityPack.HtmlDocument();
     try
     {
         string PostData       = "username="******"hqlsgdam" + "&password="******"laguxnvy" + "&ajax=true";
         string responsestring = HTTP.PostData(PostData, "http://likes.com/api/login", Form1.timeout, null, cookieC);
         string taggedurl      = "http://likes.com/api/feed";
         string discoverurl    = "http://likes.com/api/discover_feed";
         if (checkBox7.Checked)
         {
             for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)
             {
                 string postData = "page=" + i.ToString() + "&position=" + (i * 20).ToString() + "&per_page=20";
                 string response = HTTP.PostData(postData, taggedurl, 60, null, cookieC);
                 response = response.Substring(response.IndexOf("\"image_ids\": [") + 14);
                 if (response.Contains("\"success\": false"))
                 {
                     break;
                 }
                 response = response.Substring(0, response.IndexOf("]"));
                 string[] imageid = response.Split(',');
                 foreach (string s in imageid)
                 {
                     string tes = s.Replace("i:", "");
                     tes = tes.Replace("\"", "");
                     GrabbedLinks.Add("http://likes.com/" + tes.Replace(" ", ""));
                 }
             }
         }
         if (checkBox8.Checked)
         {
             for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)
             {
                 string postData = "page=" + i.ToString() + "&position=" + (i * 20).ToString() + "&per_page=20&discover_feed_type=trending";
                 string response = HTTP.PostData(postData, discoverurl, 60, null, cookieC);
                 response = response.Substring(response.IndexOf("\"image_ids\": [") + 14);
                 if (response.Contains("\"success\": false"))
                 {
                     break;
                 }
                 response = response.Substring(0, response.IndexOf("]"));
                 string[] imageid = response.Split(',');
                 foreach (string s in imageid)
                 {
                     GrabbedLinks.Add("http://likes.com/" + s.Replace(" ", ""));
                 }
             }
         }
         if (checkBox9.Checked)
         {
             for (int i = 0; i < Convert.ToInt32(numericUpDown1.Value); i++)
             {
                 string postData = "page=" + i.ToString() + "&position=" + (i * 20).ToString() + "&per_page=20&discover_feed_type=popular";
                 string response = HTTP.PostData(postData, discoverurl, 60, null, cookieC);
                 response = response.Substring(response.IndexOf("\"image_ids\": [") + 14);
                 if (response.Contains("\"success\": false"))
                 {
                     break;
                 }
                 response = response.Substring(0, response.IndexOf("]"));
                 string[] imageid = response.Split(',');
                 foreach (string s in imageid)
                 {
                     GrabbedLinks.Add("http://likes.com/" + s.Replace(" ", ""));
                 }
             }
         }
         MessageBox.Show("Completed");
     }
     catch { }
     finally
     {
         page.LoadHtml("");
     }
 }