[packages/metasploit/merge3: 5/9] - hardcode msfbase, not to depend on symlinks
glen
glen at pld-linux.org
Fri Mar 15 23:19:48 CET 2013
commit 809b8eff6e1039661b070d6a72c5a0107b8fd643
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Thu Jul 24 21:06:26 2008 +0000
- hardcode msfbase, not to depend on symlinks
Changed files:
metasploit3-datadir.patch -> 1.1
metasploit3-datadir.patch | 147 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
---
diff --git a/metasploit3-datadir.patch b/metasploit3-datadir.patch
new file mode 100644
index 0000000..760f343
--- /dev/null
+++ b/metasploit3-datadir.patch
@@ -0,0 +1,147 @@
+--- framework-3.1/msfcli 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfcli 2008-07-24 23:42:51.739797982 +0300
+@@ -1,12 +1,11 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ #
+ # This user interface allows users to interact with the framework through a
+ # command line interface (CLI) rather than having to use a prompting console
+ # or web-based interface.
+ #
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex'
+ require 'msf/ui'
+--- framework-3.1/msfconsole 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfconsole 2008-07-24 23:42:55.576019334 +0300
+@@ -1,11 +1,10 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ #
+ # This user interface provides users with a command console interface to the
+ # framework.
+ #
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex'
+ require 'msf/ui'
+--- framework-3.1/msfd 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfd 2008-07-24 23:42:58.584192908 +0300
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ #
+ # This user interface listens on a port and provides clients that connect to
+ # it with an msfconsole instance. The nice thing about this interface is that
+@@ -6,8 +6,7 @@
+ # possible for sessions to to be shared from a single vantage point.
+ #
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'msf/base'
+ require 'msf/ui'
+--- framework-3.1/msfencode 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfencode 2008-07-24 23:43:01.484360250 +0300
+@@ -1,7 +1,6 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex'
+ require 'msf/ui'
+--- framework-3.1/msfgui 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfgui 2008-07-24 23:43:06.008621303 +0300
+@@ -1,11 +1,9 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ #
+ # This is a basic user interface using the Gtk2 GUI library
+ #
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
+-
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex'
+ require 'msf/base'
+--- framework-3.1/msfopcode 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfopcode 2008-07-24 23:42:44.267366817 +0300
+@@ -1,12 +1,11 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ #
+ # This user interface provides a command line interface to the Metasploit
+ # Opcode Database. It provides users with the ability to search for opcodes
+ # and to display information about modules.
+ #
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex'
+ require 'rex/ui'
+--- framework-3.1/msfpayload 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfpayload 2008-07-24 23:43:13.361045543 +0300
+@@ -1,7 +1,6 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex'
+ require 'msf/ui'
+--- framework-3.1/msfpescan 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfpescan 2008-07-24 23:43:16.729239890 +0300
+@@ -1,7 +1,6 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'rex/peparsey'
+ require 'rex/pescan'
+--- framework-3.1/msfweb 2008-01-28 05:46:07.000000000 +0200
++++ framework-3.1-datadir/msfweb 2008-07-24 23:43:27.001832626 +0300
+@@ -1,12 +1,10 @@
+-#!/usr/bin/env ruby
++#!/usr/bin/ruby
+ #
+ # This user interface provides users with a web-based interface to the framework
+ #
+
+-msfbase = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
+-$:.unshift(File.join(File.dirname(msfbase), 'lib'))
+-
+-
++msfbase = '/usr/share/metasploit3'
++$:.unshift('/usr/share/metasploit3/lib')
+
+ require 'msf/base'
+ require 'rex'
+@@ -14,7 +12,7 @@
+
+
+
+-msfroot = File.join(File.dirname(msfbase), 'data', 'msfweb')
++msfroot = File.join(msfbase, 'data', 'msfweb')
+ Dir.chdir(msfroot)
+
+ msfserv = File.join('script', 'server')
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/metasploit.git/commitdiff/5af0fd996c95d9330f123fadf8bceb31bbe6f108
More information about the pld-cvs-commit
mailing list