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
def method_missing(sym, *args) | |
name = sym.to_s | |
if name[-1,1] == '=' | |
instance_variable_set( "@#{name[0, name.size - 1]}", *args) | |
else | |
instance_variable_get("@#{name}") | |
end | |
end |
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 | |
require 'awesome_print' | |
require 'pry' | |
require 'ostruct' | |
require 'resolv' | |
begin #top | |
puts "Reading worklist" |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
from: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
CHECKSUM=`cat $DIR/.syncme.sh.md5sum | awk '{print $1}'` | |
MYCHECKSUM=`md5sum $DIR/syncme.sh | awk '{print $1}'` | |
if [[ "$CHECKSUM" != "$MYCHECKSUM" ]] | |
then | |
echo "This script was modified." | |
exit 2 | |
else |
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
lsof | grep -i deleted | grep REG | grep -v txt | ruby -r 'pp' -e 'STDIN.each do |v| a = v.split(/ +/); puts `:> /proc/#{a[1]}/fd/#{a[3].chop}`; end' |
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/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
# Based off of https://gist.github.com/sh1n0b1/10100394 | |
import sys | |
import struct | |
import socket | |
import time |
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/expect -f | |
# This script creates an interactive session on a remote server | |
# Example usage: logmein 192.168.1.11 | |
# Arguments: | |
# ip_address = IP Address to connect to | |
# Process CL arguments - password must use lindex because lrange messes with password when special characters are escaped | |
set target [lindex $argv 0] |
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/expect -f | |
# This script creates an interactive session on a remote server | |
# Example usage: logmein 192.168.1.11 | |
# Arguments: | |
# ip_address = IP Address to connect to | |
# Process CL arguments - password must use lindex because lrange messes with password when special characters are escaped | |
set target [lindex $argv 0] |
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
printf '%q ' $(cat temp) |
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
--- | |
name: "null" | |
director_uuid: 12345 | |
releases: [] | |
networks: | |
- name: default | |
type: dynamic |
OlderNewer