Skip to content

Instantly share code, notes, and snippets.

View f0rki's full-sized avatar

Michael Rodler f0rki

View GitHub Profile
@f0rki
f0rki / import-github-sshkey.sh
Last active January 23, 2020 09:55
Import SSH keys from github with a simple bash script
#!/bin/bash
set -eu
if ! which jq >/dev/null && which curl >dev/null; then
echo "Installing dependencies!"
/usr/bin/pacman -Syu --noconfirm curl jq
fi
if (( $# != 2 )); then
echo "Import ssh public keys from github user to authorized_keys"
@f0rki
f0rki / Makefile
Last active January 17, 2020 00:09
Can you LD_PRELOAD from noexec mounted directory?
all: test preload.so
clean:
-$(RM) test preload.so
%.so: %.c
$(CC) $^ -o $@ -shared -fPIC $(CFLAGS)
@f0rki
f0rki / exploit_nomoreblind.py
Created March 15, 2017 21:31
full exploit for nomoreblidn from sharifctf 7
#!/usr/bin/env python
import gc
import pwnlib # NOQA
from pwn import * # NOQA
context.arch = "i386"
context.os = "linux"
@f0rki
f0rki / wat.py
Created February 6, 2017 11:05
angr: unexpected behaviour regarding endianess and memory.store and loads through instruction
from __future__ import print_function
import os
import subprocess as sp
import angr
from claripy import BVS, BVV
src = """
@f0rki
f0rki / result-type-in.c
Created October 18, 2016 08:32
using something like rust Result in C?
#include <stdbool.h>
#include <stdio.h>
#define DEFINE_RESULT(T, E, NAME) \
typedef struct { \
bool success : 1; \
union { \
T result; \
E error; \
}; \
@f0rki
f0rki / main.fish
Last active December 19, 2016 10:45
fish script for fetching, building, switching between different LLVM branches
#!/usr/bin/fish
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <contact@f0rki.at> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return.
# ----------------------------------------------------------------------------
# prefered git mirror
set -g GIT_MIRROR "https://github.com/llvm-mirror/"
@f0rki
f0rki / tapebagel.rs
Last active May 31, 2018 02:23
Interpreter for the TapeBagel esoteric language
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <contact@f0rki.at> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return.
* ----------------------------------------------------------------------------
*/
/// Interpreter for the TapeBagel esoteric language
@f0rki
f0rki / attack_turbo.py
Last active October 25, 2015 17:23
python script to solve tumctf teaser challenge turbo (crypto 100)
# compression "oracle"
import sys
from pwn import remote, log, context, process
import string
import zlib
#context.log_level = 'debug'
BLKSIZE = 16
doremote = True
#doremote = False

Keybase proof

I hereby claim:

  • I am f0rki on github.
  • I am f0rki (https://keybase.io/f0rki) on keybase.
  • I have a public key whose fingerprint is ECC5 1F7E DA2A 3E35 807B CF42 BCFE F3D1 E4BC 65A1

To claim this, I am signing this object:

@f0rki
f0rki / ext4check.py
Created August 28, 2013 10:30
quick and dirty python script to check how much of the original data is left if a partition or a image is formatted using ext4. Hint: it's none ;)
#!/usr/bin/python
"""
quick test to check how much of the original data is left if a partition or a
image is formatted using ext4.
"""
from __future__ import print_function
import os
import sys