Exemplo n.º 1
0
 def test_setup_excluded_iocs(self):
     """ThreatIntel - Setup Excluded IOCs"""
     excluded_iocs = {
         'md5': {
             'feca1deadbeefcafebeadbeefcafebee': {
                 'comment': 'not malicious'
             }
         }
     }
     expected_result = {'md5': {'feca1deadbeefcafebeadbeefcafebee'}}
     result = ThreatIntel._setup_excluded_iocs(excluded_iocs)
     assert_equal(result, expected_result)
Exemplo n.º 2
0
 def test_setup_excluded_iocs_ip(self):
     """ThreatIntel - Setup Excluded IOCs, With IPs"""
     excluded_iocs = {
         'ip': {
             '10.0.0.0/8': {
                 'comment': 'RFC1918'
             }
         },
         'md5': {
             'feca1deadbeefcafebeadbeefcafebee': {
                 'comment': 'not malicious'
             }
         }
     }
     expected_result = {
         'ip': {IPNetwork('10.0.0.0/8')},
         'md5': {'feca1deadbeefcafebeadbeefcafebee'}
     }
     result = ThreatIntel._setup_excluded_iocs(excluded_iocs)
     assert_equal(result, expected_result)