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

'$' issues when use javascriptobfuscator_unpacker #1610

Open
lovelyelfpop opened this issue Jan 3, 2019 · 4 comments
Open

'$' issues when use javascriptobfuscator_unpacker #1610

lovelyelfpop opened this issue Jan 3, 2019 · 4 comments

Comments

@lovelyelfpop
Copy link

lovelyelfpop commented Jan 3, 2019

Description

Orignal code:

var a = {
    a: '1',
    b: 2,
    currencySymbol: '$',
    c: 3
};

Input

code after obfuscated

var _0xbe98 = ["\x63\x75\x72\x72\x65\x6e\x63\x79\x53\x79\x6d\x62\x6f\x6c", "\x24"];
var a = {};
a['\x61'] = '\x31';
a['\x62'] = 0x2;
a[_0xbe98[0]] = _0xbe98[1];
a['\x63'] = 0x3;

Expected Output

Expecting result as below after unpack

var a = {};
a['\x61'] = '\x31';
a['\x62'] = 0x2;
a['currencySymbol'] = '$';
a['\x63'] = 0x3;

Actual Output

var a = {};
a['\x61'] = '\x31';
a['\x62'] = 0x2;
a['currencySymbol'] = '; //missing $'
a['\x63'] = 0x3;;
a['\x63'] = 0x3; // where is this line come from?

Steps to Reproduce

JavascriptObfuscator.unpack(code)

Reason

The symbol $ is treated as a capture when replace string using RegExp, standalone $ sign should be escaped for this scenario.

@bitwiseman bitwiseman added this to the v1.8.x milestone Jan 3, 2019
@bitwiseman bitwiseman modified the milestones: v1.9.x, v1.10.x Apr 29, 2019
@bitwiseman bitwiseman modified the milestones: v1.10.x, v1.10.xx Jan 14, 2020
@bitwiseman bitwiseman modified the milestones: v1.10.x, v1.11.x Apr 5, 2020
@bitwiseman bitwiseman modified the milestones: v1.11.x, v1.12.x Aug 13, 2020
@bitwiseman bitwiseman modified the milestones: v1.12.x, 1.13.x Aug 20, 2020
@bitwiseman bitwiseman modified the milestones: v1.13.1, v1.13.x Jan 8, 2021
@bitwiseman bitwiseman modified the milestones: v1.13.6, v1.13.x Jan 26, 2021
@bitwiseman bitwiseman modified the milestones: v1.13.7, v1.13.x Apr 13, 2021
@immaithil
Copy link

Can I take up this issue

@bitwiseman bitwiseman modified the milestones: v1.14.1, v1.14.x, v1.15.x Mar 28, 2022
@bitwiseman bitwiseman modified the milestones: v1.14.3, 1.14.x Apr 9, 2022
@Dhananjay-12
Copy link

Hi, @bitwiseman is this issue still open?

@bitwiseman
Copy link
Member

Yes, it is still open.

@N-45div
Copy link

N-45div commented Sep 23, 2023

is this issue still open ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants