Open Le0Developer opened 7 months ago
Is your feature request related to a problem? Please describe.
Currently regexes are passed through unmodified.
Describe the solution you'd like
Regexes like /ID\d{6}/g should use some of the following obfuscation techniques:
/ID\d{6}/g
new RegExp
new RegExp("ID\\d{6}", "g")
\d
[0-9]
[0123456789]
[4753102869]
[91-80]
(?:[0-4]|[5-9])
\d{3}{2}
\d\d\d\d\d\d
No idea for useful static string transformations (like the ID part) yet.
ID
Describe alternatives you've considered
Manually replacing usages of /.../ with new RegExp("...") to enjoy string concealment, however the latter is far more verbose.
/.../
new RegExp("...")
Additional context
See also https://docs.jscrambler.com/code-integrity/documentation/transformations/regex-obfuscation
I think the converting regex literals to new RegExp is the best. Maybe in the future the extra obfuscations could be added
Is your feature request related to a problem? Please describe.
Currently regexes are passed through unmodified.
Describe the solution you'd like
Regexes like
/ID\d{6}/g
should use some of the following obfuscation techniques:new RegExp
syntax (likenew RegExp("ID\\d{6}", "g")
) - where this transformation happens before string concealing etc\d
with[0-9]
or[0123456789]
or[4753102869]
or[91-80]
or(?:[0-4]|[5-9])
etc\d{3}{2}
or\d\d\d\d\d\d
No idea for useful static string transformations (like the
ID
part) yet.Describe alternatives you've considered
Manually replacing usages of
/.../
withnew RegExp("...")
to enjoy string concealment, however the latter is far more verbose.Additional context
See also https://docs.jscrambler.com/code-integrity/documentation/transformations/regex-obfuscation