Skip to content

Instantly share code, notes, and snippets.

View eiginn's full-sized avatar

Ryan Carter eiginn

View GitHub Profile
@eiginn
eiginn / prowl.cpp
Created November 8, 2012 15:42 — forked from garrettreid/prowl.cpp
Updated Prowl module for ZNC
/*
* Copyright (C) 2009 flakes @ EFNet
* New match logic by Gm4n @ freenode
* Version 1.0 (2012-08-19)
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#! /usr/env/ruby
require "benchmark"
require 'digest/md5'
# The password hash to crack
password_hash = "e1f3ecc31656795a128db19da490c9ec"
# Helper for hashing passwords
def md5(password)
Digest::MD5.hexdigest(password)
@eiginn
eiginn / brutedns.rb
Created February 28, 2014 16:58 — forked from mubix/brutedns.rb
#!/usr/bin/env ruby
#
## Brute code stolen form: https://gist.github.com/petehamilton/4755855
#
@domain = 'contoso.com'
def result?(sub)
results = %x(dig +noall #{sub}.#{@domain} +answer)
@eiginn
eiginn / brutelist.rb
Created February 28, 2014 16:58 — forked from mubix/brutelist.rb
#!/usr/bin/env ruby
#
## Brute code stolen form: https://gist.github.com/petehamilton/4755855
#
def result?(sub)
puts sub
1 == 2
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
# Kyoto Cabinet
_kchashmgr() {
local cur prev
local commands="create inform set remove get list import copy dump load defrag setbulk removebulk getbulk check version" # not include: clear
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
arg1=${COMP_WORDS[1]}
if [ $COMP_CWORD -eq 1 ]; then
import ConfigParser, mmap
config_file = "/usr/share/applications/google-chrome.desktop"
add_string_to_each_section = ["StartupWMClass", "Google-chrome-stable"]
option = add_string_to_each_section[0]
value = add_string_to_each_section[1]
class Fixer:
def check(self, cf, option, value):
@eiginn
eiginn / dhcpd.conf
Created April 21, 2016 03:38 — forked from robinsmidsrod/dhcpd.conf
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
@eiginn
eiginn / remerge.py
Created April 11, 2017 22:59 — forked from mahmoud/remerge.py
Recursively merging dictionaries with boltons.iterutils.remap. Useful for @hynek's configs. https://twitter.com/hynek/status/696720593002041345
"""
This is an extension of the technique first detailed here:
http://sedimental.org/remap.html#add_common_keys
In short, it calls remap on each container, back to front, using the accumulating
previous values as the default for the current iteration.
"""
@eiginn
eiginn / gist:2c871955d33df0ff771e5b604df3fd75
Created September 27, 2017 18:21 — forked from gdestuynder/gist:0db99a45872d4bfc4dc9
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