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 | |
# | |
# Name: reval.rb | |
# License: MIT | |
# Author: postmodern (postmodern.mod3 at gmail.com) | |
# Description: | |
# | |
# Re-evaluates a specified Ruby file whenever the file changes. | |
# Reval was inspired by Giles Bowkett's kickass talk on Archaeopteryx at | |
# RubyFringe 2008, where Giles used some mad Ruby to re-evaluate his |
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 'rack' | |
class FrameD | |
CHARS = ('a'..'z').to_a | |
def random_path | |
(0..10).map { |i| | |
CHARS[rand(CHARS.length)] |
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/sh | |
PATCH=376 | |
mkdir -p /usr/local/src && cd /usr/local/src | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p$PATCH.tar.bz2 | |
tar -xjvf ruby-1.9.1-p$PATCH.tar.bz2 | |
cd ruby-1.9.1-p$PATCH | |
./configure --prefix=/usr --program-suffix=19 --enable-shared | |
make && make install |
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
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)] |
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
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}" |
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 | |
gem 'spidr' | |
require 'spidr' | |
require 'set' | |
unless ARGV.length == 2 | |
STDERR.puts "usage: #{$0} HOST FILE" | |
exit -1 | |
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 'nokogiri' | |
require 'open-uri' | |
require 'cgi' | |
require 'uri' | |
unless ARGV.length == 1 | |
STDERR.puts "usage: ./text_and_links URL" | |
exit -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
require 'benchmark' | |
require 'block_fuzzer' | |
fuzz = SophSec::BlockFuzzer.new('_' * 86, 'EVIL', 4) | |
puts Benchmark.measure { fuzz.each { |mutant| } } |
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
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 |
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
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 |
OlderNewer