Jscrambler’s protections are polymorphic by default. This means everytime you protect your application the resulting code will not be the same as the previous one even with the same input code. This is advantageous since the protected code is never similar to it’s previous version which makes reverse engineering harder. Polymorphism is ensured by applying transformations in a different order each time but also by taking advantage of random behaviors present in some transformations.
Polymorphism is an excellent tool in assuring you have a high degree of protection but it can also pose some downsides. For example, if you found a protection that suited your code nicely and that you were satisfied with, you cannot reproduce the exact same effect in other protections due to polymorphism. Also, if you have to debug your protected code, having distinct code everytime your protect hinders your debugging efforts.
To address these issues you can take advantage of the Randomization Seed. Using this feature ensures the result of your transformation is deterministic, that is, if you provide the same input and the same seed, the result will always be exactly the same.
Each protection made generates a different seed which can be consulted on Jscrambler’s Webapp
Consider following code
Protecting it using the
StringEncoding transformations leads to distinct results. This happens because the transformations can be applied in a different order and also because
StringEncoding can encode characters in different notations.
StringEncoding (unicode) followed by
StringEncoding (hexadecimal) followed by
NumberToString followed by
Every time the code is protected, a different result is obtained. In order to exactly reproduce any of the protections you must first retrieve the randomization seed.
On Jscrambler’s Webapp hover above the application you have protected and click on See Protection History. There you will find a list of the latest protections. Select the one you wish to reproduce and you will find the randomization seed at the top:
Now that you have the seed either add it to your protection configuration
or use it via the CLI
and this will guarantee the next protection will have an expected result.
You can use the seed even with a modified version of a file you’ve previously protected to reproduce most of the protection’s polymorphic behavior.
If you were to change the previous code to
and protect it using the seed (
SCsZphlB), you would get
If we compare the updated code to the previous version
We can see that only the
\x6f\x74\x68\x65\x72 characters have been added and that everything else remains the same.
If we refrain from using the seed, our updated may not be similar