Advertisement
metalx1000

Basic Web form filling in PowerShell and IE

Jun 20th, 2014
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2. Basic Web form filling in PowerShell and IE
  3. you need to start power shell like this:
  4. PowerShell -ExecutionPolicy Bypass <script.ps1>
  5. #>
  6.  
  7. $Browser = New-Object -COM "InternetExplorer.Application"
  8. $URL = "http://filmsbykris.com/v6/index.php"
  9. $Browser.visible = $true
  10.  
  11. $Browser.Navigate($URL)
  12. While ($Browser.ReadyState -ne 4) { Start-Sleep -Seconds 1 }
  13.  
  14. $Inputs = $Browser.Document.getElementsByTagName("input")
  15.  
  16.  
  17. ($Inputs |select -first 1).value = "metal"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement