Ejemplo n.º 1
0
 def test_start_scan_invalid_typelist_should_return_error(self):
     """
     Test startscan(self, scanname, scantarget, modulelist, typelist, usecase)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     start_scan = sfwebui.startscan('example scan name', 'spiderfoot.net', None, 'invalid type list', None)
     self.assertIn('Invalid request: no modules specified for scan.', start_scan)
     start_scan = sfwebui.startscan('example scan name', 'spiderfoot.net', '', 'invalid type list', '')
     self.assertIn('Invalid request: no modules specified for scan.', start_scan)
Ejemplo n.º 2
0
 def test_start_scan_unrecognized_scantarget_type_should_return_error(self):
     """
     Test startscan(self, scanname, scantarget, modulelist, typelist, usecase)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     start_scan = sfwebui.startscan('example scan name', 'example scan target', 'example module list', None, None)
     self.assertIn('Invalid target type. Could not recognize it as a target SpiderFoot supports.', start_scan)
Ejemplo n.º 3
0
 def test_start_scan_should_start_a_scan(self):
     """
     Test startscan(self, scanname, scantarget, modulelist, typelist, usecase)
     """
     opts = self.default_options
     opts['__modules__'] = dict()
     sfwebui = SpiderFootWebUi(self.web_default_options, opts)
     start_scan = sfwebui.startscan('example scan name', 'spiderfoot.net', 'example module list', None, None)
     self.assertEqual(start_scan, start_scan)
     self.assertEqual('TBD', 'TBD')