mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
* Some ruby gem updates and cleanup Signed-off-by: Satadru Pramanik <satadru@gmail.com> * bump version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * move gem installs to core install Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add webkitgtk_6 binaries for x86_64, add librsvg binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add rebuilt librsvg binary for x86_64. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * rename gem function internals to make more sense Signed-off-by: Satadru Pramanik <satadru@gmail.com> * adjust webkitgtk_6 deps Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update ruby gem packages, add a ruby gem package update script to tools Signed-off-by: Satadru Pramanik <satadru@gmail.com> * suggested changes Signed-off-by: Satadru Pramanik <satadru@gmail.com> * rebuild parted Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add parted binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * suggested changes Signed-off-by: Satadru Pramanik <satadru@gmail.com> * refactor ruby buildsystem Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add libsdl2, freerdp binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * sync crew function to lib/fixup Signed-off-by: Satadru Pramanik <satadru@gmail.com> * shellcheck fix Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add const for CREW_UPDATE_CHECK_INTERVAL Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Move time_difference into function for neatness. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * suggested changes from @uberhacker Signed-off-by: Satadru Pramanik <satadru@gmail.com> * @Zopolis4 suggested change: Use git last update time Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add .blank? usage to downloader to avoid undefined method `empty?' for nil (NoMethodError) Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
52 lines
1.6 KiB
Ruby
52 lines
1.6 KiB
Ruby
require 'package'
|
|
|
|
class Metasploit < Package
|
|
description 'The Metasploit Framework is a tool for developing and executing exploit code against a remote target machine.'
|
|
homepage 'https://www.metasploit.com/'
|
|
version '6.4.15'
|
|
license 'BSD-3'
|
|
compatibility 'all'
|
|
source_url "https://github.com/rapid7/metasploit-framework/archive/#{version}.tar.gz"
|
|
source_sha256 'f0385cc05dcf2b0d8aef0c4609acde7396aa91650ca34d452a7a60be13f04732'
|
|
|
|
no_compile_needed
|
|
|
|
depends_on 'ruby'
|
|
depends_on 'readline'
|
|
depends_on 'openssl'
|
|
depends_on 'libpcap'
|
|
depends_on 'postgresql'
|
|
depends_on 'sqlite'
|
|
depends_on 'libxslt'
|
|
depends_on 'libxml2'
|
|
depends_on 'bison'
|
|
|
|
def self.build
|
|
system 'gem install bundler --conservative'
|
|
system 'NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install'
|
|
end
|
|
|
|
def self.install
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/metasploit-framework"
|
|
FileUtils.mv Dir['*'], "#{CREW_DEST_PREFIX}/share/metasploit-framework"
|
|
%w[msfconsole msfd msfrpc msfrpcd msfupdate msfvenom].each do |bin|
|
|
FileUtils.ln_s "#{CREW_PREFIX}/share/metasploit-framework/#{bin}", "#{CREW_DEST_PREFIX}/bin/#{bin}"
|
|
end
|
|
end
|
|
|
|
def self.postremove
|
|
config_dir = "#{HOME}/.msf4"
|
|
if Dir.exist? config_dir
|
|
print "Would you like to remove the #{config_dir} directory? [y/N] "
|
|
case $stdin.gets.chomp.downcase
|
|
when 'y', 'yes'
|
|
FileUtils.rm_rf config_dir
|
|
puts "#{config_dir} removed.".lightgreen
|
|
else
|
|
puts "#{config_dir} saved.".lightgreen
|
|
end
|
|
end
|
|
end
|
|
end
|