Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = Read-Host "Enter username"
- $securepassword = Read-Host "Enter password" -assecurestring
- $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecurePassword)
- $UnsecurePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
- $ie = New-Object -com InternetExplorer.Application
- $ie.visible=$true
- $ie.navigate("https://tulsatech.blackboard.com/")
- while($ie.ReadyState -ne 4) {start-sleep -m 100}
- $ie.document.getElementById("user_id").value= "$username"
- $ie.document.getElementById("password").value = "$unsecurepassword"
- $ie.document.getElementById("entry-login").Click()
- while($ie.Busy) {Start-Sleep 1}
- $links = $ie.Document.getElementsByTagName('A')
- $go = $links | where {$_.innerText -eq 'Cyber Security Academy Q1 2016 / 2017'}
- $go.click()
- while($ie.Busy) {Start-Sleep 1}
- $links = $ie.Document.getElementsByTagName('A')
- $go2 = $links | where {$_.innerText -eq 'Clock in / Clock out'}
- $go2.click()
- while($ie.Busy) {Start-Sleep 1}
- $links = $ie.Document.getElementsByTagName('A')
- $link = $links | where {$_.innerText -match 'Clock in’} | select -expand href
- $ie.navigate($link)
- while($ie.Busy) {Start-Sleep 1}
- $ie.document.getElementById("bottom_Begin").Click()
- while($ie.Busy) {Start-Sleep 1}
- $ticks = $ie.Document.getElementsByTagName('input')
- $tick1 = $ticks | where {$_.value -eq 'true'} | select -expand name
- $Wut = $tick1 | select -last 4
- $arr = $wut -split ‘ ‘
- $arr
- $ie.document.getElementById($arr[0]).Click()
- $ie.document.getElementById($arr[1]).Click()
- $ie.document.getElementById($arr[2]).Click()
- $ie.document.getElementById($arr[3]).Click()
- $ie.document.getElementById(“bottom_Save and Submit”).click()
- Write-Host "tickmark: $tick1"
- Write-Host "link: $link”
- Write-host “pass: $password”
- Write-host “wut: $wut”
- while($ie.Busy) {Start-Sleep 1}
- $ie.navigate("https://tulsatech.blackboard.com/")
- while($ie.Busy) {Start-Sleep 1}
- $links = $ie.Document.getElementsByTagName('A')
- $go = $links | where {$_.innerText -eq 'Cyber Security Academy Q1 2016 / 2017'}
- $go.click()
- while($ie.Busy) {Start-Sleep 1}
- $links = $ie.Document.getElementsByTagName('A')
- $go2 = $links | where {$_.innerText -eq 'Clock in / Clock out'}
- $go2.click()
- while($ie.Busy) {Start-Sleep 1}
- $links = $ie.Document.getElementsByTagName('A')
- $link = $links | where {$_.innerText -match 'Clock out’} | select -expand href
- $ie.navigate($link)
- while($ie.Busy) {Start-Sleep 1}
- $ie.document.getElementById("bottom_Begin").Click()
- while($ie.Busy) {Start-Sleep 1}
- $ticks = $ie.Document.getElementsByTagName('input')
- $tick1 = $ticks | where {$_.value -eq 'true'} | select -expand name
- $Wut = $tick1 | select -last 3
- $arr = $wut -split ‘ ‘
- $arr
- $ie.document.getElementById($arr[0]).Click()
- $ie.document.getElementById($arr[1]).Click()
- $ie.document.getElementById($arr[2]).Click()
- $ie.document.getElementById(“bottom_Save and Submit”).click()
- Write-Host "tickmark: $tick1"
- Write-Host "link: $link”
- Write-host “pass: $password”
- Write-host “wut: $wut”
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement