Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new operation: Shuffle #1472

Merged
merged 1 commit into from
Nov 25, 2022
Merged

Add new operation: Shuffle #1472

merged 1 commit into from
Nov 25, 2022

Conversation

mikecat
Copy link
Contributor

@mikecat mikecat commented Nov 11, 2022

Adding new operation to shuffle entered bytes/characters (code points)/lines.

@n1474335 n1474335 merged commit 9a5d62c into gchq:master Nov 25, 2022
@n1474335
Copy link
Member

Thanks very much for contributing this operation, it's something I probably should have added a while ago.

I've modified it quite a bit with the intention of it operating in the same way as the Sort and Unique operations. It now accepts a delimiter option, rather than the "By" option that you used. I realise that this changes how it works fairly considerably, including loosing the ability to split by unicode character, however I think it is important that it matches the style of other similar operations. If you would like to add the ability to split by character again, but still using the new delimiter approach, I would be happy to accept a new PR.

@mikecat mikecat deleted the shuffle-operation branch November 25, 2022 22:52
@serkanyersen
Copy link

would it be possible to add an option to ignore the first line in the shuffle? it would be useful to shuffle table results like this

https://gchq.github.io/CyberChef/#recipe=Shuffle('Line%20feed')To_Table(',','%5C%5Cr%5C%5Cn',true,'ASCII')&input=cHJvZHVjdCxwcmljZSxzdG9jawphcHBsZSwkMiwyMApvcmFuZ2UsJDEsMTUKcGVhciwkMiw1

@mikecat
Copy link
Contributor Author

mikecat commented Dec 4, 2022

@serkanyersen Workaround: save and remove first line, shuffle, and put the saved line.
Register, 4 more - CyberChef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants