Skip to content

Instantly share code, notes, and snippets.

@tprynn
tprynn / util.js
Last active February 1, 2022 13:34
Frida utility functions
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) {
@tprynn
tprynn / ssls.md
Last active October 1, 2023 11:49
List of libraries implementing SSL/TLS

List of libraries implementing SSL/TLS

Generic OpenSSL replacement

  • LibreSSL
  • BearSSL

Embedded

  • mbedTLS (PolarSSL)
  • MatrixSSL
@tprynn
tprynn / md4.rb
Created August 6, 2014 15:33
Ruby md4 implementation
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