Skip to content

Instantly share code, notes, and snippets.

View shilch's full-sized avatar
:octocat:
May the forks be with you

Simon shilch

:octocat:
May the forks be with you
View GitHub Profile
@shilch
shilch / homecrypt
Created November 4, 2020 08:54
Simple FreeBSD rc script for mounting encrypted home directory disk image during boot time
#!/bin/sh
. /etc/rc.subr
# PROVIDE: homecrypt
# REQUIRE: FILESYSTEMS
# BEFORE: LOGIN
name="homecrypt"
desc="Home directory encryption"
@shilch
shilch / main.c
Created November 1, 2020 22:10
Solution for Cyber Security Rumble CTF 2020 - Pady McPadface
#!/usr/bin/env python3
from pwn import *
n = 23946008544227658126007712372803958643232141489757386834260550742271224503035086875887914418064683964046938371640632153677880813529023769841157840969433316734058706481517878257755290676559343682013294580085557476138201639446709290119631383493940405818550255561589074538261117055296294434994144540224412018398452371792093095280080422459773487177339595746894989682038387107119249733105558301840478252766907821053044992141741079156669562032221433390029219634673005161989684970682781410366155504440886376453225497112165607897302209008685179791558898003720802478389914297472563728836647547791799771532020349546729665006643
def get_ciphertexts():
conn = remote('chal.cybersecurityrumble.de', 34187)
while (conn.recvline()) != b'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n':
pass
@shilch
shilch / merkle.c
Last active March 14, 2022 22:03
Streaming merkle tree construction with minimal memory implemented in C
#include "merkle.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
void merkle_init(merkle_ctx* ctx){
ctx->size = 0;
ctx->mutated = false;
}
@shilch
shilch / keybase.md
Created November 2, 2018 15:15
keybase.md

Keybase proof

I hereby claim:

  • I am shilch on github.
  • I am shilch (https://keybase.io/shilch) on keybase.
  • I have a public key ASCt5xbacLMWh23alroxXSWvPkG3nx3VyoXBAU7J0lig0Ao

To claim this, I am signing this object:

@shilch
shilch / hanoi.js
Created February 10, 2017 15:51
Tower of Hanoi
// algorithm
let h=(n,a='A',b='B',c='C')=>n===1?console.log('%s -> %s',a,c):h(n-1,a,c,b)||h(1,a,b,c)||h(n-1,b,a,c);
// usage
h(3);
// prints:
// A -> C
// A -> B
// C -> B
// A -> C
@shilch
shilch / index.html
Last active July 16, 2016 09:18
Loading spinner in CSS
<style>
.spinner {
display: block;
width: 128px;
height: 128px;
border: 5px solid transparent;
border-top: 5px solid red;
border-radius: 50%;
animation: rotate 2s cubic-bezier(0.35, 0.61, 0.35, 0.61) infinite;
}