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
poizan42 / revenc.py
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
View revenc.py
#/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
poizan42 / .config
Last active Aug 20, 2019
crosstool-ng#962 failure
View .config
#
# Automatically generated file; DO NOT EDIT.
# crosstool-NG Configuration
#
CT_CONFIGURE_has_static_link=y
CT_CONFIGURE_has_cxx11=y
CT_CONFIGURE_has_wget=y
CT_CONFIGURE_has_make_3_81_or_newer=y
CT_CONFIGURE_has_make_4_0_or_newer=y
CT_CONFIGURE_has_libtool_2_4_or_newer=y
@poizan42
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.
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
View make-test-unit.log
Makefile:126: The docker client CLI has moved to github.com/docker/cli. 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
poizan42 / MailSend.cs
Created Jun 14, 2018
Demonstration of bad heuristics in som AV products, old-style .csproj edition, see https://poizan.dk/blog/2018/06/14/the-dangerous-mailsend-antivirus-heuristics-fail/
View MailSend.cs
class Program
{
public const string pad =
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
@poizan42
poizan42 / MailSend.cs
Last active Jun 14, 2018
Demonstration of bad heuristics in som AV products, new-style .csproj edition, see https://poizan.dk/blog/2018/06/14/the-dangerous-mailsend-antivirus-heuristics-fail/
View MailSend.cs
class Program
{
public const string pad =
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" +
View CloneFrameworkPropertyMetadata.cs
private static FrameworkPropertyMetadata CloneFrameworkPropertyMetadata(FrameworkPropertyMetadata src)
{
FrameworkPropertyMetadataOptions options = FrameworkPropertyMetadataOptions.None;
if (src.AffectsArrange)
options |= FrameworkPropertyMetadataOptions.AffectsArrange;
if (src.AffectsMeasure)
options |= FrameworkPropertyMetadataOptions.AffectsMeasure;
if (src.AffectsParentArrange)
options |= FrameworkPropertyMetadataOptions.AffectsParentArrange;
if (src.AffectsParentMeasure)
@poizan42
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
poizan42 / fix-spinny.py
Last active Jan 30, 2018
Update links to Spinnerette comics to current format
View fix-spinny.py
import sys
from datetime import datetime
import re
import urllib2
from bs4 import BeautifulSoup
wayback_prefix = 'https://web.archive.org/web/20160824022930/'
newformat_prefix = 'http://www.spinnyverse.com/comic/'
cachef = open('spinny-cache', 'a+')
You can’t perform that action at this time.