mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 10:06:58 -04:00
Updated warning now that original issue has been resolved.
This commit is contained in:
parent
e9b182d33b
commit
288cd8f063
2 changed files with 23 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue