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
# Verbindung zu Web.de aufbauen | |
$c=Test-NetConnection smtp.web.de -Port 587 | |
# Antwort vom SMTP-Server holen und ausgeben | |
[byte[]]$buffer= @(0) * $c.TcpClientSocket.Available | |
$c.TcpClientSocket.Receive($buffer) | |
[System.Text.Encoding]::ASCII.GetString($buffer) | |
# Begrüßung durchführen | |
$buffer=[System.Text.Encoding]::ASCII.GetBytes("EHLO $Env:Computername`r`n") |
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
# Format-Hex based on http://www.leeholmes.com/blog/2009/11/23/hex-dumper-in-powershell/ | |
# Extended with additional parameters and fixed some formatting issues. | |
############################################################################## | |
## | |
## Format-Hex | |
## | |
## From Windows PowerShell Cookbook (O’Reilly) | |
## by Lee Holmes (http://www.leeholmes.com/guide) | |
## |
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
$SFTCode = @" | |
[DllImport("kernel32")] public static extern uint EnumSystemFirmwareTables (uint FirmwareTableProviderSignature, IntPtr pFirmwareTableBuffer, uint BufferSize); | |
[DllImport("kernel32")] public static extern uint GetSystemFirmwareTable (uint FirmwareTableProviderSignature, uint FimrwareTableID, IntPtr pFirmwareTableBuffer, uint BufferSize); | |
"@ | |
$SFT = Add-Type -MemberDefinition $SFTCode -Name "SFTKlasse" -Language CSharp -UsingNamespace "System.Reflection", "System.Diagnostics", "System.Collections.Generic" -PassThru | |
# 0×41435049=ACPI ? https://github.com/michaelforney/coreboot/blob/master/src/include/cbmem.h |
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
$conn = New-Object system.net.sockets.tcpclient($host, $port) | |
$stream = New-Object system.net.security.sslstream($conn.getstream(), $null, { | |
Write-Host $args[2].ChainElements[0].Certificate.Subject; | |
Write-Host "PolicyErrors: $($args[3])"; | |
# Immer True zurückgeben, damit alle Zertifikate auch mit Fehler akzeptiert werden. | |
$true; | |
}) | |
$result = $stream.authenticateasclient("chocolatey.org") | |
$conn.Close() |
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
$conn = New-Object system.net.sockets.tcpclient($host, $port) | |
$stream = New-Object system.net.security.sslstream($conn.getstream(), $null, { | |
Write-Host $args[2].ChainElements[0].Certificate.Subject; | |
Write-Host "PolicyErrors: $($args[3])"; | |
}) | |
$result = $stream.authenticateasclient("chocolatey.org") | |
$conn.Close() |
NewerOlder