Esempio n. 1
0
        public bool Login()
        {
            browser.Url = "https://adiglobal.us/Pages/WebRegistration.aspx";
            HtmlAgilityPack.HtmlDocument document = browser.GetWebRequest();
            NameValueCollection          formData = browser.GetFormData(document);

            formData["MSO_PageHashCode"]     = "2691463195435";
            formData["__SPSCEditMenu"]       = "true";
            formData["MSOTlPn_View"]         = "0";
            formData["MSOTlPn_ShowSettings"] = "false";
            formData["MSOTlPn_Button"]       = "none";
            formData["MSOSPWebPartManager_DisplayModeName"] = "Browse";
            formData["__EVENTTARGET"]     = "ctl00$PlaceHolderMain$ctl00$ctlLoginView$MainLoginView$MainLogin$LoginButton";
            formData["__EVENTARGUMENT"]   = "";
            formData["__VIEWSTATE"]       = "/wEPDwUBMA9kFgJmD2QWBAIBDxYCHhBkYXRhLWlzLXBvc3RiYWNrBQExFgQCBA9kFgJmD2QWAgIBDxYCHhNQcmV2aW91c0NvbnRyb2xNb2RlCymIAU1pY3Jvc29mdC5TaGFyZVBvaW50LldlYkNvbnRyb2xzLlNQQ29udHJvbE1vZGUsIE1pY3Jvc29mdC5TaGFyZVBvaW50LCBWZXJzaW9uPTEyLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTcxZTliY2UxMTFlOTQyOWMBZAIID2QWAmYPZBYCZg9kFgRmDxUEAjE1ATIUaHR0cHM6Ly9hZGlnbG9iYWwudXMUaHR0cHM6Ly9hZGlnbG9iYWwudXNkAgIPZBYCZg9kFgRmDxUWGGh0dHBzOi8vY2RuLmFkaWdsb2JhbC51cwgyMDE0MDkxMxhodHRwczovL2Nkbi5hZGlnbG9iYWwudXMIMjAxNDA5MTMYaHR0cHM6Ly9jZG4uYWRpZ2xvYmFsLnVzCDIwMTQwOTEzGGh0dHBzOi8vY2RuLmFkaWdsb2JhbC51cwgyMDE0MDkxMxhodHRwczovL2Nkbi5hZGlnbG9iYWwudXMIMjAxNDA5MTMYaHR0cHM6Ly9jZG4uYWRpZ2xvYmFsLnVzCDIw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LU/8LiAQLU/4LjAQLbkIbGBQK064aOCALC7q3hDQKGwOr9AgLq8OXoBQKaueyoCQLmj6vTBwLkovrPAwLarrP9BoHBXyNl6lY33BkKH2Vuh9DiZvW7";
            formData["ctl00$PlaceHolderMain$ctl00$ctlLoginView$MainLoginView$MainLogin$UserName"] = "******";
            formData["ctl00$PlaceHolderMain$ctl00$ctlLoginView$MainLoginView$MainLogin$Password"] = "******";
            formData["ctl00$PlaceHolderHeader$headerContent_cntrl$ADILoginView$MainLoginView$MainLogin$UserName"]   = "******";
            formData["ctl00$PlaceHolderHeader$headerContent_cntrl$ADILoginView$MainLoginView$MainLogin$Password"]   = "******";
            formData["ctl00$PlaceHolderHeader$headerContent_cntrl$ADILoginView$SplashLoginView$MainLogin$UserName"] = "";
            formData["ctl00$PlaceHolderHeader$headerContent_cntrl$ADILoginView$SplashLoginView$MainLogin$Password"] = "";
            formData["ctl00$PlaceHolderHeader$headerContent_cntrl$ADILoginView$hidden_url_location"] = "";
            formData["ctl00$xyHF"] = "";
            formData["MSOSPWebPartManager_StartWebPartEditingName"] = "";
            formData["MSOSPWebPartManager_OldDisplayModeName"]      = "Browse";
            formData["MSOWebPartPage_Shared"]           = "";
            formData["MSOLayout_LayoutChanges"]         = "";
            formData["MSOLayout_InDesignMode"]          = "";
            formData["MSOAuthoringConsole_FormContext"] = "";
            formData["MSOAC_EditDuringWorkflow"]        = "";
            formData["MSOGallery_SelectedLibrary"]      = "";
            formData["MSOGallery_FilterString"]         = "";
            formData["MSOWebPartPage_PostbackSource"]   = "";
            formData["MSOTlPn_SelectedWpId"]            = "";
            HtmlAgilityPack.HtmlDocument doc = browser.PostRequest(null, formData);
            return(true);
        }
Esempio n. 2
0
        public static bool Login()
        {
            while (true)
            {
                lock (LoginLock)
                {
                    if (LoggedIn)
                    {
                        return(true);
                    }

                    //Utility.ApplicationLog("Log In to SecLock");
                    String Url = "https://www.seclock.com/account/login.asp?m=login"; //Settings.GetValue("ADILoginPage");
                    HtmlAgilityPack.HtmlDocument document = browser.GetWebRequest(Url);
                    NameValueCollection          formData = browser.GetFormData(document);
                    formData["pwd"]       = Settings.GetValue("SecLockPassword");
                    formData["email"]     = Settings.GetValue("SecLockUsername");
                    formData["iRemember"] = "1";
                    HtmlAgilityPack.HtmlDocument doc = browser.PostRequest(Url, null, formData);
                    LoggedIn = doc.DocumentNode.OuterHtml.Contains("Logout");
                    if (LoggedIn)
                    {
                        //Utility.ApplicationLog("SecLock login sucessful");
                        return(true);
                    }
                    else
                    {
                        Utility.ApplicationLog("Login failed for SecLock");
                        Utility.SendAlertMail("Login Failed", "Login Failed for https://www.seclock.com");
                        return(false);
                    }
                }
                System.Threading.Thread.Sleep(1000);
            }
            //return true;
        }