{"action":"created","issue":{"url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/issues/267","repository_url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator","labels_url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/issues/267/labels{/name}","comments_url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/issues/267/comments","events_url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/issues/267/events","html_url":"https://github.com/javascript-obfuscator/javascript-obfuscator/issues/267","id":326200806,"number":267,"title":"Variables not renaming","user":{"login":"krishnaraovs","id":25992303,"avatar_url":"https://avatars0.githubusercontent.com/u/25992303?v=4","gravatar_id":"","url":"https://api.github.com/users/krishnaraovs","html_url":"https://github.com/krishnaraovs","followers_url":"https://api.github.com/users/krishnaraovs/followers","following_url":"https://api.github.com/users/krishnaraovs/following{/other_user}","gists_url":"https://api.github.com/users/krishnaraovs/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnaraovs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnaraovs/subscriptions","organizations_url":"https://api.github.com/users/krishnaraovs/orgs","repos_url":"https://api.github.com/users/krishnaraovs/repos","events_url":"https://api.github.com/users/krishnaraovs/events{/privacy}","received_events_url":"https://api.github.com/users/krishnaraovs/received_events","type":"User","site_admin":false},"labels":[{"id":613589502,"url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/labels/need%20more%20info","name":"need more info","color":"d93f0b","default":false},{"id":373107585,"url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-24T16:34:31Z","updated_at":"2018-05-24T16:50:23Z","closed_at":null,"author_association":"NONE","body":"<!-- Love javascript-obfuscator? Please consider supporting our collective:\r\n👉  https://opencollective.com/javascript-obfuscator/donate -->\r\n\r\n<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n## Expected Behavior\r\ndownloaded & run package using npm but the output code has not renamed variable & function names. when the same code obfuscated from web (https://obfuscator.io/) all the variables & function names got obfuscated.\r\n\r\nUsed same options in both web and locally\r\n```\r\nvar JavaScriptObfuscator = require('javascript-obfuscator');\r\nvar fs = require('fs');\r\nvar iname = process.argv[2];\r\nvar oname = process.argv[3];\r\n\r\nvar data = fs.readFileSync(iname, 'utf8');\r\nvar obfuscationResult = JavaScriptObfuscator.obfuscate(\r\n    data,\r\n    {\r\n        compact: true,\r\n\t\tidentifierNamesGenerator: 'hexadecimal',\r\n\t\tidentifiersPrefix: '',\r\n\t\trenameGlobals: true,\r\n\t\tselfDefending: true,\r\n\t\tcontrolFlowFlattening: true,\r\n\t\tcontrolFlowFlatteningThreshold: 0.75,\r\n\t\tdeadCodeInjection: true,\r\n\t\tdeadCodeInjectionThreshold: 0.4,\r\n\t\tstringArray: true,\r\n\t\trotateStringArray: true,\r\n\t\tstringArrayEncoding: 'rc4',\r\n\t\tstringArrayThreshold: 0.8,\r\n\t\ttransformObjectKeys: true,\r\n\t\tunicodeEscapeSequence: true,\r\n\t\tdisableConsoleOutput: false,\r\n\t\tdebugProtection: false,\r\n\t\tdebugProtectionInterval: false,\r\n\t\tdomainLock: [],\r\n\t\treservedNames: [],\r\n\t\tsourceMap: false,\r\n\t\tsourceMapBaseUrl: '',\r\n\t\tsourceMapFileName: '',\r\n\t\tseed: 0,\r\n\t\ttarget: 'browser'\r\n    }\r\n);\r\n\r\nvar edata = obfuscationResult.getObfuscatedCode();\r\nfs.writeFileSync(oname, edata);\r\n```\r\n\r\n# **Output is as follows**\r\n## **Local:**\r\n\r\n```\r\nvar myTimer;\r\nvar tested = ![];\r\nmyTimer = setInterval(Timer1, 0x64);\r\n\r\nfunction keyup(_0x11c590) {\r\n    var _0x4f4c1e = {\r\n        '\\x43\\x7a\\x57': function _0x5014f0(_0x655b10, _0x5da16e) {\r\n            return _0x655b10 == _0x5da16e;\r\n        }\r\n    };\r\n    var _0x2a28c0 = _0x11c590['\\x77\\x68\\x69\\x63\\x68'] || _0x11c590[_0x6611('0x0', '\\x67\\x4f\\x24\\x39')];\r\n    if (_0x4f4c1e[_0x6611('0x1', '\\x77\\x67\\x4f\\x79')](_0x2a28c0, 0x31)) {\r\n        tested = !tested;\r\n    }\r\n}\r\n\r\nfunction Timer1() {\r\n    if (tested) {\r\n        console[_0x6611('0x2', '\\x6a\\x44\\x53\\x26')](_0x6611('0x3', '\\x5d\\x34\\x63\\x6a'));\r\n    }\r\n}\r\nwindow[_0x6611('0x4', '\\x49\\x53\\x59\\x50')]('\\x6b\\x65\\x79\\x75\\x70', keyup, ![]);\r\n```\r\n\r\n## **Web:**\r\n\r\n```\r\nvar _0x41bd02;\r\nvar _0x7b11e = ![];\r\n_0x41bd02 = setInterval(_0x3fea43, 0x64);\r\n\r\nfunction _0x4e8764(_0x5a5caf) {\r\n    var _0x247c08 = {};\r\n    _0x247c08[_0x23cb('0x0', '\\x32\\x4c\\x70\\x6e')] = function(_0x2d3b0e, _0x4cc975) {\r\n        return _0x2d3b0e == _0x4cc975;\r\n    };\r\n    var _0x477feb = _0x5a5caf[_0x23cb('0x1', '\\x31\\x37\\x4c\\x5d')] || _0x5a5caf[_0x23cb('0x2', '\\x66\\x4d\\x47\\x40')];\r\n    if (_0x247c08[_0x23cb('0x3', '\\x62\\x78\\x34\\x74')](_0x477feb, 0x31)) {\r\n        _0x7b11e = !_0x7b11e;\r\n    }\r\n}\r\n\r\nfunction _0x3fea43() {\r\n    if (_0x7b11e) {\r\n        console[_0x23cb('0x4', '\\x4f\\x32\\x53\\x6d')](_0x23cb('0x5', '\\x44\\x34\\x72\\x5b'));\r\n    }\r\n}\r\nwindow[_0x23cb('0x6', '\\x75\\x5b\\x21\\x61')](_0x23cb('0x7', '\\x77\\x69\\x55\\x71'), _0x4e8764, ![]);\r\n```\r\n\r\nwhats wrong with options why there is different in both local and web outputs"},"comment":{"url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/issues/comments/391784494","html_url":"https://github.com/javascript-obfuscator/javascript-obfuscator/issues/267#issuecomment-391784494","issue_url":"https://api.github.com/repos/javascript-obfuscator/javascript-obfuscator/issues/267","id":391784494,"user":{"login":"sanex3339","id":9210534,"avatar_url":"https://avatars1.githubusercontent.com/u/9210534?v=4","gravatar_id":"","url":"https://api.github.com/users/sanex3339","html_url":"https://github.com/sanex3339","followers_url":"https://api.github.com/users/sanex3339/followers","following_url":"https://api.github.com/users/sanex3339/following{/other_user}","gists_url":"https://api.github.com/users/sanex3339/gists{/gist_id}","starred_url":"https://api.github.com/users/sanex3339/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanex3339/subscriptions","organizations_url":"https://api.github.com/users/sanex3339/orgs","repos_url":"https://api.github.com/users/sanex3339/repos","events_url":"https://api.github.com/users/sanex3339/events{/privacy}","received_events_url":"https://api.github.com/users/sanex3339/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T16:50:23Z","updated_at":"2018-05-24T16:50:23Z","author_association":"COLLABORATOR","body":"Cannot reproduce. \r\n\r\nBe sure that you using `renameGlobals` option and your obfuscator version at least 0.11.0\r\nhttps://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/CHANGELOG.md#v0110"}}
{"actor":{"display_login":"sanex3339"}}