gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: ExtractIPAddresses function IPv6 matches incorrectly when multiple IPs in one-line

BlacAmDK opened this issue · comments

Describe the bug
The original IPv6 regex code in ExtractIPAddresses only worked fine when it matched the whole one-line text, if it has multiple IPs in one line, it will break sometimes.

To Reproduce

https://gchq.github.io/CyberChef/#recipe=Extract_IP_addresses(false,true,false,false,false,false)&input=MjAwMTowZGI4OjAwMDE6MDAwMDowMDAwOjBhYjk6QzBBODowMTAyIGNhbiBiZSBjb21wcmVzc2VkIGFzIGZvbGxvd3M6IDIwMDE6ZGI4OjE6OmFiOTpDMEE4OjEwMi4

Expected behaviour
When multiple IP in one-line, it can be matched correctly.

Screenshots
2024-02-18_09-20

Additional context
See #1661, fix this issue may need to revert this pull request.