daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Sep 22nd, 2016 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. $Url = 'https://www.eurotoll.fr/dynamic/login/login.action?LANGUE=fr'
  3. $Username = “l.lucas@epsilog.eu”  
  4. $Password = “GEWAWEN2”
  5. $IE = New-Object -com internetexplor er.application;
  6. $IE.visible = $true
  7. $IE.navigate($url)
  8. $doc = $ie.document
  9.  
  10. # Wait a few seconds and then launch the executable.
  11.  
  12. while ($IE.Busy -eq $true)
  13.  
  14. {
  15.  
  16. Start-Sleep -Milliseconds 2000;
  17.  
  18. }
  19.  
  20. # The following UsernameElement, PasswordElement, and LoginElement need to be modified first.  See the notes at the top
  21. # of the script for more details.
  22.  
  23. $IE.Document.getElementById(“j_username”).value = $Username
  24. $IE.Document.getElementByID(“j_password”).value = $Password
  25.  
  26. $termsField = $ie.document.getElementsByName("terms")
  27. @($termsField)[0].value ="powershell"
  28.  
  29. $submitButton = $ie.document.getElementsByTagName("input")
  30. Foreach($element in $submitButton )
  31. {
  32.     if($element.value -eq "OK"){
  33.     Write-Host $element.click()
  34.     }
  35. }
  36.     Start-Sleep 10
  37. while ($IE.Busy -eq $true)
  38.  
  39. {
  40.  
  41. Start-Sleep -Milliseconds 2000;
  42.  
  43. }
  44.  
  45. # Invoke-Item $Executable
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top