Skip to content

Instantly share code, notes, and snippets.

View b-irb's full-sized avatar
💤
Procrastinating

birb b-irb

💤
Procrastinating
View GitHub Profile
@b-irb
b-irb / sigma.py
Last active August 1, 2022 08:46
from cryptography.hazmat.primitives import hashes, hmac
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazmat.primitives.asymmetric import x25519
from cryptography.hazmat.primitives.serialization import (
load_pem_public_key,
load_pem_private_key
)
def main():
sk_path = ...
@b-irb
b-irb / obfuscated.py
Created April 20, 2020 22:52
Arguably, code is art.
assert (
lambda f:(lambda x: x(x)
)(lambda y: f(lambda x: y(y)(x))))(
lambda f: lambda n: ( lambda n: n(
lambda f: lambda x: lambda y: y())(
lambda x: lambda y: x()))(n)(
lambda: lambda f: lambda x: f(x))(
lambda: (lambda x: lambda y: lambda f: y(
x(f)))(n)(f(( lambda n: (lambda p: p(
lambda x: lambda y: y))( n((lambda p: (
@b-irb
b-irb / bug.c
Created April 19, 2020 23:09
Silent but deadly C.
/* Can you find the bug without ASan or Valgrind?
*
* $ gcc --version
* gcc (Arch Linux 9.3.0-1) 9.3.0
* $ gcc -Wall -Wextra -pedantic bug.c -o bug
*/
#include <stdio.h>
#include <stdlib.h>
enum event_type { SUCCESS, FAILURE, WARNING, DEBUG };