Skip to content
Browse files

Symlink-friendly msf interfaces

git-svn-id: file:///home/svn/framework3/trunk@3795 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information...
1 parent a2c0c8f commit ce529795666c012cbdf6a216025685c47cb48a1e HD Moore committed Jul 31, 2006
Showing with 22 additions and 10 deletions.
  1. +2 −1 msfcli
  2. +2 −1 msfconsole
  3. +2 −1 msfd
  4. +2 −1 msfencode
  5. +2 −1 msflicense
  6. +2 −1 msfopcode
  7. +2 −1 msfpayload
  8. +2 −1 msfpescan
  9. +3 −1 msfweb
  10. +3 −1 msfwx
View
3 msfcli
@@ -5,7 +5,8 @@
# or web-based interface.
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex'
require 'msf/ui'
View
3 msfconsole
@@ -4,7 +4,8 @@
# framework.
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex'
require 'msf/ui'
View
3 msfd
@@ -6,7 +6,8 @@
# possible for sessions to to be shared from a single vantage point.
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'msf/base'
require 'msf/ui'
View
3 msfencode
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex'
require 'msf/ui'
View
3 msflicense
@@ -3,7 +3,8 @@
# This script lists each module by its licensing terms
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex'
require 'msf/ui'
View
3 msfopcode
@@ -5,7 +5,8 @@
# and to display information about modules.
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex'
require 'rex/ui'
View
3 msfpayload
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex'
require 'msf/ui'
View
3 msfpescan
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
require 'rex/peparsey'
require 'rex/pescan'
View
4 msfweb
@@ -4,7 +4,9 @@
# framework that can be shared.
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
+
require 'rex'
require 'msf/ui'
View
4 msfwx
@@ -3,7 +3,9 @@
# This is a basic user interface using the Wx GUI library
#
-$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+$:.unshift(File.join(File.dirname(msfbase), 'lib'))
+
require 'rex'
require 'msf/base'

0 comments on commit ce52979

Please sign in to comment.
Something went wrong with that request. Please try again.