gchq / gchq/CyberChef

Bug report: Substitute producing invalid results with punctuation

Open
#2,009 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
35.8k
Forks
4.1k
Avg merge
2d 26m
Merged PRs (30d)
33

Description

**Describe the bug**
When using substitution, cyberchef is unable to produce the following decrypted ciphertext.

`.-_` should become, `_.-` but instead becomes `_-_` and warns that the ciphertext and plaintext are different.

**To Reproduce**
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

https://gchq.github.io/CyberChef/#recipe=Substitute('.-_','_.-',true)&input=Li1f

**Expected behaviour**

I expect the output `_.-`

**Screenshots**

![Image](https://github.com/user-attachments/assets/a2b38f0a-1c43-4e42-9b47-a3a9cddd17c8)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.