mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00

* is_valid_ip() is now implemented as a BIF instead of in base/utils/addrs * The IPv4 and IPv6 regular expressions provided by base/utils/addrs have been improved/corrected (previously they could possibly match some invalid IPv4 decimals, or various "zero compressed" IPv6 strings with too many hextets) * extract_ip_addresses() should give better results as a result of the above two points
53 lines
425 B
Text
53 lines
425 B
Text
============ test ipv4 regex (good strings)
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
============ bad ipv4 decimals
|
|
F
|
|
F
|
|
F
|
|
F
|
|
F
|
|
F
|
|
============ too many ipv4 decimals
|
|
F
|
|
F
|
|
============ typical looking ipv4
|
|
T
|
|
T
|
|
============ test ipv6 regex
|
|
T
|
|
T
|
|
T
|
|
T
|
|
T
|
|
F
|
|
F
|
|
F
|
|
F
|
|
F
|
|
T
|
|
T
|
|
============ test ipv6-ipv4 hybrid regexes
|
|
T
|
|
T
|
|
F
|
|
F
|
|
F
|
|
F
|
|
F
|
|
============ test extract_ip_addresses()
|
|
[1.1.1.1, 2.2.2.2, 3.3.3.3]
|
|
[1.1.1.1, 0:0:0:0:0:0:0:0, 3.3.3.3]
|
|
[6:1:2::3:4:5:6]
|