Skip to content

Instantly share code, notes, and snippets.

@emonti
Created December 1, 2010 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save emonti/723960 to your computer and use it in GitHub Desktop.
Save emonti/723960 to your computer and use it in GitHub Desktop.
gemspec to get a ruby gem out of lib/rex in the metasploit framework
# 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'
require 'msf/ui'
rex_vers = [
Msf::Framework::Major,
Msf::Framework::Minor,
Msf::Framework::Point,
`svnversion`.chomp
].join('.')
Gem::Specification.new do |s|
s.name = "msf-rex"
s.version = rex_vers
s.date = Time.now.strftime("%Y-%m-%d")
s.summary = "Standalone REX library from the Metasploit Framework"
s.description = "This library provides most of the API used by the Metasploit Framework (Sockets, SMB, HTTP, encoding, etc), but does not include any user interfaces or exploit modules."
s.homepage = "http://metasploit.org"
s.author = "Rapid7 LLC"
s.email = "msfdev@metasploit.com"
s.files = Dir["lib/rex.rb", "lib/rex/**/*"]
s.require_paths = ["lib"]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment