Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b7c354

Browse files
committed
gis-9379 fixes
1 parent1426c79 commit7b7c354

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎uncoder-core/app/translator/core/parser_cti.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def get_iocs_from_string(
5858
ifnotinclude_ioc_typesor"domain"ininclude_ioc_types:
5959
iocs.domain.extend(self._find_all_str_by_regex(string,DOMAIN_IOC_REGEXP_PATTERN))
6060
ifnotinclude_ioc_typesor"url"ininclude_ioc_types:
61-
iocs.url.extend(self._find_all_str_by_regex(string,URL_IOC_REGEXP_PATTERN))
61+
iocs.url.extend([url.rstrip(".")forurlinself._find_all_str_by_regex(string,URL_IOC_REGEXP_PATTERN)])
6262
ifnotinclude_ioc_typesor"hash"ininclude_ioc_types:
6363
ifnotinclude_hash_types:
6464
include_hash_types=list(hash_regexes.keys())

‎uncoder-core/app/translator/tools/const.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
fromtypingimportget_args,Literal
22

3-
IP_IOC_REGEXP_PATTERN=r"(?:^|[ \/\[(\"',;>|])((?:25[0-5]|2[0-4]\d|[0-1]?\d{1,2})(?:\.(?:25[0-5]|2[0-4]\d|[0-1]?\d{1,2})){3})(?=[\s)\]\"',;:\/?\n<|]|$)"# noqa: E501
3+
IP_IOC_REGEXP_PATTERN=r"(?:^|[ \/\[(\"',;>|])((?:25[0-5]|2[0-4]\d|[0-1]?\d{1,2})(?:\[?\(?\{?\.\]?\)?\}?(?:25[0-5]|2[0-4]\d|[0-1]?\d{1,2})){3})(?=[\s)\]\"',;:\/?\n<|]|$)"# noqa: E501
44
DOMAIN_IOC_REGEXP_PATTERN=r"(?:^|[\s\/\[\]@(\"',;{>|])(?:(?:http[s]?|ftp):\/\/?)?([^:\\\/\s({\[\]@\"'`,]+\.[a-zA-Z]+)(?:(?:(?:[/|:]\w+)*\/)(?:[\w\-.]+[^#?\s]+)?(?:[\w/\-&?=%.#]+(?:\(\))?)?)?(?=[\s)\]\"',;<|]|$)"# noqa: E501
5-
URL_IOC_REGEXP_PATTERN=r"(?:^|[\s\/\[\]@(\"',;{>|])((?:(?:http[s]?|ftp):\/\/?)+(?:[^:\\\/\s({\[\]@\"'`,]+\.[a-zA-Z0-9]+)(?:(?:(?:[/|:]\w+)*\/)(?:[\w\-.]+[^#?\s<']+)?(?:[\w/\-&?=%.#]+(?:\(\))?)?)?)(?=[\s)\]\"',;<|]|$)"# noqa: E501
5+
URL_IOC_REGEXP_PATTERN=r"(?:h[xX][xX]p[s]?|f[txX]p[s]?):\/\/[^\s,:;]+"# noqa: E501
66

77
IOCType=Literal["ip","domain","url","hash"]
88
HashType=Literal["md5","sha1","sha256","sha512"]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp