Skip to content

Creating a Rex Text Developer Environment

Brendan edited this page Oct 29, 2016 · 2 revisions

How to set up a dev Environment for Rex-Text

Setting up a dev environment to make changes to Rex-Text is relatively easy, and follows much the same process as creating a metasploit-framework development environment. The main difference is after forking and cloning rex-text, you must adjust the metasploit-framework Gemfile in your metasploit-framework development environment to point to your local repo of rex-text. This guide assumes you have already created a metasploit-framework development environment, so if you have not created one yet, do that first!

Steps:

Set up metasploit-framework development environment.

Just making sure you were paying attention.

https://github.com/rapid7/metasploit-framework/wiki/Setting-Up-a-Metasploit-Development-Environment

Fork and Clone rex-text.

Follow the instructions outlined in setting up the metasploit-framework development environment above to fork, clone, and set upstream, but do it with the rex-text repo rather than the metasploit-framework repo.

git clone [email protected]:YOUR_GITHUB_NAME/rex-text.git
cd rex-text/
git remote add upstream [email protected]:rapid7/rex-text
git fetch upstream
git checkout -b upstream-master --track upstream/master

Install Bundle Gems.

cd ~/<git-dir>/rex-text
bundle install

Point metasploit-framework at the local rex-text repo for testing

Open the metasploit-framework Gemfile in the editor of your choice:

cd ../metasploit-framework
vim Gemfile

Add the following line under gemspec name: 'metasploit-framework':

gem 'rex-text', path: 'PATH_TO_REX-TEXT'

Replace PATH_TO_REX-TEXT withe the full path to your local rex-text repo.

rebundle.

bundle install

Verify the version of the rex-text gem

bundle show rex-text

You should see the location of your local repo