Exemple #1
0
        private static List <Cookie> smethod_1(IRipper iripper_0, string string_0, string string_1)
        {
            string        url          = "https://www.tumblr.com/login";
            List <Cookie> list         = new List <Cookie>();
            string        webPage      = iripper_0.GetWebPage(url, ref list);
            HtmlDocument  htmlDocument = new HtmlDocument();
            string        str          = webPage;

            htmlDocument.LoadHtml(str);
            string string_0_1 = string.Empty;

            using (IEnumerator <HtmlNode> enumerator = ((IEnumerable <HtmlNode>)htmlDocument.get_DocumentNode().SelectNodes("//input")).GetEnumerator())
            {
                while (((IEnumerator)enumerator).MoveNext())
                {
                    HtmlNode current = enumerator.Current;
                    if (current.get_Attributes().Contains("name") && current.get_Attributes().get_Item("name").get_Value().Equals("form_key"))
                    {
                        string_0_1 = current.get_Attributes().get_Item("value").get_Value();
                    }
                }
            }
            TumblrLogin.smethod_0(iripper_0, ref list, string_0_1, string_0);
            iripper_0.PostWebPage(url, new NameValueCollection()
            {
                {
                    "determine_email",
                    string_0
                },
                {
                    "user[email]",
                    string_0
                },
                {
                    "user[password]",
                    string_1
                },
                {
                    "tumblelog[name]",
                    ""
                },
                {
                    "user[age]",
                    ""
                },
                {
                    "context",
                    "other"
                },
                {
                    "version",
                    "STANDARD"
                },
                {
                    "follow",
                    ""
                },
                {
                    "http_referer",
                    "https://www.tumblr.com/logout"
                },
                {
                    "form_key",
                    string_0_1
                },
                {
                    "seen_suggestion",
                    "0"
                },
                {
                    "used_suggestion",
                    "0"
                },
                {
                    "used_auto_suggestion",
                    "0"
                },
                {
                    "about_tumblr_slide",
                    ""
                },
                {
                    "random_username_suggestions",
                    "[\"DecadentAlpacaPerson\",\"CertainYouthNight\",\"BigAvenueObservation\",\"DarkPandaCherryblossom\",\"CyberKoalaLlama\"]"
                }
            }, ref list);
            return(list);
        }
Exemple #2
0
 public static List <Cookie> Login(IRipper myRipper, string username, string password)
 {
     return(TumblrLogin.smethod_1(myRipper, username, password));
 }