1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-02 07:40:19 +02:00
metasploit-framework/msfconsole
2020-05-05 12:34:44 +01:00

28 lines
799 B
Ruby
Executable File

#!/usr/bin/env ruby
# -*- coding: binary -*-
#
# This user interface provides users with a command console interface to the
# framework.
#
require 'pathname'
begin
# Silences warnings as they only serve to confuse end users
if defined?(Warning) && Warning.respond_to?(:[]=)
Warning[:deprecated] = false
end
# @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
require 'metasploit/framework/profiler'
require 'metasploit/framework/command/console'
require 'msf/core/payload_generator'
Metasploit::Framework::Profiler.start
Metasploit::Framework::Command::Console.start
rescue Interrupt
puts "\nAborting..."
exit(1)
end