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 /
Created Jun 13, 2014
Keybase Proof

Keybase proof

I hereby claim:

  • I am emonti on github.
  • I am 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:

emonti / its_a_bash_thing.txt
Last active Aug 29, 2015
It's a bash thing
View its_a_bash_thing.txt
~ export x="() { :;}; echo vulnerable"
~ bash -c "echo hi"
~ sh -c "echo hi"
~ /bin/sh --version
GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)
Copyright (C) 2007 Free Software Foundation, Inc.
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()
View gist:279607
# copy and paste this into IRB...
require 'ffi'
class Foo < FFI::Struct
layout :ary, [:uint16, 10]
f =
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'
emonti / dyldcache.c
Created Mar 8, 2012
dyldcache.c dyld_shared_cache dumper
View dyldcache.c
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
emonti /
Created Mar 8, 2012 010 Editor Binary template
//--- 010 Editor v3.2.2 Binary Template
// File:
// Author: Eric Monti
// Revision: 0.0.1
// Purpose: Parses Mac/iOS dyld_shared_cache format
emonti / 2dgrid.c
Created Sep 28, 2012
2d grid example for malic
View 2dgrid.c
#include <stdio.h>
#define ROWS 10
#define COLUMNS 7
// This is a 2-dimensional array.
// It makes accessing the values of a
// bitmap easy by using x/y references.
int grid[ROWS][COLUMNS] = {
{0,0,0,0,0,0,0}, // 7 columns across
emonti / 1dgrid.c
Created Sep 28, 2012
1d grid example for malic
View 1dgrid.c
#include <stdio.h>
int main()
// Notice, there are no brackets around the rows this time.
// This is a 1-dimensional array. Even though it looks 2d in
// the code, it's one long list to the computer.
// Using a 1-dimensional array, we can still treat the data
// inside of it as a grid in our code, though.
emonti / llvm_disassembler.rb
Last active Oct 13, 2015
Multi-arch bytecode disassembler using libLLVM
View llvm_disassembler.rb
#!/usr/bin/env ruby
# author eric monti ~ nov 20, 2012
# license: DWTFYW
require 'rubygems'
require 'ffi'
class LLVMDisassembler
module C
extend FFI::Library
ffi_lib ['LLVM', 'LLVM-3.2svn', 'LLVM-3.1', 'LLVM-3.0']
You can’t perform that action at this time.