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

Commit

Permalink
trying some new tests out
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3bl33d3r committed Aug 23, 2015
1 parent 27c28e5 commit db5b65c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/mitmf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

[MITMf]

# Required BeEF and Metasploit options
[[BeEF]]
host = 127.0.0.1
Expand Down
20 changes: 16 additions & 4 deletions tests/basic_tests.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import unittest
from commands import getstatusoutput
import logging

class BasicTests(unittest.TestCase):

def test_exec(self):
status, res = getstatusoutput('sudo python mitmf.py --help')
self.assertEqual(0, status, msg=res)
def test_configfile(self):
from configobj import ConfigObj
config = ConfigObj('config/mitmf.conf')

def test_logger(self):
from core.logger import logger
logger.log_level = logging.DEBUG
formatter = logging.Formatter("%(asctime)s [unittest] %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
log = logger().setup_logger("unittest", formatter)

def test_DNSChef(self):
from core.logger import logger
logger.log_level = logging.DEBUG
from core.servers.DNS import DNSChef
DNSChef().start()

if __name__ == '__main__':
unittest.main()

0 comments on commit db5b65c

Please sign in to comment.