Added helper functions for starting attacker and victim browsers

This commit is contained in:
Wade Alcorn
2012-01-13 23:39:25 +10:00
parent a08126d296
commit a9ce3f1a96
2 changed files with 13 additions and 3 deletions

View File

@@ -30,4 +30,14 @@ class BeefTest
session
end
def self.new_attacker
self.login
end
def self.new_victim
victim = Capybara::Session.new(:selenium)
victim.visit(VICTIM_URL)
victim
end
end

View File

@@ -53,9 +53,9 @@ class TC_login < Test::Unit::TestCase
end
def test_hooking_browser
attacker = BeefTest.login
victim = Capybara::Session.new(:selenium)
victim.visit(VICTIM_URL)
attacker = BeefTest.new_attacker
victim = BeefTest.new_victim
sleep 2.0
attacker.has_content?(VICTIM_DOMAIN)