Skip to content

Commit

Permalink
Merge pull request #58 from adrima01/takedown_test
Browse files Browse the repository at this point in the history
adding takedown info test
  • Loading branch information
Rafiot authored Apr 11, 2024
2 parents b48cfa4 + 96e7437 commit c48fcaf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testing_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,18 @@ def test_js_download(self) -> None:
with ZipFile(data) as z:
self.assertEqual(z.namelist()[0], 'TOS.pdf', z.namelist())

def test_takedown_information(self) -> None:
expected_takedown_info = [{'hostname': 'www.circl.lu', 'contacts': ['[email protected]'], 'ips': {'185.194.93.14': ['[email protected]'], '2a00:5980:93::14': ['[email protected]']}, 'asns': {'197869': ['[email protected]']}, 'all_emails': ['[email protected]', '[email protected]', '[email protected]'], 'securitytxt': {'contact': '[email protected]', 'encryption': 'https://openpgp.circl.lu/pks/lookup?op=get&search=0xeaadcffc22bd4cd5', 'policy': 'https://www.circl.lu/pub/responsible-vulnerability-disclosure/'}}]
expected_mails = ['[email protected]', '[email protected]', '[email protected]']
uuid = self.github_instance.submit(url="https://www.circl.lu/", quiet=True)
self._wait_capture_done(uuid)
#get all takedown information
takedown_info = self.github_instance.get_takedown_information(capture_uuid=uuid)
self.assertEqual(expected_takedown_info, takedown_info)
#get only the filtered emails
filtered_mails = self.github_instance.get_takedown_information(capture_uuid=uuid, filter_contacts=True)
self.assertEqual(expected_mails, filtered_mails)


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

0 comments on commit c48fcaf

Please sign in to comment.