Skip to content

Commit cef4ddf

Browse files
committed
Fix a crash when msfconsole is a symlink
1 parent c3e8bc8 commit cef4ddf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

msfconsole

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#!/usr/bin/env ruby
22
# -*- coding: binary -*-
33
#
4-
# $Id$
5-
#
64
# This user interface provides users with a command console interface to the
75
# framework.
86
#
9-
# $Revision$
10-
#
117

128
#
139
# Standard Library
@@ -20,7 +16,7 @@ require 'pathname'
2016
#
2117

2218
# @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/generators/rails/app/templates/script/rails#L3-L5
23-
require Pathname.new(__FILE__).expand_path.parent.join('config', 'boot')
19+
require Pathname.new(__FILE__).realpath.expand_path.parent.join('config', 'boot')
2420
require 'metasploit/framework/command/console'
2521

2622
Metasploit::Framework::Command::Console.start

0 commit comments

Comments
 (0)