Skip to content

Instantly share code, notes, and snippets.

View postmodern's full-sized avatar
🚀
releasing new versions

Postmodern postmodern

🚀
releasing new versions
View GitHub Profile
@postmodern
postmodern / zshrc
Created December 14, 2012 01:03
Fedora 17's /etc/zshrc
#
# /etc/zshrc is sourced in interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
## shell functions
#setenv() { export $1=$2 } # csh compatibility
# Set prompts
@postmodern
postmodern / gist:3803087
Created September 29, 2012 03:43
Example usage of Ronin::Scanners::Nmap
require 'ronin/scanners/nmap'
require 'ronin/database'
Ronin::Database.setup
Ronin::Scanners::Nmap.import(:targets => 'www.google.com') do |ip|
puts "[ #{ip} ]"
puts
ip.open_ports.each do |port|
@postmodern
postmodern / consulting_agreement_amendment.md
Created August 2, 2012 23:53
Contract amendent to allow Open Sourcing of out-of-scope/unrelated Software

Excluded Inventions

Consultant shall have the right to retain ownership of any inventions, original works of authorship, discoveries, concepts or ideas, which are unrelated to Consultant’s present work (or the actual or demonstrably anticipated research or development of the Company) under this Agreement; or that the Consultant developed entirely on his own time without using the Company’s equipment, supplies, facilities and does not contain any Company trade secrets, proprietary materials or any other protected intellectual property owned by the Company. Consultant represents that the exclusion of such Inventions from this Section 9 (Inventions) will not materially affect Consultant’s ability

@postmodern
postmodern / Makefile
Last active March 4, 2024 14:42
A generic Makefile for building/signing/install bash scripts
NAME=project
VERSION=0.0.1
DIRS=etc lib bin sbin share
INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null`
INSTALL_FILES=`find $(DIRS) -type f 2>/dev/null`
DOC_FILES=*.md *.txt
PKG_DIR=pkg
PKG_NAME=$(NAME)-$(VERSION)
@postmodern
postmodern / udp_proxy.rb
Created June 12, 2012 20:27
Example of Ronin::Network::UDP::Proxy
require 'ronin/network/udp/proxy'
require 'hexdump'
Ronin::Network::UDP::Proxy.start(:port => 1337, :server => ['4.2.2.1', 53]) do |proxy|
hex = Hexdump::Dumper.new
proxy.on_client_data do |(client,(host,port)),server,data|
puts "#{host}:#{port} -> #{proxy}"
hex.dump(data)
end
@postmodern
postmodern / tcp_proxy.rb
Created May 11, 2012 03:12
Example of Ronin::Network::TCP::Proxy
require 'ronin/network/tcp/proxy'
require 'hexdump'
Ronin::Network::TCP::Proxy.start(:port => 1337, :server => ['www.wired.com', 80]) do |proxy|
address = lambda { |socket|
addrinfo = socket.peeraddr
"#{addrinfo[3]}:#{addrinfo[1]}"
}
hex = Hexdump::Dumper.new
@postmodern
postmodern / gist:2361750
Created April 11, 2012 19:33
Attempt at defining commands within Cinch Plugins.
ARGUMENT_FORMATS = {
string: /\S+/,
integer: /\d+/,
float: /\d*\.\d+/,
text: /.+/
}
#
# All defined commands.
#
@postmodern
postmodern / udp_proxy.rb
Created March 25, 2012 01:17
Example of a Ronin::Network::UDP::Proxy
require 'ronin/network/udp/proxy'
require 'hexdump'
Ronin::Network::UDP::Proxy.start([1337, 'localhost'], ['localhost', 1338]) do |proxy|
format_addr = lambda { |(socket,(host,port))|
"#{host}:#{port}"
}
proxy.on(:client_data) do |client,server,data|
puts "#{format_addr[client]} -> #{proxy}"
@postmodern
postmodern / tcp_proxy.rb
Created March 25, 2012 01:16
Example of a Ronin::Network::TCP::Proxy
require 'ronin/network/tcp/proxy'
require 'hexdump'
Ronin::Network::TCP::Proxy.start([1337, 'localhost'], ['localhost', 1338]) do |proxy|
format_addr = lambda { |(socket|
addr = socket.remote_address
"#{addr.ip_address}:#{addr.ip_port}"
}
@postmodern
postmodern / Gemfile
Created February 18, 2012 02:44
Experimental refactor of Gemfile template used for DataMapper plugins
#
# Environment Variables:
#
# DM_EDGE - Bundle against the DataMapper git repositories at
# http://github.com/datamapper
# DM_BRANCH - The branch to use across all DataMapper git repositories.
# DM_ROOT - The path to the directory containing local copies of the DataMapper
# libraries.
# ADAPTER(S) - The list of DataMapper adapters to test with.
# (sqlite, postgres, mysql, oracle, sqlserver)