-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Improperly detected unpack deletes part of input #1350
Comments
That specific string at the start of the input will cause the deobfuscation to run, which produces an empty output. This does not reproduce on the website if "Detect packers and obfuscators?" is unchecked. This happens in python because there is no option to not try unpacking (see https://github.com/beautify-web/js-beautify/blob/master/python/jsbeautifier/javascript/beautifier.py#L196). The placement of that call also means it happens on the commandline and when included as library. 😭 |
See this code for the root of the problem: Code generated with the obfuscator usually has |
Fixes issue beautifier#1350 by properly identifying obfuscated text
Using http://jsbeautifier.org/, you can replicate the issue seen below. I noted a few things:
This also happens with the version downloaded from pip this morning on my local machine (Ubuntu 16.04 LTS)
Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
Actual Output
The code actually looked like this after beautification:
Steps to Reproduce
Use jsbeautifier.org, paste the code above and see for yourself
Environment
OS: n/a
The text was updated successfully, but these errors were encountered: