Skip to content

Instantly share code, notes, and snippets.

Yawning Angel Yawning

Block or report user

Report or block Yawning

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
View 0001-BSD-OSX-portability-fixes.patch
From 117b56d5315287bb15948f448229431101d48380 Mon Sep 17 00:00:00 2001
From: Yawning Angel <>
Date: Mon, 19 Nov 2018 22:52:41 +0000
Subject: [PATCH] BSD: OSX portability fixes
* RFC 3542 constants require `__APPLE_USE_RFC_3542` to be defined.
* TCP MD5 signatures are not supported by the kernel at all.
sysdep/bsd/sysio.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
View gist:e2b52d373b21278e34dd00c7a04ac900
#! /bin/sh -e
# Uncomment to load custom ACPI table

Keybase proof

I hereby claim:

  • I am yawning on github.
  • I am yawninglol ( on keybase.
  • I have a public key whose fingerprint is 9EB1 A490 C73C C5D4 4DFB 3E47 BFBD 1C7B 8A6E C81A

To claim this, I am signing this object:

View gist:b6d46ea48fa6c186303c
diff --git a/xio-openssl.c b/xio-openssl.c
index 665430d..b7e95c1 100644
--- a/xio-openssl.c
+++ b/xio-openssl.c
@@ -912,20 +912,27 @@ int
- static unsigned char dh1024_p[] = {
- 0xCC,0x17,0xF2,0xDC,0x96,0xDF,0x59,0xA4,0x46,0xC5,0x3E,0x0E,
Yawning / elligator2.h
Last active Aug 16, 2019
A mostly drop in elligator2 for ed25519-donna.
View elligator2.h
* Elligator 2 Curve25519 basepoint scalar multiplication.
* Copyright 2013 The Go Authors. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
Yawning / orhttp_example.go
Created Apr 29, 2015
How to dispatch HTTP requests via Tor in Go.
View orhttp_example.go
// To the extent possible under law, the Yawning Angel has waived all copyright
// and related or neighboring rights to orhttp_example, using the creative
// commons "cc0" public domain dedication. See LICENSE or
// <> for full details.
package main
import (
// Things needed by the actual interface.
Yawning / linux_get_external_addr.c
Last active Aug 29, 2015
Querying the address used to reach the outside world, the correct way. (Linux).
View linux_get_external_addr.c
#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
View 0001-squash-Fixup-handle_control_hspost.patch
From 6d23b7b45581a218cf1fdfd9ef580f3c628ffdbe Mon Sep 17 00:00:00 2001
From: Yawning Angel <>
Date: Fri, 27 Mar 2015 14:15:57 +0000
Subject: [PATCH 1/1] (squash) Fixup handle_control_hspost().
* Use C99 to bring variable declarations closer to where they are
* Don't leak a smartlist_t (args was initialized, and getargs_helper()
trampled over it).
* Don't leak a rend_encoded_v2_service_descriptor_t when the descriptor
Yawning / gist:fda95db37092669958b1
Last active Aug 29, 2015
Simple helper that checks if Linux filesystem capabilites() are set without using external libraries.
View gist:fda95db37092669958b1
#include <sys/types.h>
#include <sys/xattr.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
* A quick and dirty test to see if a given file has any Linux capabilities
* set.
Yawning / gist:2829f9adf889f1334005
Created Jan 2, 2015
gettimeofday() benchmark.
View gist:2829f9adf889f1334005
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <assert.h>
#define ITERS 1000000000
static uint64_t gettime(void) {
struct timespec ts;
You can’t perform that action at this time.