File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 33
44import tldextract
55
6+
67def extract_iocs_from_string (input_string ):
78 """
89 Extracts various types of Indicators of Compromise (IOCs) from a string.
@@ -17,6 +18,7 @@ def extract_iocs_from_string(input_string):
1718 iocs .update (extract_ip_addresses (input_string ))
1819 return list (iocs )
1920
21+
2022def extract_domains_from_string (input_string ):
2123 """
2224 Extracts domain names from a string containing URLs.
@@ -68,4 +70,4 @@ def extract_ip_addresses(input_string):
6870 ip_addresses .update (ipv4_addresses )
6971 ip_addresses .update (ipv6_addresses )
7072
71- return list (ip_addresses )
73+ return list (ip_addresses )
Original file line number Diff line number Diff line change @@ -145,4 +145,4 @@ def _process_attributes(
145145 if attr_name_lower in xml_options ["metadata_tags" ]:
146146 self .event ["tag_data" ].append (
147147 {"tag" : attr_name , "content" : str (node .attrib )}
148- )
148+ )
Original file line number Diff line number Diff line change @@ -154,4 +154,4 @@ def test_scan_xml_with_file(mocker):
154154 )
155155
156156 TestCase .maxDiff = None
157- TestCase ().assertDictEqual (test_scan_event , scanner_event )
157+ TestCase ().assertDictEqual (test_scan_event , scanner_event )
You can’t perform that action at this time.
0 commit comments