Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //I get the Response from the HotSpot so I can fill a ViewModel with the
- // hidden parameters.
- HtmlDocument htmlElement = new HtmlDocument();
- responseClass = new HttpRequestResponse("", "https://secure.etecsa.net:8443");
- htmlElement.LoadHtml(responseClass.SendNautaRequest());
- FillaNautaViewModel(htmlElement);
- string parms =
- String.Format(
- "wlanuserip={0}&wlanacname={1}&wlanmac={2}&firsturl={3}&ssid={4}&usertype={5}&gotopage={6}&successpage={7}&loggerId={8}&lang={9}&username={10}&password={11}&CSRFHW={12}",
- _nautaViewModel.wlanuserip, _nautaViewModel.wlanacname, _nautaViewModel.wlanmac,
- _nautaViewModel.firsturl, _nautaViewModel.ssid, _nautaViewModel.usertype, _nautaViewModel.gotopage,
- _nautaViewModel.successpage, _nautaViewModel.loggerId, _nautaViewModel.lang,
- "xxx", "xxxx", _nautaViewModel.CSRFHW);
- string login = responseClass.Login(parms);
- htmlElement.LoadHtml(login);
- if (htmlElement.DocumentNode.Descendants("script").Any(c => c.ParentNode.Name == "body"))
- {
- MessageBox.Show(
- htmlElement.DocumentNode.Descendants("script")
- .First(c => c.ParentNode.Name == "body")
- .InnerHtml.Split('"')[1]);
- }
- else
- {
- GetLeftTime();
- }
Add Comment
Please, Sign In to add comment