mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-14 10:14:53 -04:00
adding more tests + fixing again
This commit is contained in:
parent
b13ac0d110
commit
d1a22e34b9
1 changed files with 13 additions and 2 deletions
|
@ -46,7 +46,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "PHP Deserialize array (JSON)",
|
||||
input: "a:2:{s:1:\"a\";i:10;i:0;a:1:{s:2:\"ab\";b:1;}}",
|
||||
expectedOutput: "{\"0\": {\"ab\": true},\"a\": 10}",
|
||||
expectedOutput: '{"0":{"ab":true},"a":10}',
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "PHP Deserialize",
|
||||
|
@ -57,7 +57,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "PHP Deserialize array (non-JSON)",
|
||||
input: "a:2:{s:1:\"a\";i:10;i:0;a:1:{s:2:\"ab\";b:1;}}",
|
||||
expectedOutput: "{0: {\"ab\": true},\"a\": 10}",
|
||||
expectedOutput: '{0:{"ab":true},"a":10}',
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "PHP Deserialize",
|
||||
|
@ -65,4 +65,15 @@ TestRegister.addTests([
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "PHP Deserialize array with object and reference",
|
||||
input: 'a:1:{s:6:"navbar";O:18:"APP\View\Menu\Item":3:{s:7:"<22>*<2A>name";s:16:"Secondary Navbar";s:11:"<22>*<2A>children";a:1:{s:9:"View Cart";O:18:"APP\View\Menu\Item":2:{s:7:"<22>*<2A>name";s:9:"View Cart";s:9:"<22>*<2A>parent";r:2;}}s:9:"<22>*<2A>parent";N;}}',
|
||||
expectedOutput: '{"navbar":{"__className":"APP\\View\\Menu\\Item","<22>*<2A>name":"Secondary Navbar","<22>*<2A>children":{"View Cart":{"__className":"APP\\View\\Menu\\Item","<22>*<2A>name":"View Cart","<22>*<2A>parent":"Secondary Navbar"}},"<22>*<2A>parent":null}}',
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "PHP Deserialize",
|
||||
args: [false],
|
||||
},
|
||||
],
|
||||
}
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue