Advertisement
Guest User

Untitled

a guest
Oct 4th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $username = Read-Host "Enter username"
  2. $securepassword = Read-Host "Enter password" -assecurestring
  3. $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword)
  4. $UnsecurePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
  5. $ie = New-Object -com InternetExplorer.Application
  6. $ie.visible=$true
  7. $ie.navigate("https://tulsatech.blackboard.com/")
  8. while($ie.ReadyState -ne 4) {start-sleep -m 100}
  9. $ie.document.getElementById("user_id").value= "$username"
  10. $ie.document.getElementById("password").value = "$unsecurepassword"
  11. $ie.document.getElementById("entry-login").Click()
  12. while($ie.Busy) {Start-Sleep 1}
  13. $links = $ie.Document.getElementsByTagName('A')
  14. $go = $links | where {$_.innerText -eq 'Cyber Security Academy Q1 2016 / 2017'}
  15. $go.click()
  16. while($ie.Busy) {Start-Sleep 1}
  17. $links = $ie.Document.getElementsByTagName('A')
  18. $go2 = $links | where {$_.innerText -eq 'Clock in / Clock out'}
  19. $go2.click()
  20. while($ie.Busy) {Start-Sleep 1}
  21. $links = $ie.Document.getElementsByTagName('A')
  22. $link = $links | where {$_.innerText -match 'Clock out’}  | select -expand  href
  23. $ie.navigate($link)
  24. while($ie.Busy) {Start-Sleep 1}
  25. $ie.document.getElementById("bottom_Continue").Click()
  26. while($ie.Busy) {Start-Sleep 1}
  27. $ticks = $ie.Document.getElementsByTagName('input')
  28. $tick1 = $ticks | where {$_.value -eq 'true'}  | select -expand  name
  29. $Wut = $tick1 | select -last 4
  30. $arr = $wut -split ‘ ‘
  31. $arr
  32. $ie.document.getElementById($arr[0]).Click()
  33. $ie.document.getElementById($arr[1]).Click()
  34. $ie.document.getElementById($arr[2]).Click()
  35. $ie.document.getElementById(“bottom_Save and Submit”).click()
  36. Write-Host "tickmark: $tick1"
  37. Write-Host "link: $link”
  38. Write-host “pass: $password”
  39. Write-host “wut: $wut”
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement