Writing Ronin Ruby Scripts

Ronin isn’t just a CLI with a bunch of commands. The Ronin CLI is actually built on top of many powerful Ruby libraries and APIs, which you can use directly in custom Ruby scripts. Anything that the Ronin CLI can do, you can do in a Ruby script, usually in less than five lines!

Ronin provides the ronin-support library to help with writing custom Ruby scripts. ronin-support adds many APIs and extends Ruby to make it even more powerful!

Install

If you do not already have ronin-support installed, it can easily be installed via rubygems:

$ gem install ronin-support

Loading

To load all of ronin-support into the current context, first require it then include the Ronin::Support module.

require 'ronin/support'
include Ronin::Support

This will both load all of ronin-support and give you access to everything defined within the Ronin::Support namespace.

Note:

While requiring all of ronin/support allows you to play around with ronin-support in irb, it is always faster to selectively require only the files you need from within ronin/support/.

API

ronin-support provides many different APIs for encoding/decoding data, working with binary data, generating/manipulating text, compressing/decompressing data, reading/writing archives, cryptography, and networking.