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 / 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+')
View minimal1.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@poizan42
poizan42 / MoveAnyFile.ps1
Created Nov 24, 2017
PowerShell script for moving / renaming files with otherwise invalid filenames
View MoveAnyFile.ps1
param([String]$existingFilename, [String]$newFilename)
$signature = @'
[DllImport("kernel32.dll", ExactSpelling=true, CharSet=CharSet.Unicode, SetLastError=true)]
public static extern uint MoveFileW(
string lpExistingFileName, string lpNewFileName);
'@
$type = $null
try
You can’t perform that action at this time.