Skip to content

Instantly share code, notes, and snippets.

Eric Monti emonti

Block or report user

Report or block emonti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
emonti / msf-rex.gemspec
Created Dec 1, 2010
gemspec to get a ruby gem out of lib/rex in the metasploit framework
View msf-rex.gemspec
# Drop this into msf3 root-dir as 'msf-rex.gemspec'.
# Create gem with:
# $ gem build msf-rex.gemspec
# Note there's already a "rex" rubygem, which is why we used 'msf-rex'.
# We can still "require 'rex'" though.
$: << 'lib'
View gist:279607
# copy and paste this into IRB...
require 'ffi'
class Foo < FFI::Struct
layout :ary, [:uint16, 10]
f =
View ffi_override_new_bug
#!/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()
You can’t perform that action at this time.