Skip to content

Instantly share code, notes, and snippets.

View lattera's full-sized avatar

Shawn Webb lattera

View GitHub Profile
@altamic
altamic / bitdump.sh
Created January 25, 2011 22:20
dumps Bitcoin network traffic
#!/usr/bin/env sh
# bitdump.sh
#
# captures Bitcoin network traffic
SELF=`basename $0`
if [[ $1 = "" ]]; then
DEFAULT="en1"
@digitalresistor
digitalresistor / getaddrinfo.c
Created August 2, 2012 00:30
Verify sanity with regards to bind() on sockets when receiving info from getaddrinfo(). AF_INET vs AF_INET6.
/*
* There is inconsistent behaviour regarding the way various operating
* systems use IPV6_V6ONLY by default and interactions with bind() to bind a
* wildcard socket (as in all available addresses) on an AF_INET6 (IPv6)
* socket.
*
* getaddrinfo() returns two results, the first one being AF_INET and the
* second being AF_INET6 (Unless you are on an OS that prefers IPv6, I'm
* looking at you OI). We create a socket, bind, and listen on AF_INET first.
* At that point we try to create a socket, bind and then listen on AF_INET6.
@j105rob
j105rob / SnortRulesParse.py
Last active November 24, 2016 12:26
Parse Snort Text Rules into Python Dict
go to https://github.com/lattera/porkroll for the latest version.