Skip to content

Instantly share code, notes, and snippets.

View sjmurdoch's full-sized avatar

Steven Murdoch sjmurdoch

View GitHub Profile
diff --git a/configure.in b/configure.in
index 4a89df6..26792a6 100644
--- a/configure.in
+++ b/configure.in
@@ -325,6 +325,7 @@ dnl Where do you live, libevent? And how do we call you?
if test "$bwin32" = true; then
TOR_LIB_WS32=-lws2_32
+ TOR_LIB_IPHLPAPI=-liphlpapi
# Some of the cargo-cults recommend -lwsock32 as well, but I don't
@sjmurdoch
sjmurdoch / mtftar.patch
Created October 28, 2015 14:27
Patch from Asko Tontti to add large file support (larger than 8 GB) to mtftar -- from http://users.aalto.fi/~tontti/mtftar.patch
--- tarout.c.ORIG 2004-10-14 23:07:58.000000000 +0300
+++ tarout.c 2014-09-03 12:45:50.900264517 +0300
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <string.h>
+#include <stdlib.h>
int tarout_init(struct tar_stream *t, int fd)
{

Keybase proof

I hereby claim:

  • I am sjmurdoch on github.
  • I am sjmurdoch (https://keybase.io/sjmurdoch) on keybase.
  • I have a public key whose fingerprint is 7473 902B D5CE 11AD 85E6 FF4B 7220 E093 5E2A 64A6

To claim this, I am signing this object:

@sjmurdoch
sjmurdoch / gist:1572229
Created January 6, 2012 20:18
Patch to FreeBSD OpenSSH to log username and password on log-in attempt to invalid user
Index: crypto/openssh/auth-pam.c
===================================================================
--- crypto/openssh/auth-pam.c (revision 229638)
+++ crypto/openssh/auth-pam.c (working copy)
@@ -809,6 +809,15 @@
return (-1);
}
+static void
+sshpam_log_invalid_user(const char *user, const char* pw, int kbdint)
@sjmurdoch
sjmurdoch / tarsum
Last active March 14, 2024 23:40 — forked from guyru/tarsum
A small utility to compute checksums on every file inside a tar archive.
#! /usr/bin/env python3
# Copyright (C) 2008-2009 by Guy Rutenberg
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,