Add new spamhaus analyzer

This commit is contained in:
Jason Ertel
2022-04-19 12:12:52 -04:00
parent 0cb73d8f6a
commit 4129cef9fb
10 changed files with 222 additions and 1 deletions
@@ -2,7 +2,7 @@
"name": "Urlhaus",
"version": "0.1",
"author": "Wes",
"description": "This analyzer queries URLHaus to see if a URL is consdered malicious.",
"description": "This analyzer queries URLHaus to see if a URL is considered malicious.",
"supportedTypes" : ["url"],
"baseUrl": "https://urlhaus-api.abuse.ch/v1/url/"
}
@@ -9,6 +9,7 @@ class TestUrlhausMethods(unittest.TestCase):
def test_main_missing_input(self):
with patch('sys.stdout', new=StringIO()) as mock_stdout:
sys.argv = ["cmd"]
urlhaus.main()
self.assertEqual(mock_stdout.getvalue(), "ERROR: Missing input JSON\n")