Skip to content
This repository has been archived by the owner on Mar 27, 2018. It is now read-only.

Commit

Permalink
Regression tests for owtf/owtf#390
Browse files Browse the repository at this point in the history
  • Loading branch information
DePierre committed Apr 18, 2016
1 parent d31c1bc commit 3a6b1b6
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests_functional/plugins/web/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,36 @@ def test_web_grep(self):
self.run_owtf('-g', 'web', '-t', 'grep', "%s://%s:%s" % (self.PROTOCOL, self.IP, self.PORT))
# Test OWTF exited cleanly.
self.assert_is_in_logs('All jobs have been done. Exiting.', name='MainProcess')

def test_web_default_active(self):
"""Test OWTF WEB active plugins run by default if no '-g' option specified (regression #390)."""
self.run_owtf('-s', '-t', 'active', "%s://%s:%s" % (self.PROTOCOL, self.IP, self.PORT))
self.assert_is_in_logs('(web/active', name='Worker', msg='Web active plugins should have been run!')
self.assert_is_not_in_logs('(web/passive', name='Worker', msg='Web passive plugins should not have been run!')
self.assert_is_not_in_logs('(web/semi_passive', name='Worker', msg='Web semi passive plugins should not have been run!')
self.assert_is_not_in_logs('(auxiliary/', name='Worker', msg='Aux plugins should not have been run!')
self.assert_is_not_in_logs('(network/', name='Worker', msg='Net plugins should not have been run!')
# Test OWTF exited cleanly.
self.assert_is_in_logs('All jobs have been done. Exiting.', name='MainProcess')

def test_web_default_passive(self):
"""Test OWTF WEB passive plugins run by default if no '-g' option specified (regression #390)."""
self.run_owtf('-s', '-t', 'passive', "%s://%s:%s" % (self.PROTOCOL, self.IP, self.PORT))
self.assert_is_in_logs('(web/passive', name='Worker', msg='Web passive plugins should have been run!')
self.assert_is_not_in_logs('(web/active', name='Worker', msg='Web active plugins should not have been run!')
self.assert_is_not_in_logs('(web/semi_passive', name='Worker', msg='Web semi passive plugins should not have been run!')
self.assert_is_not_in_logs('(auxiliary/', name='Worker', msg='Aux plugins should not have been run!')
self.assert_is_not_in_logs('(network/', name='Worker', msg='Net plugins should not have been run!')
# Test OWTF exited cleanly.
self.assert_is_in_logs('All jobs have been done. Exiting.', name='MainProcess')

def test_web_default_semi_passive(self):
"""Test OWTF WEB semi passive plugins run by default if no '-g' option specified (regression #390)."""
self.run_owtf('-s', '-t', 'semi_passive', "%s://%s:%s" % (self.PROTOCOL, self.IP, self.PORT))
self.assert_is_in_logs('(web/semi_passive', name='Worker', msg='Web semi passive plugins should have been run!')
self.assert_is_not_in_logs('(web/active', name='Worker', msg='Web active plugins should not have been run!')
self.assert_is_not_in_logs('(web/passive', name='Worker', msg='Web passive plugins should not have been run!')
self.assert_is_not_in_logs('(auxiliary/', name='Worker', msg='Aux plugins should not have been run!')
self.assert_is_not_in_logs('(network/', name='Worker', msg='Net plugins should not have been run!')
# Test OWTF exited cleanly.
self.assert_is_in_logs('All jobs have been done. Exiting.', name='MainProcess')

0 comments on commit 3a6b1b6

Please sign in to comment.