def test_from_template(self): dt = DAVTemplate() options = dt.get_options() options['url'].set_value('http://moth/w3af/audit/dav/write-all/') dt.set_options(options) dt.store_in_kb() vuln = self.kb.get(*dt.get_kb_location())[0] vuln_to_exploit_id = vuln.get_id() self._exploit_vuln(vuln_to_exploit_id, 'dav')
def test_from_template(self): dt = DAVTemplate() options = dt.get_options() options["url"].set_value("http://moth/w3af/audit/dav/write-all/") dt.set_options(options) dt.store_in_kb() vuln = self.kb.get(*dt.get_kb_location())[0] vuln_to_exploit_id = vuln.get_id() self._exploit_vuln(vuln_to_exploit_id, "dav")
def test_store_in_kb(self): dt = DAVTemplate() dt.store_in_kb() stored_data = kb.get(*dt.get_kb_location()) self.assertEqual(len(stored_data), 1) stored_vuln = stored_data[0] created_vuln = dt.create_vuln() stored_vuln.set_id(created_vuln.get_id()) self.assertEqual(stored_vuln, created_vuln)