This file contains 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
$endpoint = New-Object System.Net.IPEndPoint ([System.Net.IPAddress]::any, 1600) | |
$Listener = New-Object System.Net.Sockets.TcpListener $endpoint | |
$Listener.Start() | |
$client = $Listener.AcceptTcpClient() | |
$stream = $client.GetStream() | |
$stream.Write([text.Encoding]::Ascii.GetBytes("Hello Telnet World"), 0, 18) |
This file contains 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
## A Serial control traffic capture from Alinco DJ-X11 wide band receiver. | |
[13/07/2016 00:09:11] Written data (COM4) | |
41 4c 7e 44 4a 2d 58 31 31 45 0d AL~DJ-X11E. | |
[13/07/2016 00:09:11] Read data (COM4) | |
41 4c 7e 44 4a 2d 58 31 31 45 0d 0d 0a 4f 4b 0d AL~DJ-X11E...OK. | |
0a . |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<h1>Let's generate you a cert so you don't have to use a password!</h1> | |
Hit the Generate button and then install the certificate it gives you in your browser. | |
All modern browsers (except for Internet Explorer) should be compatible. | |
<form method="post"> | |
<keygen name="pubkey" challenge="randomchars"> | |
The username I want: <input type="text" name="username" value="Alice"> | |
<input type="submit" name="createcert" value="Generate"> | |
</form> |
This file contains 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
(* ::Package:: *) | |
(* ::Input:: *) | |
(* SHA-2 Constant calculator | |
Calculation of SHA-2 uses a group of precomputed constants as part of the hash calculation. These numbers are pregiven on the standard, but also explained to come from fractional part of a cube root of primes. This notebook calculates these constants. | |
Source: http://dx.doi.org/10.6028/NIST.FIPS.180-4 | |
*) | |
This file contains 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
# Configuration to enable ENC28J60 ethernet adapter. | |
USEMODULE += enc28j60 | |
USEMODULE += gnrc_netdev2 | |
CFLAGS += -DENC28J60_PARAM_SPI=SPI_0 | |
CFLAGS += -DENC28J60_PARAM_CS="GPIO_PIN(PORT_B,6)" | |
CFLAGS += -DENC28J60_PARAM_INT="GPIO_PIN(PORT_C,7)" | |
CFLAGS += -DENC28J60_PARAM_RESET="GPIO_PIN(PORT_A,9)" |
This file contains 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
# Configuration to enable PoEll-i Nucleo ethernet adapter. | |
USEMODULE += encx24j600 | |
USEMODULE += gnrc_netdev2 | |
CFLAGS += -DENCX24J600_SPI=SPI_0 | |
CFLAGS += -DENCX24J600_CS="GPIO_PIN(PORT_C,10)" | |
CFLAGS += -DENCX24J600_INT="GPIO_PIN(PORT_D,2)" |
This file contains 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
require "rubygems" | |
require "json" | |
require "net/http" | |
require "uri" | |
location = ARGV.join("%20") | |
location = "Helsinki,Finland" if location.nil? || location.empty? | |
uri = URI.parse("http://api.openweathermap.org/data/2.5/weather?q=" + location) | |
http = Net::HTTP.new(uri.host, uri.port) |
This file contains 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
import binascii | |
import struct | |
import logging | |
logger = logging.getLogger() | |
#logger.setLevel(logging.DEBUG) | |
TPM2_ST_NO_SESSIONS = 0x8001 | |
TPM2_CC_Hash = 0x0000017D |
This file contains 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
#!/usr/bin/env python | |
import binascii | |
import struct | |
import logging | |
logger = logging.getLogger() | |
#logger.setLevel(logging.DEBUG) | |
TPM_TAG_RQU_COMMAND = 0x00C1 |
This file contains 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
import os | |
from ctypes import cdll, create_string_buffer | |
import binascii | |
import logging | |
logger = logging.getLogger() | |
TSS_HASH_SHA1 = 0x00000001 | |
def main(): |
NewerOlder