Skip to content

Instantly share code, notes, and snippets.

View gdestuynder's full-sized avatar
🏔️
.

Guillaume Destuynder (:kang) gdestuynder

🏔️
.
View GitHub Profile
@gdestuynder
gdestuynder / gist:9bcd478fd8872c5d674e
Created June 30, 2014 18:28
build duo_unix on RHEL6
diff --git a/configure.ac b/configure.ac
index 691fbea..c2c68ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@
# All rights reserved, all wrongs reversed
# Minimum autoconf version
-AC_PREREQ(2.65)
+AC_PREREQ(2.63)
@gdestuynder
gdestuynder / gist:f5faa56d400df864ba1f
Last active August 29, 2015 14:03
super basic openvpn mgmt client
#!/usr/bin/env python
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
@gdestuynder
gdestuynder / ghost.c
Created January 27, 2015 18:31
ghost.c
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@gdestuynder
gdestuynder / CVE-2015-0235_NS.py
Created January 27, 2015 20:20
CVE-2015-0235 NS test
#!/usr/bin/env python
# Test if NS sanitizes CVE-2015-0235
#Check output with tcpdump ;)
from scapy.all import *
ip="your local ip here"
ns="your ns ip here"
t='0' * 10000 + '377.255.255.255'
/* ns_exec.c
Copyright 2013, Michael Kerrisk
Licensed under GNU General Public License v2 or later
Join a namespace and execute a command in the namespace
*/
#define _GNU_SOURCE
#include <fcntl.h>
#include <sched.h>
#!/usr/bin/env python
# See also https://developer.github.com/v3/search/
# First:
# git clone https://github.com/michaelliao/githubpy
import githubpy.github as github
import urllib
API_KEY=""
USERS=['gdestuynder', 'kangsterizer']
ORGS=['mozilla-it']
@gdestuynder
gdestuynder / gist:0db99a45872d4bfc4dc9
Created July 7, 2015 22:15
Google authenticator (base32) and OATH (hex) TOTP QR code generator
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Required packages (available from pip) : pyqrcode, pypng
import pyqrcode
import base64
package main
import "syscall"
import "os"
import "fmt"
const CLONE_NEWNS = 0x00020000
const CLONE_NEWUTS = 0x04000000
const CLONE_NEWIPC = 0x80000000
const CLONE_NEWUSER = 0x10000000
#!/usr/bin/env python
# Note: this script uses generic exception catching with no traceback logging for file operations.
# Note: this is to be superseded by MIG
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2012 gdestuynder@mozilla.com
import os