Last active
April 30, 2017 01:02
-
-
Save cdiaz/976e0de8f93d58902969a9302474be93 to your computer and use it in GitHub Desktop.
Revisions
-
cdiaz revised this gist
Apr 30, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Wind ``` ## Usage Save this [Script](https://gist.github.com/cdiaz/976e0de8f93d58902969a9302474be93#file-loginchaira-ps1) and running from the Command Line (cmd) ```bash @powershell -ExecutionPolicy unrestricted ./loginchaira.ps1 'username' 'password' -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,8 +36,8 @@ copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Wind ``` ## Usage Save a Script https://gist.github.com/cdiaz/976e0de8f93d58902969a9302474be93#file-loginchaira-ps1 And running from the Command Line (cmd) ```bash @powershell -ExecutionPolicy unrestricted ./loginchaira.ps1 'username' 'password' ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,8 +36,8 @@ copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Wind ``` ## Usage Save a Script https://gist.github.com/cdiaz/976e0de8f93d58902969a9302474be93#file-loginchaira-ps1 Running from the Command Line (cmd) ```bash @powershell -ExecutionPolicy unrestricted ./loginchaira.ps1 'username' 'password' ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,9 @@ $ie = New-Object -COM InternetExplorer.Application -Property @{ } while($ie.busy) { #Focus window iexplore $window = Select-UIElement -ProcessName iexplore #Close Chaira Alert $window | Send-UIKeys '{ESCAPE}' } -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,10 +20,10 @@ choco ###Install Wasp (Windows Automation Snap-in for Powershell) ```bash choco install wasp ``` ####More info https://chocolatey.org/packages/wasp ####Copy the following modules to Windows PowerShell Module Path ```bash copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 17 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,36 +1,43 @@ ##Instructions: ####Download and Install Chocolatey (Package Manager for PowerShell) Run in the Command Line (cmd) ```bash @powershell -NoProfile -ExecutionPolicy unrestricted -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ``` #####Other installation methods: https://github.com/chocolatey/choco/wiki/Installation ####Make sure the chocolatey is include in $env:Path ```bash $env:path ``` ####Check installed version ```bash choco ``` ###Install Wasp (Windows Automation Snap-in for Powershell) ```bash choco install wasp ####More info https://chocolatey.org/packages/wasp ``` ####Copy the following modules to Windows PowerShell Module Path ```bash copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` ```bash copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` ```bash copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` ## Usage Running Script from the Command Line (cmd) ```bash @powershell -ExecutionPolicy unrestricted ./loginchaira.ps1 'username' 'password' ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 13 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,23 @@ ##Instructions: ####Download and Install Chocolatey (Package Manager for PowerShell) ```sh iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) ``` ####Make sure the chocolatey is include in $env:Path ```sh $env:path ``` ####Check installed version ```sh choco ``` ###Install Wasp (Windows Automation Snap-in for Powershell) ```sh choco install wasp ``` ####Copy the following modules to Windows PowerShell Module Path ```sh copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` @@ -26,4 +26,11 @@ copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Window ``` ```sh copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` ## Usage Running Script from the Command Line (cmd) ```sh powershell.exe ./loginchaira.ps1 'username' 'password' ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,11 +19,11 @@ choco install wasp ``` ###Copy the following modules to Windows PowerShell Module Path ```sh copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` ```sh copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` ```sh copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,12 @@ choco choco install wasp ``` ###Copy the following modules to Windows PowerShell Module Path ```sh copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` ``` ```sh copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` ``` ```sh copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,8 +18,6 @@ choco choco install wasp ``` ###Copy the following modules to Windows PowerShell Module Path + `copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` + `copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` + `copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 19 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +1,25 @@ #Instructions: ###Download and Install Chocolatey (Package Manager for PowerShell) ```sh iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) ``` ###Make sure the chocolatey is include in $env:Path ```sh $env:path ``` ###Check installed version ```sh choco ``` ###Install Wasp (Windows Automation Snap-in for Powershell) ```sh choco install wasp ``` ###Copy the following modules to Windows PowerShell Module Path ```sh + `copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` + `copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` + `copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules` ``` -
cdiaz revised this gist
Apr 14, 2016 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ Instructions: #Download and Install Chocolatey (Package Manager for PowerShell) iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) #Make sure the chocolatey is include in $env:Path $env:path #Check installed version choco #Install Wasp (Windows Automation Snap-in for Powershell) choco install wasp #Copy the following modules to Windows PowerShell Module Path copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules copy-item C:\ProgramData\chocolatey\lib\reflection -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules
-
cdiaz created this gist
Apr 14, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ Import-Module wasp # Windows Automation Snap-in for Powershell $url = 'https://chaira.udla.edu.co/Chaira/Logon.aspx' $username = $args[0] $password = $args[1] $ie = New-Object -COM InternetExplorer.Application -Property @{ Visible = $true Navigate = $url } while($ie.busy) { $window = Select-UIElement -ProcessName iexplore $window | Send-UIKeys '{ESCAPE}' } $ie.Document.getElementById("_Usuario").value = $username $ie.Document.getElementById("_Password").value = $password $ie.Document.getElementByID("ext-gen49").Click()