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
Obfuscating transpilade babel ES5 #53
Comments
Hi, show me your source code |
Hi, thank you for your reply.
ps: this is a NWJS app |
Not This file: require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=node Error |
can you upload it here? |
sure, here it is https://gist.github.com/I-NOZex/eae26df81fb642de5ec689b4e07ec0ee |
It's strange because this code obfuscating ok with https://javascriptobfuscator.herokuapp.com/ |
What version of |
exactly, i've already tested... |
I don't know. Right way is to use obfuscator after babel, it should accepts any valid es5/es6 code |
it's what i'm doing... |
Try to get source code after transpiling with babel and paste it here If it will obfuscating without errors - try to make issue here: |
Hi, the source code i’ve provided is already transpiled…
Enviado do meu telemóvel com Windows 10
De: Timofey Kachalov<mailto:notifications@github.com>
Enviado: 19 de maio de 2017 17:30
Para: javascript-obfuscator/javascript-obfuscator<mailto:javascript-obfuscator@noreply.github.com>
Cc: Tiago Marques<mailto:simplesmente_moi@hotmail.com>; Author<mailto:author@noreply.github.com>
Assunto: Re: [javascript-obfuscator/javascript-obfuscator] Obfuscating transpilade babel ES5 (#53)
Try to get source code after transpiling with babel and paste it here
https://javascriptobfuscator.herokuapp.com/
If it will obfuscate without errors - try to make issue here:
https://github.com/javascript-obfuscator/gulp-javascript-obfuscator/issues
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#53 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFiUlzStZbJwP0ddFRo4N_09yyvdokKcks5r7cNJgaJpZM4NguM0>.
|
You 100% sure that babel task was running before obfuscation task and not after? |
well yes, my obfuscate task has a depedency on transpile task
|
So it's very strange.
Error message pointed on strange symbol |
i've managed to make it work, i created an auxiliar folder to put the transpiled files, and the use those folder to obfuscate and copy to the final build path |
I can close issue then? |
Yes, sorry didn't replied earlier |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is it possible?
I'm using the gulp task, but all i get is this error:
C:\Users\<MyProjectPath>\src\node_modules\ttf2woff2\jssrc\ttf2woff2.js:1 (function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=node Error: Line 1: Unexpected token : at ErrorHandler.constructError (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:3396:16) at ErrorHandler.createError (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:3414:27) at Parser.unexpectedTokenError (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:542:39) at Parser.throwUnexpectedToken (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:552:21) at Parser.consumeSemicolon (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:845:23) at Parser.parseExpressionStatement (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:2080:15) at Parser.parseStatement (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:2495:35) at Parser.parseStatementListItem (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:1823:31) at Parser.parseBlock (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:1835:30) at Parser.parseStatement (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:2500:39) at Parser.parseStatementListItem (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:1823:31) at Parser.parseProgram (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:3061:29) at Object.parse (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\node_modules\esprima\dist\esprima.js:117:24) at JavaScriptObfuscatorInternal.obfuscate (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\dist\webpack:\src\JavaScriptObfuscatorInternal.ts:61:54) at Function.obfuscate (C:\Users\<MyProjectPath>\src\node_modules\javascript-obfuscator\dist\webpack:\src\JavaScriptObfuscator.ts:30:85) at DestroyableTransform._transform (C:\Users\<MyProjectPath>\src\node_modules\gulp-javascript-obfuscator\index.js:19:46)
The text was updated successfully, but these errors were encountered: