mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
Updated warning now that original issue has been resolved.
This commit is contained in:
@@ -21,7 +21,7 @@ class ExtractIPAddresses extends Operation {
|
||||
|
||||
this.name = "Extract IP addresses";
|
||||
this.module = "Regex";
|
||||
this.description = "Extracts all IPv4 and IPv6 addresses.<br><br>Warning: Given a string <code>710.65.0.456</code>, this will match <code>10.65.0.45</code> so always check the original input!";
|
||||
this.description = "Extracts all IPv4 and IPv6 addresses.<br><br>Warning: Given a string <code>1.2.3.4.5.6.7.8</code>, this will match <code>1.2.3.4 and 5.6.7.8</code> so always check the original input!";
|
||||
this.inputType = "string";
|
||||
this.outputType = "string";
|
||||
this.args = [
|
||||
|
||||
@@ -85,6 +85,28 @@ TestRegister.addTests([
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "ExtractIPAddress silly example",
|
||||
input: "710.65.0.456",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Extract IP addresses",
|
||||
"args": [true, true, false, false, false, false]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "ExtractIPAddress longer dotted decimal",
|
||||
input: "1.2.3.4.5.6.7.8",
|
||||
expectedOutput: "1.2.3.4\n5.6.7.8",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Extract IP addresses",
|
||||
"args": [true, true, false, false, false, false]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "ExtractIPAddress octal valid",
|
||||
input: "01.01.01.01 0123.0123.0123.0123 0377.0377.0377.0377",
|
||||
|
||||
Reference in New Issue
Block a user