CyberChef
CyberChef copied to clipboard
Feature request: Embed within a JSON object (reverse JPath)
Is your feature request related to a problem? Please describe. I have a pipeline which is
- Extract a string from a JSON object with the
JPath
operation - Decode the string as Base64
- Inflate the binary data with ZLIB inflate
This recipe can be found here
But I'd like to do the reverse
- Deflate a string with ZLIB deflate
- Encode that binary data as Base64
- Embed that string within a JSON object
That last step is not possible right now
Describe the solution you'd like I would like a step which can take the previous step's output string, and embed it within a provided JSON object. For example, the step's input could be
{"data": $1}
and it would substitute the $1 for the step input
Describe alternatives you've considered
A workaround is to manually embed the string within the JSON parts {"data":"
and "}
via find and replace:
https://cyberchef.io/#recipe=Zlib_Deflate('Dynamic%20Huffman%20Coding')To_Base64('A-Za-z0-9%2B/%3D')Find_/Replace(%7B'option':'Regex','string':'%5E'%7D,'%7B%22data%22:%22',true,false,false,false)Find/_Replace(%7B'option':'Regex','string':'$'%7D,'%22%7D',true,false,true,false)&input=Q3liZXJDaGVm
Additional context