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

Bug report: Adding "Register" breaks "From Base" with "Data is not a valid BigNumber" error #481

Closed
tobek opened this issue Jan 23, 2019 · 2 comments
Assignees
Labels

Comments

@tobek
Copy link

tobek commented Jan 23, 2019

Prepending the "From Base" operation with the "Register" operation produces an error "Data is not a valid BigNumber".

Here is an example: https://gchq.github.io/CyberChef/#recipe=Register('(.*)',true,false,false)From_Base(16)&input=MHgyMGE

image

Expected output should just be 522. Removing the Register operation does not fix the bug, unless you remove it and then refresh.

@Sh1n0g1
Copy link

Sh1n0g1 commented Jan 30, 2019

I got the same error using Filter. I guess that Regex doing something bad.
https://gchq.github.io/CyberChef/#recipe=Filter('Line%20feed','%5E%5C%5Cd*$',false)Multiply('Line%20feed')&input=MTAKMTIwCjMwCg

@n1474335 n1474335 added the bug label Feb 8, 2019
@n1474335 n1474335 self-assigned this Feb 8, 2019
@n1474335
Copy link
Member

n1474335 commented Feb 8, 2019

Thanks for pointing this out. It's a really strange one. It seems to only be a problem when you load in an operation from the Regex module. This module imports XRegExp which seems to break the BigNumber.js library in some way, causing BigNumbers to fail the instanceof BigNumber check.

I don't fully understand why this happens, but there is a handy helper function in the BigNumber library called isBigNumber which can be used instead and fixes things.

BRAVO68WEB pushed a commit to BRAVO68WEB/CyberChef that referenced this issue May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants