MSF starts/stops with unit tests
Added BeEF.rc with MSF starting parameters changed ts_beef.rb to startup and shutdown MSF before/after unit tests
This commit is contained in:
2
test/unit/BeEF.rc
Normal file
2
test/unit/BeEF.rc
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
load msgrpc Pass=abc123
|
||||
@@ -48,6 +48,19 @@ require './tc_grep'
|
||||
require './tc_filesystem'
|
||||
require './extensions/tc_metasploit'
|
||||
|
||||
begin
|
||||
child = fork do
|
||||
Signal.trap("TERM") do
|
||||
puts "Shutting Down"
|
||||
exit 99
|
||||
end
|
||||
puts "Starting MSF..."
|
||||
%x{cd ../msf;./msfconsole -r ../unit/BeEF.rc}
|
||||
exit 99
|
||||
end
|
||||
sleep 25
|
||||
end
|
||||
|
||||
class TS_BeefTests
|
||||
def self.suite
|
||||
suite = Test::Unit::TestSuite.new(name="BeEF TestSuite")
|
||||
@@ -64,3 +77,10 @@ class TS_BeefTests
|
||||
end
|
||||
|
||||
Test::Unit::UI::Console::TestRunner.run(TS_BeefTests)
|
||||
|
||||
begin
|
||||
puts "\nShutting down MSF ()...\n"
|
||||
Process.kill("TERM", child)
|
||||
Process.wait
|
||||
sleep 240
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user