CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/tools/exploit/msf_irb_shell.rb
Views: 11766
1
#!/usr/bin/env ruby
2
3
##
4
# This module requires Metasploit: https://metasploit.com/download
5
# Current source: https://github.com/rapid7/metasploit-framework
6
##
7
begin
8
msfbase = __FILE__
9
while File.symlink?(msfbase)
10
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
11
end
12
13
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..', 'lib')))
14
require 'msfenv'
15
16
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
17
18
require 'rex'
19
20
framework = Msf::Simple::Framework.create
21
22
Rex::Ui::Text::IrbShell.new(binding).run
23
24
rescue SignalException => e
25
puts("Aborted! #{e}")
26
end
27
28