Guest User

Untitled

a guest
Jul 3rd, 2016
289
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $url = "http://172.16.16.16/24online/webpages/client.jsp"
  2. $urlGoogle = "https://www.google.com"
  3.  
  4. $username="Username"
  5. $password="Password"
  6.  
  7. $execBrowser=New-Object -com internetexplorer.application;
  8. $execBrowser.visible=$true;
  9. $execBrowser.navigate($url);
  10.  
  11. function Check
  12. {
  13. $execBrowser.document.getElementsByName("username")[0].value=$username
  14. $execBrowser.document.getElementsByName("password")[0].value=$password
  15. $execBrowser.document.getElementsByName("login")[0].click();
  16.  
  17. while($execBrowser.Busy -eq $true)
  18. {
  19. Start-Sleep -Milliseconds 2000;
  20. }
  21. $http_request = New-Object -ComObject Msxml2.XMLHTTP
  22. $http_request.open('GET', $urlGoogle, $false);
  23. $http_request.send();
  24.  
  25. $http_request.status;
  26. $http_request.statusText;
  27. }
  28.  
  29. Write-Host "Processing in browser"
  30. while($execBrowser.Busy -eq $true)
  31. {
  32. Start-Sleep -Milliseconds 2000;
  33. }
  34.  
  35. Check
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×