diff --git a/dev/machinetest/machinetest.rb b/dev/machinetest/machinetest.rb index 57970078e4..63592a2ad6 100644 --- a/dev/machinetest/machinetest.rb +++ b/dev/machinetest/machinetest.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'machinetestinternal' diff --git a/dev/meterpreter/DemoClient.rb b/dev/meterpreter/DemoClient.rb index a0b5b87d51..63cbe51b0a 100644 --- a/dev/meterpreter/DemoClient.rb +++ b/dev/meterpreter/DemoClient.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I../../lib +#!/usr/bin/env ruby -I../../lib require 'Rex/Post' diff --git a/dev/meterpreter/demo_migrate.rb b/dev/meterpreter/demo_migrate.rb index 35c6052af2..f249c9f2a4 100755 --- a/dev/meterpreter/demo_migrate.rb +++ b/dev/meterpreter/demo_migrate.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I. -I../../lib +#!/usr/bin/env ruby -I. -I../../lib require 'DemoClient' diff --git a/dev/meterpreter/demo_mirror_dir.rb b/dev/meterpreter/demo_mirror_dir.rb index 197d6aea92..8c02c3c3a1 100755 --- a/dev/meterpreter/demo_mirror_dir.rb +++ b/dev/meterpreter/demo_mirror_dir.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I. -I../../lib +#!/usr/bin/env ruby -I. -I../../lib require 'DemoClient' diff --git a/dev/meterpreter/demo_mirror_dir2.rb b/dev/meterpreter/demo_mirror_dir2.rb index 37c2a96fbf..7fab987b06 100755 --- a/dev/meterpreter/demo_mirror_dir2.rb +++ b/dev/meterpreter/demo_mirror_dir2.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I. -I../../lib +#!/usr/bin/env ruby -I. -I../../lib require 'DemoClient' diff --git a/dev/meterpreter/demo_site.rb b/dev/meterpreter/demo_site.rb index 087322b5fd..ba6084ad4a 100755 --- a/dev/meterpreter/demo_site.rb +++ b/dev/meterpreter/demo_site.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I. -I../../lib +#!/usr/bin/env ruby -I. -I../../lib require 'DemoClient' diff --git a/dev/meterpreter/demo_socket.rb b/dev/meterpreter/demo_socket.rb index fb8a58b43a..cc78db6f55 100755 --- a/dev/meterpreter/demo_socket.rb +++ b/dev/meterpreter/demo_socket.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I. -I../../lib +#!/usr/bin/env ruby -I. -I../../lib require 'DemoClient' require 'Rex/Socket/Parameters' diff --git a/dev/meterpreter/metcli.rb b/dev/meterpreter/metcli.rb index a0cb5add52..f263b3a962 100644 --- a/dev/meterpreter/metcli.rb +++ b/dev/meterpreter/metcli.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I../../lib +#!/usr/bin/env ruby -I../../lib require 'Rex/Post' diff --git a/dev/meterpreter/mrp.rb b/dev/meterpreter/mrp.rb index 46be4008de..2a54b9d9ac 100755 --- a/dev/meterpreter/mrp.rb +++ b/dev/meterpreter/mrp.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $: << 'lib' << '../lib' << '../../lib' diff --git a/documentation/samples/framework/dump_module_info.rb b/documentation/samples/framework/dump_module_info.rb index ae4a656a7b..cd7153cb6c 100755 --- a/documentation/samples/framework/dump_module_info.rb +++ b/documentation/samples/framework/dump_module_info.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This sample demonstrates how a module's information can be easily serialized # to a readable format. diff --git a/documentation/samples/framework/encode_file.rb b/documentation/samples/framework/encode_file.rb index 2b336ae49b..4e5ea6d935 100755 --- a/documentation/samples/framework/encode_file.rb +++ b/documentation/samples/framework/encode_file.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This sample demonstrates how a file can be encoded using a framework # encoder. diff --git a/documentation/samples/framework/enumerate_modules.rb b/documentation/samples/framework/enumerate_modules.rb index 7a00957f54..3f07ae0a39 100755 --- a/documentation/samples/framework/enumerate_modules.rb +++ b/documentation/samples/framework/enumerate_modules.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This sample demonstrates enumerating all of the modules in the framework and # displays their module type and reference name. diff --git a/documentation/samples/framework/run_exploit_using_base.rb b/documentation/samples/framework/run_exploit_using_base.rb index 49abf8578e..2608b3e00c 100755 --- a/documentation/samples/framework/run_exploit_using_base.rb +++ b/documentation/samples/framework/run_exploit_using_base.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This sample demonstrates using the framework core directly to launch an # exploit. It makes use of the simplified exploit wrapper method provided by diff --git a/documentation/samples/framework/run_exploit_using_core.rb b/documentation/samples/framework/run_exploit_using_core.rb index 4029b9b7dc..cfc0284894 100755 --- a/documentation/samples/framework/run_exploit_using_core.rb +++ b/documentation/samples/framework/run_exploit_using_core.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This sample demonstrates using the framework core directly to launch an # exploit. It uses the framework base Framework class so that the diff --git a/lib/msf/base.rb.ts.rb b/lib/msf/base.rb.ts.rb index 12b71df5b5..d6d4c501c8 100644 --- a/lib/msf/base.rb.ts.rb +++ b/lib/msf/base.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' require 'msf/base' diff --git a/lib/msf/base/sessions/command_shell.rb.ut.rb b/lib/msf/base/sessions/command_shell.rb.ut.rb index 98fe1d4037..7c45d33afa 100644 --- a/lib/msf/base/sessions/command_shell.rb.ut.rb +++ b/lib/msf/base/sessions/command_shell.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' require 'msf/base' diff --git a/lib/msf/core.rb.ts.rb b/lib/msf/core.rb.ts.rb index 1b56b99424..51876eddc0 100644 --- a/lib/msf/core.rb.ts.rb +++ b/lib/msf/core.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' require 'msf/core' diff --git a/lib/msf/core/exceptions.rb.ut.rb b/lib/msf/core/exceptions.rb.ut.rb index a1ed62ab72..a2921b46b0 100644 --- a/lib/msf/core/exceptions.rb.ut.rb +++ b/lib/msf/core/exceptions.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/msf/core/exploit.rb.ut.rb b/lib/msf/core/exploit.rb.ut.rb index c145471e34..23fec69b54 100644 --- a/lib/msf/core/exploit.rb.ut.rb +++ b/lib/msf/core/exploit.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/msf/core/exploit/dcerpc.rb.ut.rb b/lib/msf/core/exploit/dcerpc.rb.ut.rb index 851d3c220e..ee31fd3af3 100644 --- a/lib/msf/core/exploit/dcerpc.rb.ut.rb +++ b/lib/msf/core/exploit/dcerpc.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) diff --git a/lib/msf/core/exploit/seh.rb.ut.rb b/lib/msf/core/exploit/seh.rb.ut.rb index 1f2bd1a67b..2f04b762b8 100644 --- a/lib/msf/core/exploit/seh.rb.ut.rb +++ b/lib/msf/core/exploit/seh.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/exploit/tcp.rb.ut.rb b/lib/msf/core/exploit/tcp.rb.ut.rb index 6188b5643b..d11fa4e55b 100644 --- a/lib/msf/core/exploit/tcp.rb.ut.rb +++ b/lib/msf/core/exploit/tcp.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) diff --git a/lib/msf/core/handler/bind_tcp.rb.ut.rb b/lib/msf/core/handler/bind_tcp.rb.ut.rb index b274647f53..6a44bb752d 100644 --- a/lib/msf/core/handler/bind_tcp.rb.ut.rb +++ b/lib/msf/core/handler/bind_tcp.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/handler/reverse_tcp.rb.ut.rb b/lib/msf/core/handler/reverse_tcp.rb.ut.rb index 36fc948227..1370e8c905 100644 --- a/lib/msf/core/handler/reverse_tcp.rb.ut.rb +++ b/lib/msf/core/handler/reverse_tcp.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/module/author.rb.ut.rb b/lib/msf/core/module/author.rb.ut.rb index 8e4f0cdad0..207d4c96ad 100644 --- a/lib/msf/core/module/author.rb.ut.rb +++ b/lib/msf/core/module/author.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/module/platform_list.rb b/lib/msf/core/module/platform_list.rb index 5d586ecd7d..a817193c41 100644 --- a/lib/msf/core/module/platform_list.rb +++ b/lib/msf/core/module/platform_list.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This is a helper to a easy way to specify support platforms. It will take a diff --git a/lib/msf/core/module/platform_list.rb.ut.rb b/lib/msf/core/module/platform_list.rb.ut.rb index ca5675b136..0f519f7918 100644 --- a/lib/msf/core/module/platform_list.rb.ut.rb +++ b/lib/msf/core/module/platform_list.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/module/reference.rb.ut.rb b/lib/msf/core/module/reference.rb.ut.rb index 27f96c235c..bd59184dc1 100644 --- a/lib/msf/core/module/reference.rb.ut.rb +++ b/lib/msf/core/module/reference.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/module/target.rb.ut.rb b/lib/msf/core/module/target.rb.ut.rb index c5cad430b5..7c7c87460f 100644 --- a/lib/msf/core/module/target.rb.ut.rb +++ b/lib/msf/core/module/target.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/option_container.rb.ut.rb b/lib/msf/core/option_container.rb.ut.rb index 3f2e8b28d0..329c034c1a 100644 --- a/lib/msf/core/option_container.rb.ut.rb +++ b/lib/msf/core/option_container.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/msf/core/recon/attribute/group.rb.ut.rb b/lib/msf/core/recon/attribute/group.rb.ut.rb index 8f6d529b55..42765a07b3 100644 --- a/lib/msf/core/recon/attribute/group.rb.ut.rb +++ b/lib/msf/core/recon/attribute/group.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) diff --git a/lib/msf/core/recon/entity.rb.ut.rb b/lib/msf/core/recon/entity.rb.ut.rb index 1d8da88a4e..862efe2167 100644 --- a/lib/msf/core/recon/entity.rb.ut.rb +++ b/lib/msf/core/recon/entity.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/recon/entity/host.rb.ut.rb b/lib/msf/core/recon/entity/host.rb.ut.rb index cacce80591..bafcd5bbd6 100644 --- a/lib/msf/core/recon/entity/host.rb.ut.rb +++ b/lib/msf/core/recon/entity/host.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) diff --git a/lib/msf/core/recon/event_context.rb.ut.rb b/lib/msf/core/recon/event_context.rb.ut.rb index 16d30fa889..ae62b9cdac 100644 --- a/lib/msf/core/recon/event_context.rb.ut.rb +++ b/lib/msf/core/recon/event_context.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/msf/core/session_manager.rb.ut.rb b/lib/msf/core/session_manager.rb.ut.rb index a7d1fd67bd..b52cb320fc 100644 --- a/lib/msf/core/session_manager.rb.ut.rb +++ b/lib/msf/core/session_manager.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex.rb.ts.rb b/lib/rex.rb.ts.rb index 02e80685db..692102074e 100644 --- a/lib/rex.rb.ts.rb +++ b/lib/rex.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I.. +#!/usr/bin/env ruby -I.. require 'test/unit' diff --git a/lib/rex/arch/sparc.rb b/lib/rex/arch/sparc.rb index 2b0764849e..488e2f028a 100644 --- a/lib/rex/arch/sparc.rb +++ b/lib/rex/arch/sparc.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Arch diff --git a/lib/rex/arch/sparc.rb.ut.rb b/lib/rex/arch/sparc.rb.ut.rb index c4a9674be9..92bac960bb 100644 --- a/lib/rex/arch/sparc.rb.ut.rb +++ b/lib/rex/arch/sparc.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/arch/x86.rb b/lib/rex/arch/x86.rb index d50aa81e52..9337e8aab2 100644 --- a/lib/rex/arch/x86.rb +++ b/lib/rex/arch/x86.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Arch diff --git a/lib/rex/arch/x86.rb.ut.rb b/lib/rex/arch/x86.rb.ut.rb index e97b7c06cc..914e714690 100644 --- a/lib/rex/arch/x86.rb.ut.rb +++ b/lib/rex/arch/x86.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/assembly/nasm.rb b/lib/rex/assembly/nasm.rb index 2b5e46f634..4c53101fe8 100644 --- a/lib/rex/assembly/nasm.rb +++ b/lib/rex/assembly/nasm.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'tempfile' require 'rex/file' diff --git a/lib/rex/assembly/nasm.rb.ut.rb b/lib/rex/assembly/nasm.rb.ut.rb index b6252d325f..9c7bea7135 100644 --- a/lib/rex/assembly/nasm.rb.ut.rb +++ b/lib/rex/assembly/nasm.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/encoder/xor.rb b/lib/rex/encoder/xor.rb index 232c0404b2..898b0716bf 100644 --- a/lib/rex/encoder/xor.rb +++ b/lib/rex/encoder/xor.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Encoder diff --git a/lib/rex/encoder/xor/dword.rb b/lib/rex/encoder/xor/dword.rb index b40261e0e4..3bfb29baa7 100644 --- a/lib/rex/encoder/xor/dword.rb +++ b/lib/rex/encoder/xor/dword.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoder/xor' require 'rex/encoding/xor/dword' diff --git a/lib/rex/encoder/xor/dword_additive.rb b/lib/rex/encoder/xor/dword_additive.rb index 032f16c218..b63f9df198 100644 --- a/lib/rex/encoder/xor/dword_additive.rb +++ b/lib/rex/encoder/xor/dword_additive.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoder/xor' require 'rex/encoding/xor/dword_additive' diff --git a/lib/rex/encoders/xor_dword.rb b/lib/rex/encoders/xor_dword.rb index 9f09cdee0c..3319c09c0d 100644 --- a/lib/rex/encoders/xor_dword.rb +++ b/lib/rex/encoders/xor_dword.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/arch/x86' require 'rex/encoder/xor/dword' diff --git a/lib/rex/encoders/xor_dword.rb.ut.rb b/lib/rex/encoders/xor_dword.rb.ut.rb index c1abc729e5..2602c8009f 100644 --- a/lib/rex/encoders/xor_dword.rb.ut.rb +++ b/lib/rex/encoders/xor_dword.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'dev', 'machinetest')) diff --git a/lib/rex/encoders/xor_dword_additive.rb b/lib/rex/encoders/xor_dword_additive.rb index 7c71c1e244..a6ef4b5866 100644 --- a/lib/rex/encoders/xor_dword_additive.rb +++ b/lib/rex/encoders/xor_dword_additive.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoder/xor/dword_additive' diff --git a/lib/rex/encoders/xor_dword_additive.rb.ut.rb b/lib/rex/encoders/xor_dword_additive.rb.ut.rb index 55d944a632..f71a470cdd 100644 --- a/lib/rex/encoders/xor_dword_additive.rb.ut.rb +++ b/lib/rex/encoders/xor_dword_additive.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'dev', 'machinetest')) diff --git a/lib/rex/encoding/xor.rb b/lib/rex/encoding/xor.rb index 87efaac517..22bc3bf6df 100644 --- a/lib/rex/encoding/xor.rb +++ b/lib/rex/encoding/xor.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # make sure the namespace is created diff --git a/lib/rex/encoding/xor.rb.ts.rb b/lib/rex/encoding/xor.rb.ts.rb index 2193ddc173..85d34c080e 100644 --- a/lib/rex/encoding/xor.rb.ts.rb +++ b/lib/rex/encoding/xor.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/encoding/xor/byte.rb b/lib/rex/encoding/xor/byte.rb index 26c3e79b53..a72ae4ca2a 100644 --- a/lib/rex/encoding/xor/byte.rb +++ b/lib/rex/encoding/xor/byte.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoding/xor/generic' diff --git a/lib/rex/encoding/xor/byte.rb.ut.rb b/lib/rex/encoding/xor/byte.rb.ut.rb index d8f3d44992..902d351b53 100644 --- a/lib/rex/encoding/xor/byte.rb.ut.rb +++ b/lib/rex/encoding/xor/byte.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/encoding/xor/dword.rb b/lib/rex/encoding/xor/dword.rb index 510c38caea..f4bea0b2af 100644 --- a/lib/rex/encoding/xor/dword.rb +++ b/lib/rex/encoding/xor/dword.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoding/xor/generic' diff --git a/lib/rex/encoding/xor/dword.rb.ut.rb b/lib/rex/encoding/xor/dword.rb.ut.rb index 5b72376e38..819db54c09 100644 --- a/lib/rex/encoding/xor/dword.rb.ut.rb +++ b/lib/rex/encoding/xor/dword.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/encoding/xor/dword_additive.rb b/lib/rex/encoding/xor/dword_additive.rb index 0d92d0e7a3..e40caff3cb 100644 --- a/lib/rex/encoding/xor/dword_additive.rb +++ b/lib/rex/encoding/xor/dword_additive.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoding/xor/exceptions' require 'rex/encoding/xor/generic' diff --git a/lib/rex/encoding/xor/dword_additive.rb.ut.rb b/lib/rex/encoding/xor/dword_additive.rb.ut.rb index d44d93793c..ef398a92c2 100644 --- a/lib/rex/encoding/xor/dword_additive.rb.ut.rb +++ b/lib/rex/encoding/xor/dword_additive.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/encoding/xor/exceptions.rb b/lib/rex/encoding/xor/exceptions.rb index c8285cb3de..9729844cae 100644 --- a/lib/rex/encoding/xor/exceptions.rb +++ b/lib/rex/encoding/xor/exceptions.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Encoding diff --git a/lib/rex/encoding/xor/generic.rb b/lib/rex/encoding/xor/generic.rb index 6bb35854fc..11c2507207 100644 --- a/lib/rex/encoding/xor/generic.rb +++ b/lib/rex/encoding/xor/generic.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoding/xor/exceptions' require 'rex/text' diff --git a/lib/rex/encoding/xor/generic.rb.ut.rb b/lib/rex/encoding/xor/generic.rb.ut.rb index 2975422b48..3ac2f7d92c 100644 --- a/lib/rex/encoding/xor/generic.rb.ut.rb +++ b/lib/rex/encoding/xor/generic.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/encoding/xor/word.rb b/lib/rex/encoding/xor/word.rb index a8ce633140..a3b9d5c6e3 100644 --- a/lib/rex/encoding/xor/word.rb +++ b/lib/rex/encoding/xor/word.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/encoding/xor/generic' diff --git a/lib/rex/encoding/xor/word.rb.ut.rb b/lib/rex/encoding/xor/word.rb.ut.rb index d719750bf1..a7b1918c95 100644 --- a/lib/rex/encoding/xor/word.rb.ut.rb +++ b/lib/rex/encoding/xor/word.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/evasion.rb.ut.rb b/lib/rex/evasion.rb.ut.rb index ae611f5665..65fa4540a9 100644 --- a/lib/rex/evasion.rb.ut.rb +++ b/lib/rex/evasion.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/exceptions.rb b/lib/rex/exceptions.rb index b242368fc1..d8d7ac5e07 100644 --- a/lib/rex/exceptions.rb +++ b/lib/rex/exceptions.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex diff --git a/lib/rex/exceptions.rb.ut.rb b/lib/rex/exceptions.rb.ut.rb index a9c2d9b3a2..61963da29d 100644 --- a/lib/rex/exceptions.rb.ut.rb +++ b/lib/rex/exceptions.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/exploitation/egghunter.rb.ut.rb b/lib/rex/exploitation/egghunter.rb.ut.rb index 42e9eb5e47..602d298933 100644 --- a/lib/rex/exploitation/egghunter.rb.ut.rb +++ b/lib/rex/exploitation/egghunter.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/exploitation/opcodedb.rb.ut.rb b/lib/rex/exploitation/opcodedb.rb.ut.rb index be9bb04440..29610fdae0 100644 --- a/lib/rex/exploitation/opcodedb.rb.ut.rb +++ b/lib/rex/exploitation/opcodedb.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/exploitation/seh.rb.ut.rb b/lib/rex/exploitation/seh.rb.ut.rb index 28784a96e4..54e6be0af2 100644 --- a/lib/rex/exploitation/seh.rb.ut.rb +++ b/lib/rex/exploitation/seh.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/file.rb.ut.rb b/lib/rex/file.rb.ut.rb index 129c73d75a..e4e07fed4d 100644 --- a/lib/rex/file.rb.ut.rb +++ b/lib/rex/file.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/io/datagram_abstraction.rb b/lib/rex/io/datagram_abstraction.rb index 3656ca4ac4..33531d837d 100644 --- a/lib/rex/io/datagram_abstraction.rb +++ b/lib/rex/io/datagram_abstraction.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'socket' diff --git a/lib/rex/io/stream_abstraction.rb b/lib/rex/io/stream_abstraction.rb index c9814e82e6..fae8cd01d7 100644 --- a/lib/rex/io/stream_abstraction.rb +++ b/lib/rex/io/stream_abstraction.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'socket' diff --git a/lib/rex/nop/opty2.rb.ut.rb b/lib/rex/nop/opty2.rb.ut.rb index cc60c36dcf..b670e59b55 100644 --- a/lib/rex/nop/opty2.rb.ut.rb +++ b/lib/rex/nop/opty2.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/parser/arguments.rb.ut.rb b/lib/rex/parser/arguments.rb.ut.rb index b9a75f06c9..81f0ce8953 100644 --- a/lib/rex/parser/arguments.rb.ut.rb +++ b/lib/rex/parser/arguments.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/parser/ini.rb.ut.rb b/lib/rex/parser/ini.rb.ut.rb index cf925308bd..1890c1f34e 100644 --- a/lib/rex/parser/ini.rb.ut.rb +++ b/lib/rex/parser/ini.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/post.rb b/lib/rex/post.rb index 35c2c35dd4..34d48cb525 100644 --- a/lib/rex/post.rb +++ b/lib/rex/post.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # General independent containers require 'rex/post/permission' diff --git a/lib/rex/post/dir.rb b/lib/rex/post/dir.rb index 53ce612669..eef5274ec8 100644 --- a/lib/rex/post/dir.rb +++ b/lib/rex/post/dir.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/dispatch_ninja.rb b/lib/rex/post/dispatch_ninja.rb index 84b3245ea4..d7024318ff 100644 --- a/lib/rex/post/dispatch_ninja.rb +++ b/lib/rex/post/dispatch_ninja.rb @@ -1,3 +1,3 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/dispatch_ninja/client.rb' diff --git a/lib/rex/post/dispatch_ninja/client.rb b/lib/rex/post/dispatch_ninja/client.rb index 24872764bf..614c8d13fc 100644 --- a/lib/rex/post/dispatch_ninja/client.rb +++ b/lib/rex/post/dispatch_ninja/client.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/dispatch_ninja/file' require 'rex/post/dispatch_ninja/file_stat' diff --git a/lib/rex/post/dispatch_ninja/dir.rb b/lib/rex/post/dispatch_ninja/dir.rb index 43d5fdbe64..70c42272f9 100644 --- a/lib/rex/post/dispatch_ninja/dir.rb +++ b/lib/rex/post/dispatch_ninja/dir.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/dir' diff --git a/lib/rex/post/dispatch_ninja/file.rb b/lib/rex/post/dispatch_ninja/file.rb index 92e922c4c8..326a75d02f 100644 --- a/lib/rex/post/dispatch_ninja/file.rb +++ b/lib/rex/post/dispatch_ninja/file.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/file' require 'rex/post/dispatch_ninja/io' diff --git a/lib/rex/post/dispatch_ninja/file_stat.rb b/lib/rex/post/dispatch_ninja/file_stat.rb index 5aa0666f5b..e291cdc46d 100644 --- a/lib/rex/post/dispatch_ninja/file_stat.rb +++ b/lib/rex/post/dispatch_ninja/file_stat.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/file_stat' diff --git a/lib/rex/post/dispatch_ninja/i_o.rb b/lib/rex/post/dispatch_ninja/i_o.rb index 05ae7860b3..d06e5d053e 100644 --- a/lib/rex/post/dispatch_ninja/i_o.rb +++ b/lib/rex/post/dispatch_ninja/i_o.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/io' diff --git a/lib/rex/post/dispatch_ninja/process.rb b/lib/rex/post/dispatch_ninja/process.rb index db152e1048..2712cc633f 100644 --- a/lib/rex/post/dispatch_ninja/process.rb +++ b/lib/rex/post/dispatch_ninja/process.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/process' diff --git a/lib/rex/post/file.rb b/lib/rex/post/file.rb index 120ce3be14..1e7e884b23 100644 --- a/lib/rex/post/file.rb +++ b/lib/rex/post/file.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/io' diff --git a/lib/rex/post/file_stat.rb b/lib/rex/post/file_stat.rb index e6cb583964..31b73305ad 100644 --- a/lib/rex/post/file_stat.rb +++ b/lib/rex/post/file_stat.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This is just a container class basically, that acts like File::Struct diff --git a/lib/rex/post/io.rb b/lib/rex/post/io.rb index 6f9a2d3f2e..2f48511c4a 100644 --- a/lib/rex/post/io.rb +++ b/lib/rex/post/io.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter.rb b/lib/rex/post/meterpreter.rb index 0809eb1921..8c5da48ad8 100644 --- a/lib/rex/post/meterpreter.rb +++ b/lib/rex/post/meterpreter.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/client' require 'rex/post/meterpreter/ui/console' diff --git a/lib/rex/post/meterpreter/channel.rb b/lib/rex/post/meterpreter/channel.rb index 9dc8d585a3..d463fcefca 100644 --- a/lib/rex/post/meterpreter/channel.rb +++ b/lib/rex/post/meterpreter/channel.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/inbound_packet_handler' diff --git a/lib/rex/post/meterpreter/channel_container.rb b/lib/rex/post/meterpreter/channel_container.rb index 5a1f278a9a..9e78890f55 100644 --- a/lib/rex/post/meterpreter/channel_container.rb +++ b/lib/rex/post/meterpreter/channel_container.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/channels/pool.rb b/lib/rex/post/meterpreter/channels/pool.rb index df576052d1..14319fb0b8 100644 --- a/lib/rex/post/meterpreter/channels/pool.rb +++ b/lib/rex/post/meterpreter/channels/pool.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/channel' diff --git a/lib/rex/post/meterpreter/channels/pools/file.rb b/lib/rex/post/meterpreter/channels/pools/file.rb index 235e8d290a..bdba8ac320 100644 --- a/lib/rex/post/meterpreter/channels/pools/file.rb +++ b/lib/rex/post/meterpreter/channels/pools/file.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/channels/pool' require 'rex/post/meterpreter/extensions/stdapi/tlv' diff --git a/lib/rex/post/meterpreter/channels/pools/stream_pool.rb b/lib/rex/post/meterpreter/channels/pools/stream_pool.rb index 5774b7724c..39b1e13127 100644 --- a/lib/rex/post/meterpreter/channels/pools/stream_pool.rb +++ b/lib/rex/post/meterpreter/channels/pools/stream_pool.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/channels/pool' require 'rex/post/meterpreter/extensions/stdapi/tlv' diff --git a/lib/rex/post/meterpreter/channels/stream.rb b/lib/rex/post/meterpreter/channels/stream.rb index f990748faa..0e01ba4a09 100644 --- a/lib/rex/post/meterpreter/channels/stream.rb +++ b/lib/rex/post/meterpreter/channels/stream.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/io/stream_abstraction' require 'rex/post/meterpreter/channel' diff --git a/lib/rex/post/meterpreter/client.rb b/lib/rex/post/meterpreter/client.rb index 0efc547555..bef23263ae 100644 --- a/lib/rex/post/meterpreter/client.rb +++ b/lib/rex/post/meterpreter/client.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'socket' require 'rex/post/meterpreter/client_core' diff --git a/lib/rex/post/meterpreter/client_core.rb b/lib/rex/post/meterpreter/client_core.rb index 7e5f696ab0..33b1d384f0 100644 --- a/lib/rex/post/meterpreter/client_core.rb +++ b/lib/rex/post/meterpreter/client_core.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/packet' require 'rex/post/meterpreter/extension' diff --git a/lib/rex/post/meterpreter/dependencies.rb b/lib/rex/post/meterpreter/dependencies.rb index 130ff7c492..47852c5936 100644 --- a/lib/rex/post/meterpreter/dependencies.rb +++ b/lib/rex/post/meterpreter/dependencies.rb @@ -1,3 +1,3 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/permission' diff --git a/lib/rex/post/meterpreter/extension.rb b/lib/rex/post/meterpreter/extension.rb index c45cf22f45..545f6abfb6 100644 --- a/lib/rex/post/meterpreter/extension.rb +++ b/lib/rex/post/meterpreter/extension.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/extensions/priv/fs.rb b/lib/rex/post/meterpreter/extensions/priv/fs.rb index c0372ff8fe..93302ec8ea 100644 --- a/lib/rex/post/meterpreter/extensions/priv/fs.rb +++ b/lib/rex/post/meterpreter/extensions/priv/fs.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/extensions/priv/passwd.rb b/lib/rex/post/meterpreter/extensions/priv/passwd.rb index 7977833826..927b5ffa30 100644 --- a/lib/rex/post/meterpreter/extensions/priv/passwd.rb +++ b/lib/rex/post/meterpreter/extensions/priv/passwd.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/extensions/priv/priv.rb b/lib/rex/post/meterpreter/extensions/priv/priv.rb index d9a52aea5f..cc36efcfcd 100644 --- a/lib/rex/post/meterpreter/extensions/priv/priv.rb +++ b/lib/rex/post/meterpreter/extensions/priv/priv.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/extensions/priv/tlv' require 'rex/post/meterpreter/extensions/priv/passwd' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/constants.rb b/lib/rex/post/meterpreter/extensions/stdapi/constants.rb index f5758c247f..f32b79d70b 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/constants.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/constants.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby ### # diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb index a3b0bac816..f613713097 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/dir' require 'rex/post/meterpreter/extensions/stdapi/stdapi' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb index 72dfe039a7..d124b06f19 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/file' require 'rex/post/meterpreter/channel' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb index b5350ffaf5..c8ecf2f1fb 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/file_stat' require 'rex/post/meterpreter/extensions/stdapi/stdapi' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb b/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb index a08f79c6f5..6784fe716d 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/fs/io.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/io' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/net/config.rb b/lib/rex/post/meterpreter/extensions/stdapi/net/config.rb index c8b5bbf036..f6cd06463f 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/net/config.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/net/config.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/extensions/stdapi/tlv' require 'rex/post/meterpreter/extensions/stdapi/net/route' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb b/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb index f7647eebe9..f692040c4d 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/net/interface.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'ipaddr' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/net/route.rb b/lib/rex/post/meterpreter/extensions/stdapi/net/route.rb index 646f095a44..de4295f6a2 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/net/route.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/net/route.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'ipaddr' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/net/socket.rb b/lib/rex/post/meterpreter/extensions/stdapi/net/socket.rb index 8474fc93b6..98d8001f28 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/net/socket.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/net/socket.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'thread' require 'rex/socket/tcp' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb b/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb index d8998a4d2f..93f9eca681 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/net/socket_subsystem/tcp_client_channel.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/channels/stream' require 'rex/post/meterpreter/extensions/stdapi/tlv' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb b/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb index 3b4ed1bcc5..347aa3c94e 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/stdapi.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/object_aliases' require 'rex/post/meterpreter/extension' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb index b74376af2a..2ed968474f 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/process' require 'rex/post/meterpreter/packet' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb index e742141f33..e403f4ee85 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/process' require 'rex/post/meterpreter/packet' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb index 588797c26a..72432143fc 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/event_log_subsystem/event_record.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb index e5def4267e..3850b3f840 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/power.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/process' require 'rex/post/meterpreter/packet' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb index 2aff7141b4..445fbfc9ad 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/process' require 'rex/post/meterpreter/packet' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb index db420960d0..cd5b68b5da 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/image.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/client' require 'rex/post/meterpreter/extensions/stdapi/constants' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb index fd7931c0b2..c4fc876250 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/io.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/client' require 'rex/post/meterpreter/extensions/stdapi/constants' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb index 46559af515..05e10b492f 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/memory.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/client' require 'rex/post/meterpreter/extensions/stdapi/constants' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb index b687e2d16f..b00ebf3bc7 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/process_subsystem/thread.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/client' require 'rex/post/meterpreter/extensions/stdapi/constants' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb index b76aac5bab..94e27093a5 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/process' require 'rex/post/meterpreter/packet' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb index 60195e402b..99932f7ff5 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_key.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/extensions/stdapi/constants' require 'rex/post/meterpreter/extensions/stdapi/sys/registry' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb index e4cfca70d4..f5b90a96aa 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/registry_subsystem/registry_value.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/extensions/stdapi/constants' require 'rex/post/meterpreter/extensions/stdapi/sys/registry' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb index 0177169b72..f4e05b4b77 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/thread.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/thread' require 'rex/post/meterpreter/client' diff --git a/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb b/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb index 889d718eb4..a06fef8f5e 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/extensions/stdapi/ui.rb b/lib/rex/post/meterpreter/extensions/stdapi/ui.rb index cd2b2609b2..03df12e876 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/ui.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/ui.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/ui' diff --git a/lib/rex/post/meterpreter/inbound_packet_handler.rb b/lib/rex/post/meterpreter/inbound_packet_handler.rb index 6794f73fa6..2eb8faae21 100644 --- a/lib/rex/post/meterpreter/inbound_packet_handler.rb +++ b/lib/rex/post/meterpreter/inbound_packet_handler.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/object_aliases.rb b/lib/rex/post/meterpreter/object_aliases.rb index 42f38e71c5..036b53fbb9 100644 --- a/lib/rex/post/meterpreter/object_aliases.rb +++ b/lib/rex/post/meterpreter/object_aliases.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/packet.rb b/lib/rex/post/meterpreter/packet.rb index dd02a5fab2..1441c9822f 100644 --- a/lib/rex/post/meterpreter/packet.rb +++ b/lib/rex/post/meterpreter/packet.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/packet_dispatcher.rb b/lib/rex/post/meterpreter/packet_dispatcher.rb index 7c79529b33..a2814a7c2d 100644 --- a/lib/rex/post/meterpreter/packet_dispatcher.rb +++ b/lib/rex/post/meterpreter/packet_dispatcher.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/post/meterpreter/packet_response_waiter' diff --git a/lib/rex/post/meterpreter/packet_parser.rb b/lib/rex/post/meterpreter/packet_parser.rb index 20c328e042..d2b58d76fe 100644 --- a/lib/rex/post/meterpreter/packet_parser.rb +++ b/lib/rex/post/meterpreter/packet_parser.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/meterpreter/packet_response_waiter.rb b/lib/rex/post/meterpreter/packet_response_waiter.rb index b53d6ed709..11b9b53a2f 100644 --- a/lib/rex/post/meterpreter/packet_response_waiter.rb +++ b/lib/rex/post/meterpreter/packet_response_waiter.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'timeout' require 'thread' diff --git a/lib/rex/post/permission.rb b/lib/rex/post/permission.rb index 926e3d0e9b..eb85c9596f 100644 --- a/lib/rex/post/permission.rb +++ b/lib/rex/post/permission.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Generic page protection flags PROT_NONE = 0 diff --git a/lib/rex/post/process.rb b/lib/rex/post/process.rb index 992673c5df..8b5a436c44 100644 --- a/lib/rex/post/process.rb +++ b/lib/rex/post/process.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/thread.rb b/lib/rex/post/thread.rb index 9e9ebc9374..f5ca219795 100644 --- a/lib/rex/post/thread.rb +++ b/lib/rex/post/thread.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/post/ui.rb b/lib/rex/post/ui.rb index 5f56ea521f..b009078138 100644 --- a/lib/rex/post/ui.rb +++ b/lib/rex/post/ui.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby module Rex module Post diff --git a/lib/rex/proto.rb.ts.rb b/lib/rex/proto.rb.ts.rb index f1a5e72e6c..8018ffebf3 100644 --- a/lib/rex/proto.rb.ts.rb +++ b/lib/rex/proto.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/proto.ts.rb b/lib/rex/proto.ts.rb index 21753c15de..18688712b1 100644 --- a/lib/rex/proto.ts.rb +++ b/lib/rex/proto.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' require 'rex/proto/smb.ts' diff --git a/lib/rex/proto/dcerpc.rb.ts.rb b/lib/rex/proto/dcerpc.rb.ts.rb index cacddf85a3..049eaa3b0d 100644 --- a/lib/rex/proto/dcerpc.rb.ts.rb +++ b/lib/rex/proto/dcerpc.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/test' require 'rex/proto/dcerpc/uuid.rb.ut' diff --git a/lib/rex/proto/dcerpc.ts.rb b/lib/rex/proto/dcerpc.ts.rb index ccce388c0b..c7dc7f6e39 100644 --- a/lib/rex/proto/dcerpc.ts.rb +++ b/lib/rex/proto/dcerpc.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' require 'rex/proto/dcerpc/uuid.rb.ut' diff --git a/lib/rex/proto/dcerpc/client.rb.ut.rb b/lib/rex/proto/dcerpc/client.rb.ut.rb index 7392b6e76b..af291b9e42 100755 --- a/lib/rex/proto/dcerpc/client.rb.ut.rb +++ b/lib/rex/proto/dcerpc/client.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/dcerpc/handle.rb.ut.rb b/lib/rex/proto/dcerpc/handle.rb.ut.rb index c37068caaf..ba07dc306c 100644 --- a/lib/rex/proto/dcerpc/handle.rb.ut.rb +++ b/lib/rex/proto/dcerpc/handle.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/dcerpc/ndr.rb.ut.rb b/lib/rex/proto/dcerpc/ndr.rb.ut.rb index 0b54b6fefb..7e87cfab3e 100644 --- a/lib/rex/proto/dcerpc/ndr.rb.ut.rb +++ b/lib/rex/proto/dcerpc/ndr.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/dcerpc/packet.rb.ut.rb b/lib/rex/proto/dcerpc/packet.rb.ut.rb index e32e073bff..29679f7493 100644 --- a/lib/rex/proto/dcerpc/packet.rb.ut.rb +++ b/lib/rex/proto/dcerpc/packet.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/dcerpc/response.rb.ut.rb b/lib/rex/proto/dcerpc/response.rb.ut.rb index 9d187e3954..8ca0aa911b 100644 --- a/lib/rex/proto/dcerpc/response.rb.ut.rb +++ b/lib/rex/proto/dcerpc/response.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/dcerpc/uuid.rb.ut.rb b/lib/rex/proto/dcerpc/uuid.rb.ut.rb index d61ae94109..2f622db592 100644 --- a/lib/rex/proto/dcerpc/uuid.rb.ut.rb +++ b/lib/rex/proto/dcerpc/uuid.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/http.rb.ts.rb b/lib/rex/proto/http.rb.ts.rb index 75ff7b9edb..c746cfa589 100644 --- a/lib/rex/proto/http.rb.ts.rb +++ b/lib/rex/proto/http.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' diff --git a/lib/rex/proto/http.ts.rb b/lib/rex/proto/http.ts.rb index a3fdac0583..c0a99e7b8f 100644 --- a/lib/rex/proto/http.ts.rb +++ b/lib/rex/proto/http.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' diff --git a/lib/rex/proto/http/client.rb.ut.rb b/lib/rex/proto/http/client.rb.ut.rb index 90289309a2..66be585e31 100644 --- a/lib/rex/proto/http/client.rb.ut.rb +++ b/lib/rex/proto/http/client.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/http/handler/erb.rb.ut.rb b/lib/rex/proto/http/handler/erb.rb.ut.rb index 8f5985fde8..24b4584020 100644 --- a/lib/rex/proto/http/handler/erb.rb.ut.rb +++ b/lib/rex/proto/http/handler/erb.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) diff --git a/lib/rex/proto/http/handler/proc.rb.ut.rb b/lib/rex/proto/http/handler/proc.rb.ut.rb index 5960e6dfb1..bc572c2a16 100644 --- a/lib/rex/proto/http/handler/proc.rb.ut.rb +++ b/lib/rex/proto/http/handler/proc.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', '..')) diff --git a/lib/rex/proto/http/packet.rb.ut.rb b/lib/rex/proto/http/packet.rb.ut.rb index a30ac078ee..f10f26dde5 100644 --- a/lib/rex/proto/http/packet.rb.ut.rb +++ b/lib/rex/proto/http/packet.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/http/request.rb.ut.rb b/lib/rex/proto/http/request.rb.ut.rb index 077e418e9d..27f812f785 100644 --- a/lib/rex/proto/http/request.rb.ut.rb +++ b/lib/rex/proto/http/request.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/http/response.rb.ut.rb b/lib/rex/proto/http/response.rb.ut.rb index 8326a7c7de..2b87c48164 100644 --- a/lib/rex/proto/http/response.rb.ut.rb +++ b/lib/rex/proto/http/response.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/http/server.rb.ut.rb b/lib/rex/proto/http/server.rb.ut.rb index 0943e821c8..ccdcc2967e 100644 --- a/lib/rex/proto/http/server.rb.ut.rb +++ b/lib/rex/proto/http/server.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/smb.rb.ts.rb b/lib/rex/proto/smb.rb.ts.rb index af639d1e9f..cc67bcaa10 100644 --- a/lib/rex/proto/smb.rb.ts.rb +++ b/lib/rex/proto/smb.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'rex/test' require 'rex/proto/smb/client.rb.ut.rb' diff --git a/lib/rex/proto/smb.ts.rb b/lib/rex/proto/smb.ts.rb index 29f4646739..873127a6ca 100644 --- a/lib/rex/proto/smb.ts.rb +++ b/lib/rex/proto/smb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby require 'test/unit' require 'rex/proto/dcerpc' diff --git a/lib/rex/proto/smb/client.rb.ut.rb b/lib/rex/proto/smb/client.rb.ut.rb index 55c8cc869b..b109f76176 100644 --- a/lib/rex/proto/smb/client.rb.ut.rb +++ b/lib/rex/proto/smb/client.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/smb/constants.rb.ut.rb b/lib/rex/proto/smb/constants.rb.ut.rb index 7447065e24..3ca1c664db 100644 --- a/lib/rex/proto/smb/constants.rb.ut.rb +++ b/lib/rex/proto/smb/constants.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/smb/crypt.rb.ut.rb b/lib/rex/proto/smb/crypt.rb.ut.rb index b567f7400d..9243fbe9de 100644 --- a/lib/rex/proto/smb/crypt.rb.ut.rb +++ b/lib/rex/proto/smb/crypt.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/smb/simpleclient.rb.ut.rb b/lib/rex/proto/smb/simpleclient.rb.ut.rb index 3c3b131a70..e353f8d9cc 100644 --- a/lib/rex/proto/smb/simpleclient.rb.ut.rb +++ b/lib/rex/proto/smb/simpleclient.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/proto/smb/utils.rb.ut.rb b/lib/rex/proto/smb/utils.rb.ut.rb index 952629b6f0..cfd8be1088 100644 --- a/lib/rex/proto/smb/utils.rb.ut.rb +++ b/lib/rex/proto/smb/utils.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/service_manager.rb.ut.rb b/lib/rex/service_manager.rb.ut.rb index 75d12b0f08..605eee60b4 100644 --- a/lib/rex/service_manager.rb.ut.rb +++ b/lib/rex/service_manager.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/socket.rb.ut.rb b/lib/rex/socket.rb.ut.rb index c7f49e9a1d..9dd2958e89 100644 --- a/lib/rex/socket.rb.ut.rb +++ b/lib/rex/socket.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/socket/comm/local.rb.ut.rb b/lib/rex/socket/comm/local.rb.ut.rb index e6d58bd29e..7e08dc0810 100644 --- a/lib/rex/socket/comm/local.rb.ut.rb +++ b/lib/rex/socket/comm/local.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/socket/parameters.rb.ut.rb b/lib/rex/socket/parameters.rb.ut.rb index 4c00264f0a..59f50c518d 100644 --- a/lib/rex/socket/parameters.rb.ut.rb +++ b/lib/rex/socket/parameters.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/socket/ssl_tcp.rb.ut.rb b/lib/rex/socket/ssl_tcp.rb.ut.rb index e50d5f8c24..7618ccc766 100644 --- a/lib/rex/socket/ssl_tcp.rb.ut.rb +++ b/lib/rex/socket/ssl_tcp.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/socket/subnet_walker.rb.ut.rb b/lib/rex/socket/subnet_walker.rb.ut.rb index 4c3941e070..e8f61d7acc 100644 --- a/lib/rex/socket/subnet_walker.rb.ut.rb +++ b/lib/rex/socket/subnet_walker.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/socket/switch_board.rb.ut.rb b/lib/rex/socket/switch_board.rb.ut.rb index bd5b81ca8c..1a797d6a65 100644 --- a/lib/rex/socket/switch_board.rb.ut.rb +++ b/lib/rex/socket/switch_board.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/socket/tcp.rb.ut.rb b/lib/rex/socket/tcp.rb.ut.rb index e3a2a053c5..5017d36b05 100644 --- a/lib/rex/socket/tcp.rb.ut.rb +++ b/lib/rex/socket/tcp.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/socket/tcp_server.rb.ut.rb b/lib/rex/socket/tcp_server.rb.ut.rb index 0add424e1b..d166636f47 100644 --- a/lib/rex/socket/tcp_server.rb.ut.rb +++ b/lib/rex/socket/tcp_server.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/socket/udp.rb.ut.rb b/lib/rex/socket/udp.rb.ut.rb index f5b67f17dc..75394b9700 100644 --- a/lib/rex/socket/udp.rb.ut.rb +++ b/lib/rex/socket/udp.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..')) diff --git a/lib/rex/struct2.rb b/lib/rex/struct2.rb index 08c8f751a7..cfc1c1ba88 100644 --- a/lib/rex/struct2.rb +++ b/lib/rex/struct2.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # just a shim to load all of the Struct2 libraries diff --git a/lib/rex/struct2/c_struct.rb b/lib/rex/struct2/c_struct.rb index 6523ffabd7..ec8d16cd83 100644 --- a/lib/rex/struct2/c_struct.rb +++ b/lib/rex/struct2/c_struct.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/c_struct_template.rb b/lib/rex/struct2/c_struct_template.rb index d466041a94..9a814f476b 100644 --- a/lib/rex/struct2/c_struct_template.rb +++ b/lib/rex/struct2/c_struct_template.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/constant.rb b/lib/rex/struct2/constant.rb index 8f29f9e8b9..b47a5521a2 100644 --- a/lib/rex/struct2/constant.rb +++ b/lib/rex/struct2/constant.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/element.rb b/lib/rex/struct2/element.rb index 038caebff1..216cdae739 100644 --- a/lib/rex/struct2/element.rb +++ b/lib/rex/struct2/element.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/generic.rb b/lib/rex/struct2/generic.rb index 357162358b..acf222c201 100644 --- a/lib/rex/struct2/generic.rb +++ b/lib/rex/struct2/generic.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/restraint.rb b/lib/rex/struct2/restraint.rb index 844e454aba..9826163ee7 100644 --- a/lib/rex/struct2/restraint.rb +++ b/lib/rex/struct2/restraint.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/s_string.rb b/lib/rex/struct2/s_string.rb index cbad8a5533..74493f07db 100644 --- a/lib/rex/struct2/s_string.rb +++ b/lib/rex/struct2/s_string.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/struct2/s_struct.rb b/lib/rex/struct2/s_struct.rb index ca447c5d4b..688cbbc35f 100644 --- a/lib/rex/struct2/s_struct.rb +++ b/lib/rex/struct2/s_struct.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # Rex::Struct2 module Rex diff --git a/lib/rex/text.rb.ut.rb b/lib/rex/text.rb.ut.rb index 8467444f61..8c327c7857 100644 --- a/lib/rex/text.rb.ut.rb +++ b/lib/rex/text.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/transformer.rb.ut.rb b/lib/rex/transformer.rb.ut.rb index b05167702d..d41d9a08f3 100644 --- a/lib/rex/transformer.rb.ut.rb +++ b/lib/rex/transformer.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..')) diff --git a/lib/rex/ui/text/color.rb.ut.rb b/lib/rex/ui/text/color.rb.ut.rb index c85183de5c..82c443f9fe 100644 --- a/lib/rex/ui/text/color.rb.ut.rb +++ b/lib/rex/ui/text/color.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/ui/text/progress_tracker.rb.ut.rb b/lib/rex/ui/text/progress_tracker.rb.ut.rb index 6b144aa041..8ac7109a9c 100644 --- a/lib/rex/ui/text/progress_tracker.rb.ut.rb +++ b/lib/rex/ui/text/progress_tracker.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/lib/rex/ui/text/table.rb.ut.rb b/lib/rex/ui/text/table.rb.ut.rb index d1ce02fc6e..9d1d4f42de 100644 --- a/lib/rex/ui/text/table.rb.ut.rb +++ b/lib/rex/ui/text/table.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..')) diff --git a/modules/encoders/generic/none.rb.ut.rb b/modules/encoders/generic/none.rb.ut.rb index fdf5f24de3..5c7dc715b7 100644 --- a/modules/encoders/generic/none.rb.ut.rb +++ b/modules/encoders/generic/none.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.dirname(__FILE__)) diff --git a/modules/encoders/x86/call4_dword_xor.rb.ut.rb b/modules/encoders/x86/call4_dword_xor.rb.ut.rb index c126f0cb9f..ce13fabf43 100644 --- a/modules/encoders/x86/call4_dword_xor.rb.ut.rb +++ b/modules/encoders/x86/call4_dword_xor.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.dirname(__FILE__)) diff --git a/modules/encoders/x86/countdown.rb.ut.rb b/modules/encoders/x86/countdown.rb.ut.rb index d78159bfd0..5a76d80e41 100644 --- a/modules/encoders/x86/countdown.rb.ut.rb +++ b/modules/encoders/x86/countdown.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.dirname(__FILE__)) diff --git a/modules/encoders/x86/fnstenv_mov.rb.ut.rb b/modules/encoders/x86/fnstenv_mov.rb.ut.rb index e75a317879..74d34cf010 100644 --- a/modules/encoders/x86/fnstenv_mov.rb.ut.rb +++ b/modules/encoders/x86/fnstenv_mov.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.dirname(__FILE__)) diff --git a/modules/encoders/x86/jmp_call_additive.rb.ut.rb b/modules/encoders/x86/jmp_call_additive.rb.ut.rb index e9c6d04978..ebdb320ae1 100644 --- a/modules/encoders/x86/jmp_call_additive.rb.ut.rb +++ b/modules/encoders/x86/jmp_call_additive.rb.ut.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..', 'lib')) $:.unshift(File.dirname(__FILE__)) diff --git a/modules/modules.rb.ts.rb b/modules/modules.rb.ts.rb index a4b9eaf7a1..027c4cd466 100644 --- a/modules/modules.rb.ts.rb +++ b/modules/modules.rb.ts.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -I../lib +#!/usr/bin/env ruby -I../lib $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) diff --git a/msfcli b/msfcli index ad8ace0dd0..5c5c96e088 100755 --- a/msfcli +++ b/msfcli @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env 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 diff --git a/msfconsole b/msfconsole index 54510fd914..f5378c680b 100755 --- a/msfconsole +++ b/msfconsole @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This user interface provides users with a command console interface to the # framework. diff --git a/msfd b/msfd index 4939c56a2d..04ac059453 100755 --- a/msfd +++ b/msfd @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env 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 diff --git a/msfencode b/msfencode index a5c7db61ff..6772e89b4c 100755 --- a/msfencode +++ b/msfencode @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), 'lib')) diff --git a/msfopcode b/msfopcode index 611a73b619..5b8f64d730 100755 --- a/msfopcode +++ b/msfopcode @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This user interface provides a command line interface to the Metasploit # Opcode Database. It provides users with the ability to search for opcodes diff --git a/msfpayload b/msfpayload index 06e6c0bfdb..c1d2b99c17 100755 --- a/msfpayload +++ b/msfpayload @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), 'lib')) diff --git a/msfweb b/msfweb index a17600972f..e89910d766 100755 --- a/msfweb +++ b/msfweb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This user interface provides users with a web-based interface to the # framework that can be shared. diff --git a/plugins/msfd.rb b/plugins/msfd.rb index 0a9a62f57d..98a16ecf07 100644 --- a/plugins/msfd.rb +++ b/plugins/msfd.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This plugin provides an msf daemon interface that spawns a listener on a # defined port (default 55554) and gives each connecting client its own diff --git a/tools/nasm_shell.rb b/tools/nasm_shell.rb index bc28c096b8..198f08e5e4 100755 --- a/tools/nasm_shell.rb +++ b/tools/nasm_shell.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby # # This tool provides an easy way to see what opcodes are associated with # certain x86 instructions by making use of nasm if it is installed and diff --git a/tools/pattern_create.rb b/tools/pattern_create.rb index 2a61bbfdc3..72e9da86c2 100755 --- a/tools/pattern_create.rb +++ b/tools/pattern_create.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) diff --git a/tools/pattern_offset.rb b/tools/pattern_offset.rb index 101de6735f..22fbc94a95 100755 --- a/tools/pattern_offset.rb +++ b/tools/pattern_offset.rb @@ -1,4 +1,4 @@ -#!/usr/bin/ruby +#!/usr/bin/env ruby $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))