metasploit-framework.gemspec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # coding: utf-8
  2. # During build, the Gemfile is temporarily moved and
  3. # we must manually define the project root
  4. if ENV['MSF_ROOT']
  5. lib = File.realpath(File.expand_path('lib', ENV['MSF_ROOT']))
  6. else
  7. # have to use realpath as metasploit-framework is often loaded through a symlink and tools like Coverage and debuggers
  8. # require realpaths.
  9. lib = File.realpath(File.expand_path('../lib', __FILE__))
  10. end
  11. $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
  12. require 'metasploit/framework/version'
  13. require 'metasploit/framework/rails_version_constraint'
  14. Gem::Specification.new do |spec|
  15. spec.name = 'metasploit-framework'
  16. spec.version = Metasploit::Framework::GEM_VERSION
  17. spec.authors = ['Metasploit Hackers']
  18. spec.email = ['metasploit-hackers@lists.sourceforge.net']
  19. spec.summary = 'metasploit-framework'
  20. spec.description = 'metasploit-framework'
  21. spec.homepage = 'https://www.metasploit.com'
  22. spec.license = 'BSD-3-clause'
  23. spec.files = `git ls-files`.split($/).reject { |file|
  24. file =~ /^config/
  25. }
  26. spec.bindir = '.'
  27. spec.executables = [
  28. 'msfbinscan',
  29. 'msfcli',
  30. 'msfconsole',
  31. 'msfd',
  32. 'msfelfscan',
  33. 'msfencode',
  34. 'msfmachscan',
  35. 'msfpayload',
  36. 'msfpescan',
  37. 'msfrop',
  38. 'msfrpc',
  39. 'msfrpcd',
  40. 'msfupdate',
  41. 'msfvenom'
  42. ]
  43. spec.test_files = spec.files.grep(%r{^spec/})
  44. spec.require_paths = ["lib"]
  45. # Need 3+ for ActiveSupport::Concern
  46. spec.add_runtime_dependency 'activesupport', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
  47. # Needed for config.action_view for view plugin compatibility for Pro
  48. spec.add_runtime_dependency 'actionpack', *Metasploit::Framework::RailsVersionConstraint::RAILS_VERSION
  49. # Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
  50. spec.add_runtime_dependency 'bcrypt'
  51. # Needed for Javascript obfuscation
  52. spec.add_runtime_dependency 'jsobfu', '~> 0.2.0'
  53. # Needed for some admin modules (scrutinizer_add_user.rb)
  54. spec.add_runtime_dependency 'json'
  55. # Metasploit::Concern hooks
  56. spec.add_runtime_dependency 'metasploit-concern', '~> 0.3.0'
  57. # Things that would normally be part of the database model, but which
  58. # are needed when there's no database
  59. spec.add_runtime_dependency 'metasploit-model', '~> 0.29.0'
  60. # Needed for Meterpreter on Windows, soon others.
  61. spec.add_runtime_dependency 'meterpreter_bins', '0.0.21'
  62. # Needed by msfgui and other rpc components
  63. spec.add_runtime_dependency 'msgpack'
  64. # Needed by anemone crawler
  65. spec.add_runtime_dependency 'nokogiri'
  66. # Needed by db.rb and Msf::Exploit::Capture
  67. spec.add_runtime_dependency 'packetfu', '1.1.9'
  68. # Run initializers for metasploit-concern, metasploit-credential, metasploit_data_models Rails::Engines
  69. spec.add_runtime_dependency 'railties'
  70. # required for OS fingerprinting
  71. spec.add_runtime_dependency 'recog', '~> 1.0'
  72. # rb-readline doesn't work with Ruby Installer due to error with Fiddle:
  73. # NoMethodError undefined method `dlopen' for Fiddle:Module
  74. unless Gem.win_platform?
  75. # Command line editing, history, and tab completion in msfconsole
  76. # Use the Rapid7 fork until the official gem catches up
  77. spec.add_runtime_dependency 'rb-readline-r7'
  78. end
  79. # Needed by anemone crawler
  80. spec.add_runtime_dependency 'robots'
  81. # Needed by some modules
  82. spec.add_runtime_dependency 'rubyzip', '~> 1.1'
  83. # Needed for some post modules
  84. spec.add_runtime_dependency 'sqlite3'
  85. # required for Time::TZInfo in ActiveSupport
  86. spec.add_runtime_dependency 'tzinfo'
  87. end