Skip to content

Instantly share code, notes, and snippets.

Benno Evers lava

  • Hamburg, Germany
Block or report user

Report or block lava

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lava / shitty_tls.cpp
Created May 27, 2019
Shitty TLS server that tries to proivde a zero-length certificate.
View shitty_tls.cpp
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
// Implementation of a TLS "server" that sends an empty server
// certificate to clients that try to connect.
lava / Makefile
Last active Oct 3, 2019
View Makefile
# Solving CTF challenges often involves a lot of work, which is very unfair to
# lazy competitors.
# To even things out, we designed this self-solving challenge:
# Just type `make flag` and make yourself a coffee while the solution is
# computed.
# Congratulations to all solvers! Writeups:
lava /
Last active Apr 4, 2019
Postprocessing script to make FreeCAD paths importible by Easel (WIP)
# ***************************************************************************
# * (c) Benno Evers ( 2019 *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it under the terms of the GNU Lesser General Public License (LGPL) *
# * as published by the Free Software Foundation; either version 2 of *
# * the License, or (at your option) any later version. *
# * for detail see the LICENCE text file. *
lava /
Last active Nov 21, 2018
Git history and merge commits

Testing the --no-ff merge strategy

I created a sample git repository by creating branches second and third adding a file with the same name each, and then rebasing the branches and merging them using git merge --no-ff:

bevers@poincare:~/code/git$ ls
initial  second  third
lava /
Last active Oct 14, 2019
GNU Make Turing machine simulator
# A turing machine simulator implemented in pure GNU Make.
# (written for HackoverCTF 2018 organised by cyclopropenylidene)
blank =
space = $(blank) $(blank)
ascii-expand = \
$(subst .,. ,\
$(subst _,_ ,\
$(subst 1,1 ,\
lava /
Last active Jan 11, 2018
34c3 writeup: minbashmaxfun

Writeup: minbashmaxfun

by lava & ntq

|                MINIMAL BASH - MAXIMAL FUN                   | 
|                                                             | 
|            Who needs regular characters anyway?             |
|                                                             | 
|         Supported characters: $ ( ) # ! { } < \ ' ,         |
|                                                             |
View agent-recovery
Relaxed Agent state recovery
# Problem
Most experienced mesos users will have encountered the following error message:
E1103 18:30:03.451825 12204 slave.cpp:6302] EXIT with status 1: Failed to perform recovery: Incompatible agent info detected.
lava /
Last active Jun 10, 2018
Nethack armor comparison

Nethack armor comparison

Imagine this totally hypothetical situation: You're in a boring meeting without internet, play a round of nethack as a rogue, and come across a dwarvish mithril-coat. Should you replace your current leather armor? On the one hand, mithril sounds pretty nifty. On the other hand, it seems a bit out-of-character for a rogue to wear full plate armor, so surely there are some good reasons to keep the leather?

Luckily, you are a professional developer, so you have a local copy of the games' source code.

lava /
Last active Jun 18, 2019
Hello, world: Deep analysis of a shallow program.

Hello, world!

Please explain in detail what will happen if the following program is executed:

#include <iostream>

int main() {
    std::cout << "Hello, world!" << std::endl;
lava / gist:4706289
Created Feb 4, 2013
Python and CPP kalman filter update
View gist:4706289
def kalman_update(state_mean, state_cov, measurement, measurement_matrix, meas_cov):
# meas_cov should be a matrix with the right dimensions
statedim = state_mean.size
x = reshape( atleast_2d(state_mean), (statedim,1) )
C = atleast_2d( state_cov )
H = atleast_2d(measurement_matrix)
y = atleast_2d(np.array(measurement))
innovation = y - dot(H,x)
You can’t perform that action at this time.