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
[ 0.000000] Linux version 3.14.18 ([email protected]) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r42586) ) #15 Wed Sep 24 11:18:53 CST 2014 | |
[ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3 | |
[ 0.000000] bootconsole [early0] enabled | |
[ 0.000000] CPU0 revision is: 0001964c (MIPS 24KEc) | |
[ 0.000000] MIPS: machine is VoCore | |
[ 0.000000] Determined physical RAM map: | |
[ 0.000000] memory: 02000000 @ 00000000 (usable) | |
[ 0.000000] Initrd not found or empty - disabling initrd | |
[ 0.000000] Zone ranges: | |
[ 0.000000] Normal [mem 0x00000000-0x01ffffff] |
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
/** | |
* \file | |
* Test to show how packed structures work in C. | |
* | |
* Eric S. Raymond has written a great introduction to structure packing | |
* (http://www.catb.org/esr/structure-packing/) | |
* | |
* @author: Lari Lehtomäki <[email protected]> | |
* @date: 2015-05-29 | |
* |
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
TbsHandle:548 | |
Supported algorithms: | |
Rsa | |
Sha1 | |
Hmac | |
Aes | |
Keyedhash | |
Xor | |
Sha256 | |
Rsassa |
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(): |
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 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
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
# 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
# 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
(* ::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 | |
*) | |
OlderNewer