- LibreSSL
- BearSSL
- mbedTLS (PolarSSL)
- MatrixSSL
module.exports = { | |
hexStringToIntArray: function(str) { | |
var res = [] | |
for(var i = 0; i < str.length; i += 2) { | |
res.push(parseInt(str.substring(i, i+2), 16)) | |
} | |
return res | |
}, | |
byteArrayToHexString: function(array) { |
f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAsARAAAAAAABAAAAAAAAAALgKAAAAAAAAAAAAAEAAOAAIAEAAHAAbAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgAAAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAAAAAAAAABAAAABQAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAFwHAAAAAAAAXAcAAAAAAAAAACAAAAAAAAEAAAAGAAAAYAcAAAAAAABgB2AAAAAAAGAHYAAAAAAAKAIAAAAAAAAwAgAAAAAAAAAAIAAAAAAAAgAAAAYAAAB4BwAAAAAAAHgHYAAAAAAAeAdgAAAAAADQAQAAAAAAANABAAAAAAAACAAAAAAAAAAEAAAABAAAABwCAAAAAAAAHAJAAAAAAAAcAkAAAAAAAEQAAAAAAAAARAAAAAAAAAAEAAAAAAAAAFDldGQEAAAAOAYAAAAAAAA4BkAAAAAAADgGQAAAAAAANAAAAAAAAAA0AAAAAAAAAAQAAAAAAAAAUeV0ZAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAvbGliNjQvbGQtbGludXgteDg2LTY0LnNvLjIABAAAABAAAAABAAAAR05VAAAAAAACAAAABgAAACAAAAAEAAAAFAAAAAMAAABHTlUA9Il3qGrQRKItg7lrcUo3xLlmyI4BAAAAAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASAAAAAAAAAAAAAAAAAAAAAAAAACAAAAASAAAAAAAAAAAAAAAAAAAAAAAAADIAAAAgAAAAAAAAAAAAAAAAAAAAAAAAABkAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAASAAAA |
#!/usr/env python | |
############################################################################################################### | |
## [Title]: linuxprivchecker.py -- a Linux Privilege Escalation Check Script | |
## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift | |
##------------------------------------------------------------------------------------------------------------- | |
## [Details]: | |
## This script is intended to be executed locally on a Linux box to enumerate basic system info and | |
## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text | |
## passwords and applicable exploits. |
# Curve25519+ECDH implementation in Ruby | |
# Disclaimer: This code is for learning purposes ONLY. It is NOT secure. | |
# Tanner Prynn | |
require 'SecureRandom' | |
require 'digest' | |
# Fast Modular Exponentiation (base**exp % mod) | |
def modexp(base, exp, mod) | |
prod = 1 |
def md4(string) | |
# functions | |
mask = (1 << 32) - 1 | |
f = proc {|x, y, z| x & y | x.^(mask) & z} | |
g = proc {|x, y, z| x & y | x & z | y & z} | |
h = proc {|x, y, z| x ^ y ^ z} | |
r = proc {|v, s| (v << s).&(mask) | (v.&(mask) >> (32 - s))} | |
# initial hash | |
a, b, c, d = 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476 |
def sha1(string) | |
# functions and constants | |
mask = 0xffffffff | |
s = proc{|n, x| ((x << n) & mask) | (x >> (32 - n))} | |
f = [ | |
proc {|b, c, d| (b & c) | (b.^(mask) & d)}, | |
proc {|b, c, d| b ^ c ^ d}, | |
proc {|b, c, d| (b & c) | (b & d) | (c & d)}, | |
proc {|b, c, d| b ^ c ^ d}, | |
].freeze |
/********** | |
* SmartThings Arduino Shield On/Off | |
* For use on Arduino Mega | |
* author: github.com/tprynn | |
* Attach Shield normally with switch on 2/3. | |
* Jumper pins: | |
* - 18 (Tx1) to Shield 3 (Rx) | |
* - 19 (Rx1) to Shield 2 (Tx) | |
**********/ |
/********** | |
* SmartThings Arduino Shield Passthrough | |
* For use on Arduino Mega | |
* author: github.com/tprynn | |
* Attach Shield normally with switch on 2/3. | |
* Jumper pins: | |
* - 18 (Tx1) to Shield 3 (Rx) | |
* - 19 (Rx1) to Shield 2 (Tx) | |
**********/ |
/* ISTA 303 Assignment 1 | |
* Tanner Prynn | |
* communities.pde | |
* Implements a signal-passing automata based on a random graph. | |
* Some notes: | |
* - Nodes are connected according to their relative distances. | |
* - Communication between nodes in the same community is shown in green, | |
* communication between different communities is shown in red. | |
* - Nodes are more likely to communicate within their own communities. | |
* - Messages spread outward from their origination point. |