gchq / gchq/CyberChef

Feature request: output octal escape sequences from Escape_string

Open
#1,378 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 9h
Merged PRs (30d)
33

Description

Escape_string outputs hexadecimal escape sequences, eg. `\x13`. I'd like an option to output octal escape sequences, eg. `\023`.

Example recipe:

From_Base64('A-Za-z0-9+/=',true)
Escape_string('Special chars','Single',false,true,false)

Input:

MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE01EAhx4o0zPQrXTcYjgCt4MVFsT0Pwjzb1RwrM0lhWDlxAYPP6/gyMCXNkOn/7KFsjL7rwk78tHMpY8rXn8AYg==

Expected:

0Y0\023\006\007*\206H\316=\002\001\006\010*\206H\316=\003\001\007\003B\000\004\323Q\000\207\036(\3233\320\255t\334b8\002\267\203\025\026\304\364?\010\363oTp\254\315%\205`\345\304\006\017?\257\340\310\300\2276C\247\377\262\205\2622\373\257\t;\362\321\314\245\217+^\177\000b

What actually happens:

0Y0\x13\x06\x07*\x86H\xce=\x02\x01\x06\b*\x86H\xce=\x03\x01\x07\x03B\0\x04\xd3Q\0\x87\x1e(\xd33\xd0\xadt\xdcb8\x02\xb7\x83\x15\x16\xc4\xf4?\b\xf3oTp\xac\xcd%\x85`\xe5\xc4\x06\x0f?\xaf\xe0\xc8\xc0\x976C\xa7\xff\xb2\x85\xb22\xfb\xaf\t;\xf2\xd1\xcc\xa5\x8f+^\x7f\0b

Contributor guide

Open the contributing guide

Research direction

Start at the Escape_string operation entry point and compare its current hexadecimal output with the supplied recipe and expected octal output. Done means an option produces the requested octal escape sequences while existing hexadecimal behavior remains available; verify the recipe's output against the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.