|
1 | 1 | fromtypingimportget_args,Literal |
2 | 2 |
|
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 |
4 | 4 | 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 |
6 | 6 |
|
7 | 7 | IOCType=Literal["ip","domain","url","hash"] |
8 | 8 | HashType=Literal["md5","sha1","sha256","sha512"] |
|