Skip to content

Instantly share code, notes, and snippets.

Kasper Fabæch Brandt poizan42

Block or report user

Report or block poizan42

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
poizan42 /
Last active Sep 4, 2019
A tool for finding encodings that encodes a given string to a given binary value, or for finding possible combinations of encoding+decoding that would convert a string to a given mojibake
#/usr/bin/env python3
import re
import sys
import encodings
import pkgutil
all_encodings = set()
for _, modname, _ in pkgutil.iter_modules(
encodings.__path__, encodings.__name__ + '.',
poizan42 / inf-primes.v
Created Nov 27, 2014
Proof of the infinitude of primes
View inf-primes.v
Require Import Coq.ZArith.ZArith.
Require Import Coq.ZArith.Znumtheory.
Require Import Coq.Sets.Ensembles.
Require Import Coq.Sets.Finite_sets.
Require Import Coq.PArith.BinPos.
Definition Z_ens := Ensemble Z.
Print Finite.
Print Empty_set.
Definition is_empty_set U A := forall x, ~(In U A x).
poizan42 / .config
Last active Aug 20, 2019
crosstool-ng#962 failure
View .config
# Automatically generated file; DO NOT EDIT.
# crosstool-NG Configuration
poizan42 / test.bin
Last active Feb 4, 2019
File that break ZOutputStream from BouncyCastle
View test.bin
This file has been truncated, but you can view the full file.
poizan42 / explodeUtf8.sml
Last active Sep 28, 2018
UTF-8 decoder in Standard ML
View explodeUtf8.sml
exception Encoding of string;
fun decodeUtf8Chars nil = nil
| decodeUtf8Chars (c::rest) =
if c < #"\128" then (ord c)::(decodeUtf8Chars rest)
val cn = ord c
(* 0xF4 is the largest allowed start byte after the restriction
View Excluded.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExcludedFileTest
I do not compile!
class Excluded
poizan42 / Makefile
Last active Jul 30, 2018
Demonstration of running 32-bit code on WSL
View Makefile
call32test: call32test.o call32.o
gcc -g $^ -o $@
call32test.o: call32test.c
gcc -g -c $< -o $@
call32.o: call32.asm
nasm -f elf64 call32.asm -o call32.o
View make-test-unit.log
Makefile:126: The docker client CLI has moved to For a dev-test cycle involving the CLI, run:
DOCKER_CLI_PATH=/host/path/to/cli/binary make shell
then change the cli and compile into a binary at the same location.
docker build -t "docker-dev:master" -f "Dockerfile" .
Sending build context to Docker daemon 251.1MB
Step 1/94 : FROM golang:1.10.3 AS base
---> 4e611157870f
Step 2/94 : ENV GO_VERSION 1.10.3
poizan42 / EwsId_format.txt
Last active Jun 28, 2018
EwsId reverse engineered format
View EwsId_format.txt
IdStorageType (byte):
MailboxItemSmtpAddressBased = 0, // Exchange 2007 (EwsLegacyId)
PublicFolder = 1,
PublicFolderItem = 2,
MailboxItemMailboxGuidBased = 3,
ConversationIdMailboxGuidBased = 4,
ActiveDirectoryObject = 5, // Exchange 2013
MailboxItemMailboxGuidBasedWithFallback = 6 // Exchange 2016
CompressionId (byte):
poizan42 / MailSend.cs
Created Jun 14, 2018
Demonstration of bad heuristics in som AV products, old-style .csproj edition, see
View MailSend.cs
class Program
public const string pad =
You can’t perform that action at this time.