Skip to content

Instantly share code, notes, and snippets.

@HanEmile
HanEmile / tickets.emile.space.nix
Last active February 10, 2024 15:55
Horrible nix pretix hackery
{ config, pkgs... }:
# Future People: This place is not a place of honor... no highly esteemed deed
# is commemorated here... nothing valued is here...
# Look at the docker volumes section: You'll have to build and fail a few
# times... sorry
let
# environment.etc."pretix.cfg".text = ''
pretix_config = pkgs.writeText "pretix.cfg" ''
@HanEmile
HanEmile / spider.js
Created January 24, 2024 10:30
small naive javascript spider for the toolbar
javascript: (function() {
var visited = [];
var recursiveSpider = function(url) {
if (visited.indexOf(url) != -1) {
return;
}
visited.push(url);
console.log(url);
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
@HanEmile
HanEmile / looooooooooong_stacktrace.txt
Created August 27, 2023 21:05
A long nix stacktrace
error:
… while calling anonymous lambda
at /nix/store/0iqihbvgw5r24rvff4mkikzz0v0lalh1-source/lib/attrsets.nix:812:24:
811| let f = attrPath:
812| zipAttrsWith (n: values:
| ^
813| let here = attrPath ++ [n]; in
@HanEmile
HanEmile / heldentat.py
Created August 27, 2023 13:45
The not working, but insanely fun writeup for the "run of the mill" challenge from the dragon sector ctf quals 2022(?).
#! /usr/bin/env nix-shell
#! nix-shell -i python -p python39Packages.termcolor
import sys
from termcolor import colored, cprint
"""
DragonSector CTF 2021 - Run of the Mill
This was an awesome challenge, although this script is what is left over of a
@HanEmile
HanEmile / heldentat.py
Created June 19, 2023 08:35
indore ctf pwn Lengan
#!/usr/bin/env python3
from pwn import *
context.binary = "./main_fixed"
# rops
rop_mov_r0_r6_t_adr = 0x00010d2c # ; mov r0,r6 / pop {r4, r5, r6, pc}
rop_add_r0_r4_t_adr = 0x0001fd74 # ; add r0, r4 / pop {r4, pc}
rop_pop_lr_t_adr = 0x00045f5a # ; pop.w {r4, lr} / nop.w / pop {r4, pc}
@HanEmile
HanEmile / writeup.md
Created June 18, 2023 16:50
writeups for the bsides indor ctf 2023
@HanEmile
HanEmile / main.go
Last active June 10, 2023 17:05
A super simple fuzzer for the easterhegg 2023 workshop
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
"time"
)
@HanEmile
HanEmile / configuration.nix
Created January 17, 2023 09:03
my mail nix configuration
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
@HanEmile
HanEmile / mail.nix
Created January 17, 2023 09:00
minimal simple-nixos-mailserver config
{ config, pkgs, ... }:
let
release = "nixos-21.11";
in {
imports = [
(builtins.fetchTarball {
# Pick a commit from the branch you are interested in
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz";
# And set its hash
sha256 = "1i56llz037x416bw698v8j6arvv622qc0vsycd20lx3yx8n77n44";
@HanEmile
HanEmile / main.rs
Last active March 27, 2024 15:50
base64 implemented in rust
/// base64 can be generated by taking chunks of 3 bytes from the input and
/// mapping them onto 4 output chunks as shown below:
///
/// ```raw
/// | M | a | n | ascii
/// | 77 | 97 | 110 | decimal
/// | 0x4d | 0x61 | 0x6e | hex
/// | | | |
/// | a | b | c | chunk name
/// | | | |