mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 08:46:19 -04:00
Add PHP Deserialization.
This commit is contained in:
parent
2cd4256ece
commit
4be7f89fd8
4 changed files with 145 additions and 1 deletions
|
@ -66,6 +66,7 @@ const Categories = [
|
|||
"Encode text",
|
||||
"Decode text",
|
||||
"Swap endianness",
|
||||
"PHP Deserialize",
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -35,6 +35,7 @@ import StrUtils from "../operations/StrUtils.js";
|
|||
import Tidy from "../operations/Tidy.js";
|
||||
import Unicode from "../operations/Unicode.js";
|
||||
import URL_ from "../operations/URL.js";
|
||||
import PhpSerialization from "../operations/PhpSerialization.js";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -3845,6 +3846,19 @@ const OperationConfig = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"PHP Deserialize": {
|
||||
module: "Default",
|
||||
description: "PHP Deserialize a given input.<br><br>This function does not support <code>object</code> tags.<br><br><u>Output valid JSON:</u> JSON doesn't support integers as keys, where as PHP serialization does. Enabling this will cast these integers to strings. This will also escape backslashes.",
|
||||
inputType: "string",
|
||||
outputType: "string",
|
||||
args: [
|
||||
{
|
||||
name: "Output valid JSON",
|
||||
type: "boolean",
|
||||
value: PhpSerialization.OUTPUT_VALID_JSON
|
||||
}
|
||||
]
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import StrUtils from "../../operations/StrUtils.js";
|
|||
import Tidy from "../../operations/Tidy.js";
|
||||
import Unicode from "../../operations/Unicode.js";
|
||||
import UUID from "../../operations/UUID.js";
|
||||
|
||||
import PhpSerialization from "../../operations/PhpSerialization";
|
||||
|
||||
/**
|
||||
* Default module.
|
||||
|
@ -155,6 +155,7 @@ OpModules.Default = {
|
|||
"Conditional Jump": FlowControl.runCondJump,
|
||||
"Return": FlowControl.runReturn,
|
||||
"Comment": FlowControl.runComment,
|
||||
"PHP Deserialize": PhpSerialization.PhpDeserialize,
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue