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

Can't run javascript-obfuscator CLI #17

Closed
kahuna76 opened this issue Oct 4, 2016 · 6 comments
Closed

Can't run javascript-obfuscator CLI #17

kahuna76 opened this issue Oct 4, 2016 · 6 comments
Labels

Comments

@kahuna76
Copy link

kahuna76 commented Oct 4, 2016

I tried on both my mac and a debian VM and both get below error

node --version
v0.12.16
npm --version
2.15.1

javascript-obfuscator test.js output.js

/usr/local/lib/node_modules/javascript-obfuscator/node_modules/class-validator/container.ts:26
let instance = this.instances.find(instance => instance.type === someClass);
^
TypeError: Object has no method 'find'
at class_1.get (/usr/local/lib/node_modules/javascript-obfuscator/node_modules/class-validator/container.ts:26:39)
at Object.getFromContainer (/usr/local/lib/node_modules/javascript-obfuscator/node_modules/class-validator/container.ts:65:29)
at /usr/local/lib/node_modules/javascript-obfuscator/node_modules/class-validator/decorator/decorator/decorators.ts:210:9
at decorate (/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:2749:60)
at Object.module.exports.i (/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:2776:1)
at __webpack_require
(/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:47:30)
at Object.module.exports.i (/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:768:17)
at webpack_require (/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:47:30)
at Object.module.exports.i (/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:1244:38)
at webpack_require (/usr/local/lib/node_modules/javascript-obfuscator/dist/index.js:47:30)

npm list --global
/usr/lib
├─┬ javascript-obfuscator@0.7.2
│ ├─┬ babel-polyfill@6.16.0
│ │ ├── babel-runtime@6.11.6
│ │ ├── core-js@2.4.1
│ │ └── regenerator-runtime@0.9.5
│ ├── chance@1.0.4
│ ├─┬ class-validator@0.6.1
│ │ └── validator@5.7.0
│ ├─┬ commander@2.9.0
│ │ └── graceful-readlink@1.0.1
│ ├─┬ escodegen@1.8.1
│ │ ├── esprima@2.7.3
│ │ ├── estraverse@1.9.3
│ │ ├── esutils@2.0.2
│ │ ├─┬ optionator@0.8.2
│ │ │ ├── deep-is@0.1.3
│ │ │ ├── fast-levenshtein@2.0.5
│ │ │ ├── levn@0.3.0
│ │ │ ├── prelude-ls@1.1.2
│ │ │ ├── type-check@0.3.2
│ │ │ └── wordwrap@1.0.0
│ │ └─┬ source-map@0.2.0
│ │ └── amdefine@1.0.0
│ ├── esprima@3.0.0
│ ├── estraverse@4.2.0
│ ├── format-unicorn@1.1.0
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ └─┬ source-map-support@0.4.3
│ └── source-map@0.5.6
├─┬ npm@2.15.1
│ ├── abbrev@1.0.7
│ ├── ansi@0.3.1
│ ├── ansi-regex@2.0.0
│ ├── ansicolors@0.3.2
│ ├── ansistyles@0.1.3
│ ├── archy@1.0.0
│ ├── async-some@1.0.2
│ ├── block-stream@0.0.8
│ ├── char-spinner@1.0.1
│ ├── chmodr@1.0.2
│ ├── chownr@1.0.1
│ ├── cmd-shim@2.0.2
│ ├─┬ columnify@1.5.4
│ │ └─┬ wcwidth@1.0.0
│ │ └─┬ defaults@1.0.3
│ │ └── clone@1.0.2
│ ├─┬ config-chain@1.1.10
│ │ └── proto-list@1.2.4
│ ├─┬ dezalgo@1.0.3
│ │ └── asap@2.0.3
│ ├── editor@1.0.0
│ ├── fs-vacuum@1.2.7
│ ├─┬ fs-write-stream-atomic@1.0.8
│ │ └── iferr@0.1.5
│ ├── fstream@1.0.8
│ ├─┬ fstream-npm@1.0.7
│ │ └── fstream-ignore@1.0.3
│ ├── github-url-from-git@1.4.0
│ ├── github-url-from-username-repo@1.0.2
│ ├─┬ glob@7.0.3
│ │ └── path-is-absolute@1.0.0
│ ├── graceful-fs@4.1.3
│ ├── hosted-git-info@2.1.4
│ ├── imurmurhash@0.1.4
│ ├── inflight@1.0.4
│ ├── inherits@2.0.1
│ ├── ini@1.3.4
│ ├─┬ init-package-json@1.9.3
│ │ ├─┬ glob@6.0.4
│ │ │ └── path-is-absolute@1.0.0
│ │ └── promzard@0.3.0
│ ├── lockfile@1.0.1
│ ├─┬ lru-cache@3.2.0
│ │ └── pseudomap@1.0.1
│ ├─┬ minimatch@3.0.0
│ │ └─┬ brace-expansion@1.1.1
│ │ ├── balanced-match@0.2.1
│ │ └── concat-map@0.0.1
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ ├─┬ node-gyp@3.3.1
│ │ ├─┬ glob@4.5.3
│ │ │ └─┬ minimatch@2.0.10
│ │ │ └─┬ brace-expansion@1.1.3
│ │ │ ├── balanced-match@0.3.0
│ │ │ └── concat-map@0.0.1
│ │ ├─┬ minimatch@1.0.0
│ │ │ ├── lru-cache@2.7.3
│ │ │ └── sigmund@1.0.1
│ │ └─┬ path-array@1.0.1
│ │ └─┬ array-index@1.0.0
│ │ ├─┬ debug@2.2.0
│ │ │ └── ms@0.7.1
│ │ └─┬ es6-symbol@3.0.2
│ │ ├── d@0.1.1
│ │ └─┬ es5-ext@0.10.11
│ │ └── es6-iterator@2.0.0
│ ├── nopt@3.0.6
│ ├── normalize-git-url@3.0.1
│ ├─┬ normalize-package-data@2.3.5
│ │ └─┬ is-builtin-module@1.0.0
│ │ └── builtin-modules@1.1.0
│ ├── npm-cache-filename@1.0.2
│ ├── npm-install-checks@1.0.7
│ ├── npm-package-arg@4.1.0
│ ├─┬ npm-registry-client@7.1.0
│ │ ├─┬ concat-stream@1.5.1
│ │ │ ├─┬ readable-stream@2.0.5
│ │ │ │ ├── core-util-is@1.0.2
│ │ │ │ ├── isarray@0.0.1
│ │ │ │ ├── process-nextick-args@1.0.6
│ │ │ │ ├── string_decoder@0.10.31
│ │ │ │ └── util-deprecate@1.0.2
│ │ │ └── typedarray@0.0.6
│ │ └── retry@0.8.0
│ ├── npm-user-validate@0.1.2
│ ├─┬ npmlog@2.0.2
│ │ ├─┬ are-we-there-yet@1.0.6
│ │ │ └── delegates@1.0.0
│ │ └─┬ gauge@1.2.5
│ │ ├── has-unicode@2.0.0
│ │ ├── lodash._basetostring@3.0.1
│ │ ├── lodash._createpadding@3.6.1
│ │ ├── lodash.pad@3.2.2
│ │ ├── lodash.padleft@3.1.1
│ │ ├── lodash.padright@3.1.1
│ │ └─┬ lodash.repeat@3.2.0
│ │ └── lodash._root@3.0.1
│ ├── once@1.3.3
│ ├── opener@1.4.1
│ ├─┬ osenv@0.1.3
│ │ ├── os-homedir@1.0.0
│ │ └── os-tmpdir@1.0.1
│ ├── path-is-inside@1.0.1
│ ├─┬ read@1.0.7
│ │ └── mute-stream@0.0.5
│ ├─┬ read-installed@4.0.3
│ │ ├── debuglog@1.0.1
│ │ ├── readdir-scoped-modules@1.0.2
│ │ └── util-extend@1.0.1
│ ├─┬ read-package-json@2.0.3
│ │ ├─┬ glob@6.0.4
│ │ │ └── path-is-absolute@1.0.0
│ │ └─┬ json-parse-helpfulerror@1.0.3
│ │ └── jju@1.2.1
│ ├─┬ readable-stream@1.1.13
│ │ ├── core-util-is@1.0.1
│ │ ├── isarray@0.0.1
│ │ └── string_decoder@0.10.31
│ ├── realize-package-specifier@3.0.1
│ ├─┬ request@2.69.0
│ │ ├── aws-sign2@0.6.0
│ │ ├─┬ aws4@1.2.1
│ │ │ └── lru-cache@2.7.3
│ │ ├─┬ bl@1.0.2
│ │ │ └─┬ readable-stream@2.0.5
│ │ │ ├── core-util-is@1.0.2
│ │ │ ├── isarray@0.0.1
│ │ │ ├── process-nextick-args@1.0.6
│ │ │ ├── string_decoder@0.10.31
│ │ │ └── util-deprecate@1.0.2
│ │ ├── caseless@0.11.0
│ │ ├─┬ combined-stream@1.0.5
│ │ │ └── delayed-stream@1.0.0
│ │ ├── extend@3.0.0
│ │ ├── forever-agent@0.6.1
│ │ ├─┬ form-data@1.0.0-rc3
│ │ │ └── async@1.5.2
│ │ ├─┬ har-validator@2.0.6
│ │ │ ├─┬ chalk@1.1.1
│ │ │ │ ├── ansi-styles@2.1.0
│ │ │ │ ├── escape-string-regexp@1.0.4
│ │ │ │ ├── has-ansi@2.0.0
│ │ │ │ └── supports-color@2.0.0
│ │ │ ├─┬ commander@2.9.0
│ │ │ │ └── graceful-readlink@1.0.1
│ │ │ ├─┬ is-my-json-valid@2.12.4
│ │ │ │ ├── generate-function@2.0.0
│ │ │ │ ├─┬ generate-object-property@1.2.0
│ │ │ │ │ └── is-property@1.0.2
│ │ │ │ ├── jsonpointer@2.0.0
│ │ │ │ └── xtend@4.0.1
│ │ │ └─┬ pinkie-promise@2.0.0
│ │ │ └── pinkie@2.0.4
│ │ ├─┬ hawk@3.1.3
│ │ │ ├── boom@2.10.1
│ │ │ ├── cryptiles@2.0.5
│ │ │ ├── hoek@2.16.3
│ │ │ └── sntp@1.0.9
│ │ ├─┬ http-signature@1.1.1
│ │ │ ├── assert-plus@0.2.0
│ │ │ ├─┬ jsprim@1.2.2
│ │ │ │ ├── extsprintf@1.0.2
│ │ │ │ ├── json-schema@0.2.2
│ │ │ │ └── verror@1.3.6
│ │ │ └─┬ sshpk@1.7.3
│ │ │ ├── asn1@0.2.3
│ │ │ ├── dashdash@1.12.2
│ │ │ ├── ecc-jsbn@0.1.1
│ │ │ ├── jodid25519@1.0.2
│ │ │ ├── jsbn@0.1.0
│ │ │ └── tweetnacl@0.13.3
│ │ ├── is-typedarray@1.0.0
│ │ ├── isstream@0.1.2
│ │ ├── json-stringify-safe@5.0.1
│ │ ├─┬ mime-types@2.1.9
│ │ │ └── mime-db@1.21.0
│ │ ├── node-uuid@1.4.7
│ │ ├── oauth-sign@0.8.1
│ │ ├── qs@6.0.2
│ │ ├── stringstream@0.0.5
│ │ ├── tough-cookie@2.2.1
│ │ └── tunnel-agent@0.4.2
│ ├── retry@0.9.0
│ ├─┬ rimraf@2.5.2
│ │ └─┬ glob@7.0.0
│ │ └── path-is-absolute@1.0.0
│ ├── semver@5.1.0
│ ├─┬ sha@2.0.1
│ │ └─┬ readable-stream@2.0.2
│ │ ├── core-util-is@1.0.1
│ │ ├── isarray@0.0.1
│ │ ├── process-nextick-args@1.0.3
│ │ ├── string_decoder@0.10.31
│ │ └── util-deprecate@1.0.1
│ ├── slide@1.1.6
│ ├── sorted-object@1.0.0
│ ├── spdx-license-ids@1.2.0
│ ├── strip-ansi@3.0.1
│ ├── tar@2.2.1
│ ├── text-table@0.2.0
│ ├── uid-number@0.0.6
│ ├── umask@1.1.0
│ ├─┬ validate-npm-package-license@3.0.1
│ │ ├── spdx-correct@1.0.2
│ │ └─┬ spdx-expression-parse@1.0.2
│ │ └── spdx-exceptions@1.0.4
│ ├─┬ validate-npm-package-name@2.2.2
│ │ └── builtins@0.0.7
│ ├─┬ which@1.2.4
│ │ ├─┬ is-absolute@0.1.7
│ │ │ └── is-relative@0.1.3
│ │ └── isexe@1.1.1
│ ├── wrappy@1.0.1
│ └── write-file-atomic@1.1.4
└─┬ webpack-obfuscator@0.7.2
├─┬ javascript-obfuscator@0.7.2
│ ├─┬ babel-polyfill@6.16.0
│ │ ├── babel-runtime@6.11.6
│ │ ├── core-js@2.4.1
│ │ └── regenerator-runtime@0.9.5
│ ├── chance@1.0.4
│ ├─┬ class-validator@0.6.1
│ │ └── validator@5.7.0
│ ├─┬ commander@2.9.0
│ │ └── graceful-readlink@1.0.1
│ ├─┬ escodegen@1.8.1
│ │ ├── esprima@2.7.3
│ │ ├── estraverse@1.9.3
│ │ ├── esutils@2.0.2
│ │ ├─┬ optionator@0.8.2
│ │ │ ├── deep-is@0.1.3
│ │ │ ├── fast-levenshtein@2.0.5
│ │ │ ├── levn@0.3.0
│ │ │ ├── prelude-ls@1.1.2
│ │ │ ├── type-check@0.3.2
│ │ │ └── wordwrap@1.0.0
│ │ └─┬ source-map@0.2.0
│ │ └── amdefine@1.0.0
│ ├── esprima@3.0.0
│ ├── estraverse@4.2.0
│ ├── format-unicorn@1.1.0
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ └─┬ source-map-support@0.4.3
│ └── source-map@0.5.6
├─┬ multi-stage-sourcemap@0.2.1
│ └─┬ source-map@0.1.43
│ └── amdefine@1.0.0
└─┬ multimatch@2.1.0
├── array-differ@1.0.0
├─┬ array-union@1.0.2
│ └── array-uniq@1.0.3
├── arrify@1.0.1
└─┬ minimatch@3.0.3
└─┬ brace-expansion@1.1.6
├── balanced-match@0.4.2
└── concat-map@0.0.1

@sanex3339 sanex3339 added the bug label Oct 5, 2016
@sanex3339
Copy link
Member

I found error, fix will be out in 10 min.
But your command is wrong. Right command is:

javascript-obfuscator test.js --output output.js

@sanex3339
Copy link
Member

Live in javascript-obfuscator@0.7.3
4811926

@kahuna76
Copy link
Author

kahuna76 commented Oct 5, 2016

Wow nice n quick ! Thanks man

On 5 Oct 2016, at 4:35 PM, Timofey Kachalov notifications@github.com wrote:

Live in javascript-obfuscator@0.7.3
4811926 4811926

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #17 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AG3kVJv1LbdZrPM8uCWNZuPkOf27rbxDks5qwzcqgaJpZM4KOPSs.

@sanex3339
Copy link
Member

Pleasy try and say - after fix don't have error?

@kahuna76
Copy link
Author

kahuna76 commented Oct 5, 2016

Nope all fixed - thanks !

On 5 Oct 2016, at 4:40 PM, Timofey Kachalov notifications@github.com wrote:

Pleasy try and say - after fix don't have error?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #17 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AG3kVM11d-Yxn0hgQU6VO2_xO-szGKDfks5qwzg3gaJpZM4KOPSs.

@sanex3339
Copy link
Member

Nice, thank you!

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

No branches or pull requests

2 participants