This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: RouterOS configuration files | |
" Maintainer: Ryan Carter | |
" Latest Revision: 16OCT2012 | |
" GistID: 3904202 | |
if exists("b:current_syntax") | |
finish | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unset SSH_AGENT_PID SSH_ENV_REFRESH | |
[ -r ~/.ssh/env ] && . ~/.ssh/env | |
[ -n "$SSH_AGENT_PID" ] || { | |
killall ssh-agent | |
# No env file (or it's badly corrupted: | |
eval $(ssh-agent 2>/dev/null) &> /dev/null | |
printenv | grep "^SSH_A" | |
SSH_ENV_REFRESH=1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#GistID: 5696462 | |
list+=("begin") | |
list+=("verbose") | |
# check that script is in a pipeline | |
if [ -t 0 ] && [ -t 1 ]; then | |
for i in $(echo $* | grep -Eo -e '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' -e '(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))' | sort -V | uniq); do | |
list+=($i) | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
## Brute code stolen form: https://gist.github.com/petehamilton/4755855 | |
# | |
def result?(sub) | |
puts sub | |
1 == 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#GistID: 9498189 | |
# wrapper to take a file with the output of "ipset save" and restore with conflicting set names | |
# begrudgingly uses mktemp | |
# ignore: ^(realm_|ipjail_|cali(4|6)-) | |
# "realm_" from gatesetter | |
# "ip(6?)jail_" from ipjaild (cflare.co/spec-ipjail) | |
# "cali(4|6)-" from calico (k8s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#GistID: 11102164 | |
# modified from http://lzone.de/Nagios%20Check%20Plugin%20for%20nofile%20Limit | |
# Check "nofile" limit for all running processes using lsof | |
MIN_COUNT=512 # default "nofile" limit is usually 1024, so no checking for | |
# processes with much less open fds needed | |
WARN_THRESHOLD=80 # default warning: 80% of file limit used |
OlderNewer