Skip to content

Extract, inflate, and beautify embedded code

Recover a Base64-wrapped raw-DEFLATE code fragment from surrounding text and format it for review.

Install in Serialize

What it can do

  • Isolate a long Base64 value
  • Recover raw-DEFLATE bytes
  • Format compact code for static review

How the recipe works

Regular expression

Extract the encoded token and discard surrounding prose.

From Base64

Decode the printable transport wrapper.

Raw Inflate

Inflate the headerless DEFLATE stream.

Generic Code Beautify

Add readable whitespace and indentation.

Demonstration

Sample input

telemetry payload: S87PKy5RKEotyC8qsa0uLkksKS22UsrPVtIpLcoptopWyigpKSi20tdPyU8u1kutSMwtyEnVK0ktLtFPVIqttQYA; end

Expected result

const report = {

When to use it

  • Alert triage
  • Packed configuration exercises
  • Inspecting compressed script fragments

Adapt it

Swap Raw Inflate for Gunzip or Zlib Inflate when the decoded header identifies a different compression wrapper.

Source and verification

Adapted from mattnotmax CyberChef recipes. The explanation and sample are written for Serialize, use synthetic or documentation-safe data, and are checked against the current operation catalogue. The workflow runs locally without an external API call.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close