def test_Plugin_Calls_createAndAddHost(self): self.plugin.processReport(self.cd + '/nessus_xml') action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.ADDHOST) self.assertEqual(action[1].name, "12.233.108.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.ADDINTERFACE) self.assertEqual(action[2].name, "12.233.108.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.ADDVULNHOST) self.assertEqual(action[2].name, "Nessus Scan Information") test_common.skip(self, 4) action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.ADDSERVICEINT) self.assertEqual(action[3].ports, [443]) self.assertEqual(action[3].name, 'https?') self.assertEqual(action[3].protocol, 'tcp')
def test_Plugin_Calls_createAndAddHost(self): self.plugin.processReport(self.cd + '/nessus_xml') action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDHOST) self.assertEqual(action[1], "12.233.108.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDINTERFACE) self.assertEqual(action[2], "12.233.108.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDVULNHOST) self.assertEqual(action[2], "Nessus Scan Information") test_common.skip(self, 4) action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDSERVICEINT) self.assertEqual(action[5], ['443']) self.assertEqual(action[3], 'https?') self.assertEqual(action[4], 'tcp')
def test_Plugin_creates_adecuate_objects(self): self.plugin.processReport(self.cd + "/burp_xml") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDHOST) self.assertEqual(action[1], "200.20.20.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDINTERFACE) self.assertEqual(action[2], "200.20.20.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDSERVICEINT) self.assertEqual(action[3], "http") self.assertEqual(action[4], "tcp") self.assertEqual(action[5], ["80"]) self.assertEqual(action[6], "open") test_common.skip(self, 2) action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDVULNWEBSRV) self.assertEqual(action[3], "Cleartext submission of password")
def test_Plugin_creates_adecuate_objects(self): self.plugin.processReport(self.cd + '/burp_xml') action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDHOST) self.assertEqual(action[1], "200.20.20.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDINTERFACE) self.assertEqual(action[2], "200.20.20.201") action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDSERVICEINT) self.assertEqual(action[3], 'http') self.assertEqual(action[4], 'tcp') self.assertEqual(action[5], ['80']) self.assertEqual(action[6], 'open') test_common.skip(self, 2) action = self.plugin._pending_actions.get(block=True) self.assertEqual(action[0], modelactions.CADDVULNWEBSRV) self.assertEqual(action[3], 'Cleartext submission of password')