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:
Ben Waugh
2011-12-27 18:31:43 +10:00
parent ffe20c8f3b
commit 3ec19fec99
2 changed files with 22 additions and 0 deletions

2
test/unit/BeEF.rc Normal file
View File

@@ -0,0 +1,2 @@
load msgrpc Pass=abc123

View File

@@ -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