-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added JS unpacking #86
Conversation
@DatL4g thanks for your contribution. This may be helpful for someone. Could you please kindly add a unit test similar to |
@itboy87 Sorry but I don't quite understand your Testing structure and requested addition. I've added some DataNodeTest cases to detect packed scripts and resolve them. Can you either elaborate a bit more what kind of test you want or add it yourself? |
@DatL4g Never mind i will send you test code for it but can you please check my comments for some improvements |
@itboy87 Do you have anything to review, or which comments do you mean? Comparing the packed and unpacked result is not really possible as it scales with the data size.
|
@DatL4g sorry i forgot to submit them now you can see them |
@DatL4g please also add this unit test:
|
@itboy87 Thanks for the hints! Added the changes |
Thanks. |
@DatL4g Do you know how to create a JavaScript packer in Kotlin? I’m thinking of adding a JS packer and unpacker as a utility in the library |
@itboy87 Sorry I don't. This unpacker implementation is based on this PHP variant. Here is a equivalent for packing https://github.com/tholu/php-packer |
Okay thanks |
dean.edwards.name/packer/ is a pretty commonly used Javascript tool to obfuscate code.
This can get pretty frustating when working with script data (since it even messes with strings unlike other obfuscator), so I added a method to unpack that code