Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.7k
Open
Description
Expected Behavior
Current Behavior
The source map filename is wrong when I assigned a name.
Steps to Reproduce
Here are the steps to reproduce this issue:
Create
a.jsconsole.log('Hello World')
Run the following command:
javascript-obfuscator.\a.js-oa.min.js--source-map=true--source-map-file-name=a.min.js.map
The
a.min.jsis generated.functiona0_0x388e(){var_0x1d7b85=['250944uqaURh','1169253GDICiC','1101824uSWpIk','14EAccxX','249031YZzwdR','log','2906652QwanhJ','13940790qUNGBk','5nPBmvI','Hello\x20World','1963086IIXTWP','24wsUmaW'];a0_0x388e=function(){return_0x1d7b85;};returna0_0x388e();}vara0_0x29efc7=a0_0x3f6f;functiona0_0x3f6f(_0x5bc38f,_0x4dc37e){var_0x388ee9=a0_0x388e();returna0_0x3f6f=function(_0x3f6f29,_0xcefc93){_0x3f6f29=_0x3f6f29-0x102;var_0x287cd8=_0x388ee9[_0x3f6f29];return_0x287cd8;},a0_0x3f6f(_0x5bc38f,_0x4dc37e);}(function(_0x5182ff,_0x55ec5a){var_0x55a395=a0_0x3f6f,_0x5f4f9b=_0x5182ff();while(!![]){try{var_0x323741=parseInt(_0x55a395(0x106))/0x1+-parseInt(_0x55a395(0x105))/0x2*(parseInt(_0x55a395(0x102))/0x3)+-parseInt(_0x55a395(0x104))/0x4+-parseInt(_0x55a395(0x10a))/0x5*(-parseInt(_0x55a395(0x10c))/0x6)+-parseInt(_0x55a395(0x108))/0x7+-parseInt(_0x55a395(0x10d))/0x8*(parseInt(_0x55a395(0x103))/0x9)+parseInt(_0x55a395(0x109))/0xa;if(_0x323741===_0x55ec5a)break;else_0x5f4f9b['push'](_0x5f4f9b['shift']());}catch(_0x3ed595){_0x5f4f9b['push'](_0x5f4f9b['shift']());}}}(a0_0x388e,0x4a4b8),console[a0_0x29efc7(0x107)](a0_0x29efc7(0x10b)));//# sourceMappingURL=a.js.map
🔥 The issue is the
sourceMappingURLis wrong. The file name should bea.min.js.map. But it'sa.js.map.The
a.min.js.mapis generated.{"version":3,"sources":["sourceMap"],"names":["console"],"mappings":"4kCAAAA,OAAA,C,kBAAA,E,kBAAA,C","sourcesContent":["console.log('Hello World')"]}
Your Environment
- Obfuscator version used:
4.1.1_2024-06-15T17:30:18.063Z - Node version used:
v20.17.0
Stack trace
N/A
Minimal working example that will help to reproduce issue
console.log('Hello World')
Metadata
Metadata
Assignees
Labels
No labels