CCCPaste

Basic Web form filling in PowerShell and IE

<#
Basic Web form filling in PowerShell and IE
you need to start power shell like this:
PowerShell -ExecutionPolicy Bypass <script.ps1>
#>

Get InnerHTML of all DIV tags on a web page

$Browser = New-Object -COM "InternetExplorer.Application"
$URL = "http://filmsbykris.com/v6/index.php"

$Browser.Navigate($URL)
While ($Browser.ReadyState -ne 4) { Start-Sleep -Seconds 1 }

unzip files with Power Shell

$shell = new-object -com shell.application
$zip = $shell.NameSpace("C:\test.zip")
foreach($item in $zip.items())
{
$shell.Namespace("C:\test").copyhere($item)

Basic Webserver 1

<#
This creates a web server on port 8080
It servers up output from this script.
example: http://localhost:8080/hello

Arguments

<#
Script By Kris Occhipinti
http://filmsbykris.com
June 6th 2014
GPLv3

basename

<#
Get's the base file name of a file
#>
$url = "http://test.com/folder/file.png"
Write-Host "The URL is $url"

Get and Run Quake - Windows - Progess Bar

<#
Gets and Runs Quake for Windows
#>


My Wget in PowerShell

<#
Not Really WGET
This is my own powershell for basic file downloading.

Script By Kris Occhipinti

Download a file with Power Shell

Write-Output "Downloading File..."

$storageDir = $pwd
$webclient = New-Object System.Net.WebClient
$url = "https://dl.dropbox.com/s/69s8hogh2sxcqrl/miniweb-win32-20130309.zip"

Basic Webserver 2 - request file

<#
From "http://obscuresecurity.blogspot.com/2014/05/dirty-powershell-webserver.html"
Webserver on port 8000
will serve up a file if you request it by name
example: "http://localhost:8000/index.html"