msfconsole 796 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env ruby
  2. # -*- coding: binary -*-
  3. #
  4. # This user interface provides users with a command console interface to the
  5. # framework.
  6. #
  7. require 'pathname'
  8. begin
  9. # Silences warnings as they only serve to confuse end users
  10. if defined?(Warning) && Warning.respond_to?(:[]=)
  11. Warning[:deprecated] = false unless ENV['CI']
  12. end
  13. # @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
  14. require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
  15. require 'metasploit/framework/profiler'
  16. Metasploit::Framework::Profiler.start
  17. require 'msfenv'
  18. require 'metasploit/framework/command/console'
  19. Metasploit::Framework::Command::Console.start
  20. rescue Interrupt
  21. puts "\nAborting..."
  22. exit(1)
  23. end