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 characters
function Invoke-RestMethod { | |
[CmdletBinding(HelpUri='http://go.microsoft.com/fwlink/?LinkID=217034')] | |
param( | |
[Microsoft.PowerShell.Commands.WebRequestMethod] | |
${Method}, | |
[Parameter(Mandatory=$true, Position=0)] | |
[ValidateNotNullOrEmpty()] | |
[uri] | |
${Uri}, |
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 characters
function Search-Chrome { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true, ValueFromPipeline=$true)] | |
[string]$Search | |
) | |
begin { | |
Write-Verbose -Message "Starting $($MyInvocation.Mycommand)" | |
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 characters
function Get-GitHubStatus { | |
$gitHub = Invoke-WebRequest -Uri 'https://status.github.com/api/status.json' | |
$gitHub | ConvertFrom-Json | |
} |
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 characters
$Port = 80 | |
$IPAddress = "10.0.1.95" | |
$Address = [System.Net.IPAddress]::Parse($IPAddress) | |
$EndPoint = New-Object System.Net.IPEndPoint $Address, $Port | |
$AddressFamily = [System.Net.Sockets.AddressFamily]::InterNetwork | |
$SocketType = [System.Net.Sockets.SocketType]::Dgram | |
$ProtocolType = [System.Net.Sockets.ProtocolType]::Udp |
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 characters
Add-Type -Path "$env:userprofile\Documents\Development\Other Files\PacketDotNet-0.12.0\release\PacketDotNet.dll" | |
$sourcePort = "31623" | |
$destPort = "80" | |
$packet = New-Object PacketDotNet.TcpPacket($sourcePort,$destPort) | |
$sourceAddr = [System.Net.IPAddress]::Parse("10.0.0.1") | |
$destAddr = [System.Net.IPAddress]::Parse("10.0.1.95") | |
$ipPacket = New-Object PacketDotNet.IPv4Packet($sourceAddr, $destAddr) |
NewerOlder