2005-12-17 14:46:23 +08:00
|
|
|
#!/usr/bin/env ruby
|
2012-06-29 13:18:28 +08:00
|
|
|
# -*- coding: binary -*-
|
2005-11-29 05:38:48 +08:00
|
|
|
#
|
|
|
|
# This user interface provides users with a command console interface to the
|
|
|
|
# framework.
|
|
|
|
#
|
2005-07-14 05:09:07 +08:00
|
|
|
|
2014-07-30 03:07:14 +08:00
|
|
|
require 'pathname'
|
2018-03-21 02:34:15 +08:00
|
|
|
begin
|
2020-05-05 19:34:44 +08:00
|
|
|
|
|
|
|
# Silences warnings as they only serve to confuse end users
|
2020-04-29 21:33:19 +08:00
|
|
|
if defined?(Warning) && Warning.respond_to?(:[]=)
|
|
|
|
Warning[:deprecated] = false
|
|
|
|
end
|
2020-04-29 17:56:03 +08:00
|
|
|
|
2020-03-11 20:59:07 +08:00
|
|
|
# @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
|
2018-03-21 02:34:15 +08:00
|
|
|
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
|
2020-09-22 09:56:51 +08:00
|
|
|
require 'msfenv'
|
2020-03-13 01:58:26 +08:00
|
|
|
require 'metasploit/framework/profiler'
|
2018-03-21 02:34:15 +08:00
|
|
|
require 'metasploit/framework/command/console'
|
2020-09-22 09:56:51 +08:00
|
|
|
|
2020-03-13 01:58:26 +08:00
|
|
|
Metasploit::Framework::Profiler.start
|
2018-03-21 02:34:15 +08:00
|
|
|
Metasploit::Framework::Command::Console.start
|
|
|
|
rescue Interrupt
|
|
|
|
puts "\nAborting..."
|
|
|
|
exit(1)
|
|
|
|
end
|