Skip to content

Instantly share code, notes, and snippets.

@mccabe615
mccabe615 / gist:9265210
Created February 28, 2014 04:23
Brakeman install
michaelmccabe@Nvis-MBP:~ : gem install brakeman
Fetching: ruby_parser-3.4.1.gem (100%)
Successfully installed ruby_parser-3.4.1
Fetching: brakeman-2.4.1.gem (100%)
Successfully installed brakeman-2.4.1
2 gems installed
michaelmccabe@Nvis-MBP:~ :
nohup java -Xms1G -Xmx2G -XX:MaxPermSize=1G -jar ~/location/of/burp/jar/burp.jar 2>&1 &
Gem::Specification.new do |spec|
spec.name = "tester"
spec.version = Tester::VERSION
spec.authors = ["Mike McCabe"]
spec.email = ["mccabe615@gmail.com"]
spec.summary = %q{TODO: Write a short summary. Required.}
spec.description = %q{TODO: Write a longer description. Optional.}
spec.homepage = ""
spec.license = "MIT"
@mccabe615
mccabe615 / bootstrap_flash_helper_patched.rb
Created March 26, 2014 14:50
Patched Bootstrap flash helper to prevent XSS.
module BootstrapFlashHelperPatched
ALERT_TYPES = [:error, :info, :success, :warning] unless const_defined?(:ALERT_TYPES)
def bootstrap_flash_patched
flash_messages = []
flash.each do |type, message|
# Skip empty messages, e.g. for devise messages set to nothing in a locale file.
next if message.blank?
type = type.to_sym
@mccabe615
mccabe615 / Gemfile
Created March 26, 2014 14:59
Gemfile update
gem "twitter-bootstrap-rails", :git => 'https://github.com/seyhunak/twitter-bootstrap-rails.git'
@mccabe615
mccabe615 / heartbleed.rb
Created April 10, 2014 23:31
heartbleed
#!/usr/bin/env ruby
# encoding: BINARY
require 'socket'
require 'timeout'
require 'openssl'
module ContentType
ALERT = "\x15"
@mccabe615
mccabe615 / heartbleed.rb
Created April 11, 2014 00:55
heartbleed jruby script
#!/usr/bin/env ruby
# encoding: BINARY
require 'socket'
require 'timeout'
require 'openssl'
module ContentType
ALERT = "\x15"
HEARTBEAT = "\x18"
Strict-Transport-Security: max-age:31536000; includeSubDomains
<IfModule mod_headers.c>
# this domain should only be contacted in HTTPS for the next 6 months
Header add Strict-Transport-Security "max-age=15768000"
</IfModule>
Gellers-MacBook-Pro:HSTS $ curl -si nvisium.com | grep ^Strict
Strict-Transport-Security: max-age=31536000