Coder Social home page Coder Social logo

javascript-obfuscator / javascript-obfuscator-ui Goto Github PK

View Code? Open in Web Editor NEW
231.0 15.0 128.0 2.99 MB

A web UI to the JavaScript Obfuscator node.js package.

Home Page: https://obfuscator.io

License: BSD 2-Clause "Simplified" License

JavaScript 80.35% HTML 12.66% Less 6.99%
javascript-obfuscator react semantic-ui redux express obfuscator

javascript-obfuscator-ui's Introduction

Web UI for JavaScript Obfuscator

This project is a web interface to the javascript obufscator project.

You can see it running here: obfuscator.io

Running it

Building the react project:

$ yarn # or npm install
$ npm run updatesemantic
$ npm run webpack:dev

Running the express server:

$ node server.js

The server runs on http://localhost:3000/

License

Copyright (C) 2016-2018 Tiago Serafim

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

javascript-obfuscator-ui's People

Contributors

andrews54757 avatar excigma avatar jchvz avatar sanex3339 avatar slig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javascript-obfuscator-ui's Issues

[Feature Request] Add Terser Minify

In my personal tests, Terser achieves even more compact code than other simplifiers I tried (such as UglifyJS3, Babel-Minify, etc.).
Would be nice to have, as the output quickly gets huge

obfuscator.io down

obfuscator.io website is down
Error 524 Ray ID: 474a4512fe3a5296 • 2018-11-04 21:47:29 UTC
A timeout occurred

Use 301 redirect

Hi. Can you use 301 redirect instead of 302? 301 redirect is required for correct google search indexing.

JavaScript setTimeout infinite loop without recursion

https://stackoverflow.com/questions/51953379/javascript-settimeout-infinite-loop-without-recursion/52100787

I cannot use Obfuscator.io(https://obfuscator.io/)
to uglify my JS script because it contains a setTimeout within a function that calls itself.
MCVE:

function repeater() {
    // DO SOME STUFF...
    setTimeout(repeater, 100);
}
repeater();

Custom obfuscation settings required to reproduce:

  • Identifier Names Generator: Mangled
  • Reserved Names: $ - jQuery

Obfuscator.io's error message:

Error: @PostConstruct error in class t: @PostConstruct error in class t: Maximum call stack size exceeded

I've read a few other Stack Overflow questions about this. I understand that calling setTimeout(func) inside func is not actually recursion.

But still, Obfuscator.io's algorithm can't handle a self-invoking setTimeout delay.

How do I make a repeatedly-executing function using setTimeout without calling it in the function itself? I don't want to use setInterval because I want the delay to begin each time after the function's code has run. setInterval ignores that.

Having trouble running the webui

I installed the most recent node.js 7.2 and webpack 2.1.0 beta 27 and after I install the dependencies, I get the following error. Any idea what I need to do to fix it? Thanks! It's really great of you to open source this!

Webpack is watching the files…

Hash: 30c04c184e14f933f9c3
Version: webpack 2.1.0-beta.27
Time: 460ms
Asset Size Chunks Chunk Names
bundle.js 5.29 kB 0 [emitted] main
+ 1 hidden modules

ERROR in ./App/index.js
Module build failed: ReferenceError: [BABEL] c:\wamp64\nodejs\javascript-obfuscator-ui-master\App\index.js: Unknown option: c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\react\react.js.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options.

A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:

Invalid:
{ presets: [{option: value}] }
Valid:
{ presets: [['presetName', {option: value}]] }

For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options. (While processing preset: "c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\react\react.js")
at Logger.error (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\logger.js:41:11)
at OptionManager.mergeOptions (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:221:20)
at c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:260:14
at c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:329:22
at Array.map (native)
at OptionManager.resolvePresets (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:270:20)
at OptionManager.mergePresets (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:259:10)
at OptionManager.mergeOptions (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:244:14)
at OptionManager.init (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:374:12)
at File.initOptions (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\index.js:216:65)
at new File (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\index.js:139:24)
at Pipeline.transform (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
at transpile (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-loader\lib\index.js:41:20)
at Object.module.exports (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-loader\lib\index.js:138:12)

Package subpath './dist' is not defined by "exports" in '/path/javascript-obfuscator-ui/node_modules/threads/package.json'

When putting npm start in ./

output:

> [email protected] start /home/user/javascript-obfuscator-ui
> node server.js

internal/modules/cjs/loader.js:438
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist' is not defined by "exports" in /home/user/javascript-obfuscator-ui/node_modules/threads/package.json
    at throwExportsNotFound (internal/modules/esm/resolve.js:290:9)
    at packageExportsResolve (internal/modules/esm/resolve.js:513:3)
    at resolveExports (internal/modules/cjs/loader.js:432:36)
    at Function.Module._findPath (internal/modules/cjs/loader.js:472:31)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:867:27)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/kim/javascript-obfuscator-ui/server.js:3:27)
    at Module._compile (internal/modules/cjs/loader.js:1063:30) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

expected:
The application should run.

How to fix this issue? The application runs after editing exports option of package.json like below at ./node_modules/threads/package.json :

from:

  "exports": {
    "./": {
      "require": "./dist/index.js",
      "default": "./index.mjs"
    },
    "./observable": {
      "require": "./observable.js",
      "default": "./observable.mjs"
    },
    "./register": {
      "require": "./register.js",
      "default": "./register.mjs"
    },
    "./worker": {
      "require": "./worker.js",
      "default": "./worker.mjs"
    }
  },

to :

  "exports": {
    "./dist": {
      "require": "./dist/index.js",
      "default": "./index.mjs"
    },
    "./observable": {
      "require": "./observable.js",
      "default": "./observable.mjs"
    },
    "./register": {
      "require": "./register.js",
      "default": "./register.mjs"
    },
    "./worker": {
      "require": "./worker.js",
      "default": "./worker.mjs"
    }
  },

Is other solution? Because the solution I tried seems not the best solution.

No Icon

This is just a real nitpicky thing but this site doesn't have an icon.

Calling functions across independently-obfuscated scripts?

I was curious if separate scripts obfuscated independently from one another can call functions from one another.

I just tested, and it seems to work fine -- functions between scripts successfully call one another, but I was curious if this is 100% reliable.
Are there circumstances where obfuscated code will make functions or global variables, etc. unrecognizable?

The following suggests it works fine:

index.html

<!doctype><html><head>
<script src="Script1.js"></script>
<script src="Script2.js"></script>
<script>
window.onload=Script1;
</script>
</head>
<body></body><html>

Script1.js (Obfuscated)

function Script1(){
	alert("Script1");
	Script2();
}

Script2.js (Obfuscated separately)

function Script2(){
	alert("Success");
}

Please See the image below

Would you like to say what's the problem here?
It's not going ahead :(
The last command was npm run webpack:dev
Screenshot_13

Make a button to save your current preset.

Is your feature request related to a problem? Please describe.
I'm annoyed when i accidently refresh the page, or when i click enter while adding variable names to the dictionary

Describe the solution you'd like
A button that will save your preset as a json data (everything) and a option to load the preset from json.

Describe alternatives you've considered
This is a only one i considered.

Additional context
None.

Typo

At this question:
So, it is like UglifyJS, Closure Compiler, etc?
...
, it can be easily be transformed into something readable using a JS Beautifier.

There is double be word.

REQ: Custom Identifier Names Generator

Would it be possible to use a custom ING ? (by providing a function ?)

Instead of short names, I'd like to provide confusing names :

  • characters that look alike l,i,1,I...
  • utf-8 character (mathematical ones for instance)
  • non western alphabet...

obfuscator.io is down

obfuscator.io website is down
Error 502 Ray ID: 4cd4862c9beac50e • 2019-04-26 00:44:07 UTC
Bad gateway

Move UI on new domain

Now i have obfuscator.io domain, so it will nice to add this domain as custom domain for herokuapp

Obfuscator Not Working good.

There are a lot of peoples that can deobfuscate my codes and get the code easy!
and i tried all obfuscations settings but they could debofuscate my codes and understand all thigns
and deobfuscate the variables
example if i obfuscate this code:
function test() {
console.log ("hi");
}
test();

then they can deobfuscate the code and get it like this:
function test() {
console.log ("hi");
}
test();

i ready don't know how they can deobfuscate my codes.

here is my settings.
if someone know how to fix that so please tell me 👍
image

Saving and reusage of obfuscation parameters

I'm currently evaluating https://obfuscator.io/, and I love the goals of this project.
I will need to obfuscate several different files, and most of them will have differences in some parameters (mainly reserved domains, reserved names and reserved strings).
So it would be very useful to have the possibility to save and resume all processing options. This could be done placing these options in separate files, or putting them at beginning of result and source files, or having two additional windows for input and processed parameters.
It would make this tool easily reusable with different files.
Thanks a lot.

Upload JavaScript Files

Hi.
I usually use your "Copy & Paste JavaScript Code" tab but today tried using "Upload JavaScript Files" but nothing happens when I drag and drop. Yesterday, perhaps coincidentally, my browser froze immediately after.

If relevant, I'm using Chrome.

fails on build startup in codesanbox.io

error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "12.13.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The error message you're encountering indicates a compatibility issue between the javascript-obfuscator module you're trying to use and your current Node.js version. The module requires a Node.js version of either "^12.22.0", "^14.17.0", or ">=16.0.0", but you have "12.13.1" installed.

Here's how you can resolve this:

Upgrade Node.js
You need to upgrade your Node.js to a compatible version. The easiest way to manage Node.js versions is by using nvm (Node Version Manager).

Install nvm (if you haven't already):

bash
Copy code
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

or

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
After installing, you may need to restart your terminal or source your profile (source ~/.bashrc or source ~/.zshrc, depending on your shell).

Install a compatible Node.js version:

bash
Copy code
nvm install 14.17.0 # for version 14.17.0

or

nvm install 16 # for the latest in the 16.x line
Choose the version that best suits your project requirements.

Switch to the installed Node.js version:

bash
Copy code
nvm use 14.17.0

or

nvm use 16
Verify the Node.js version:

bash
Copy code
node --version
Reinstall Dependencies
After upgrading Node.js, navigate to your project directory and reinstall your dependencies:

bash
Copy code
yarn install
This should resolve the compatibility issue, and yarn install should complete without the error you were encountering. If your project has specific version requirements, make sure the Node.js version you choose aligns with those requirements.

accept multiple values for parameters with plus icon inputs

It would be nice if the GUI supported entering multiple values at once in the inputs featuring the plus icon. It would facilitate entering many items. The GUI could show what separator is expected such as comma, semicolon, space, new line, etc.

Code obfuscated with this is blocked by McAfee

I have obfuscated the code with this tool, then McAfee onacess scan is showing that file as trojan virus ditected as JS/Nemucod.ya. Can you let me know why it is throwing this error is there any malicious code is included. How to verify it doesn't contain malicious code ?

https://obfuscator.io/ UI broken

It looks like the drop down for 'String Array Encoding' was changed and is now broken.

Here is a screen shot and error message.

ReferenceError: Validation failed. errors:
stringArrayEncoding errors:
- each value in stringArrayEncoding must be one of the following values: none,base64,rc4

2020-09-03_15-16-17

Getting error on javascript-obfuscator-ui

I'm getting error when trying to run the webpack:dev how to fix this? please help.

$ npm run webpack:dev

> [email protected] webpack:dev /data/data/com.termux/files/home/jsui
> webpack --mode development --config webpack.conf.js --watch --color --progress

/data/data/com.termux/files/home/jsui/node_modules/webpack-cli/bin/config-yargs.js:89
                                describe: optionsSchema.definitions.output.properties.path.description,
                                                                           ^

TypeError: Cannot read property 'properties' of undefined
    at module.exports (/data/data/com.termux/files/home/jsui/node_modules/webpack-cli/bin/config-yargs.js:89:48)
    at /data/data/com.termux/files/home/jsui/node_modules/webpack-cli/bin/webpack.js:60:27
    at Object.<anonymous> (/data/data/com.termux/files/home/jsui/node_modules/webpack-cli/bin/webpack.js:515:3)
    at Module._compile (internal/modules/cjs/loader.js:816:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
    at Module.load (internal/modules/cjs/loader.js:685:32)
    at Function.Module._load (internal/modules/cjs/loader.js:620:12)
    at Module.require (internal/modules/cjs/loader.js:723:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/data/data/com.termux/files/home/jsui/node_modules/webpack/bin/webpack.js:156:2)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] webpack:dev: `webpack --mode development --config webpack.conf.js --watch --color --progress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] webpack:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/data/com.termux/files/home/.npm/_logs/2019-04-29T04_26_54_520Z-debug.log

Error: stringArrayEncoding's elements must be unique

Trying to obfuscate some code, and I got an error I haven't encountered yet: stringArrayEncoding's elements must be unique

The code was retrieved from a postgreSQL database with utf-8 encoding stored in memory.

Machine being used: CentOS Linux release 7.9.2009 (Core)
require("javascript-obfuscator") returns [class s] { version: '2.10.1' }

The same JS Code obfuscated on a MacOS v11.1
where require("javascript-obfuscator") returns [class a] { version: '0.27.4' }
works just fine with no errors.

What might account for this?
What possible solutions?

Code and errors listed below:

JsObfOptions={
	compact: true,
	controlFlowFlattening: true,
	controlFlowFlatteningThreshold: 0.75,
	deadCodeInjection: true,
	deadCodeInjectionThreshold: 0.4,
	debugProtection: false,
	debugProtectionInterval: false,
	disableConsoleOutput: true,
	identifierNamesGenerator: 'hexadecimal',
	log: false,
	renameGlobals: false,
	rotateStringArray: true,
	selfDefending: true,
	shuffleStringArray: true,
	splitStrings: true,
	splitStringsChunkLength: 10,
	stringArray: true,
	stringArrayEncoding: 'base64',
	stringArrayThreshold: 0.75,
	transformObjectKeys: true,
	unicodeEscapeSequence: false
}

JsCodeObf=require("javascript-obfuscator").obfuscate(JsCodeClean, JsObfOptions);

//Results in the following error:
// ReferenceError: Validation failed. errors:
// 'stringArrayEncoding' errors:
//     - All stringArrayEncoding's elements must be unique
// ,    - stringArrayEncoding must be an array
// 
//     at new o (/home/node_modules/javascript-obfuscator/dist/webpack:/javascript-obfuscator/src/options/Options.ts:45:19)
//     at _createInstance (/home/node_modules/inversify/lib/resolution/instantiation.js:29:12)
//     at Object.resolveInstance (/home/node_modules/inversify/lib/resolution/instantiation.js:49:18)
//     at /home/node_modules/inversify/lib/resolution/resolver.js:73:42
//     at Array.map (<anonymous>)
//     at Object.resolveInstance (/home/node_modules/inversify/lib/resolution/instantiation.js:48:67)
//     at /home/node_modules/inversify/lib/resolution/resolver.js:73:42
//     at Array.map (<anonymous>)
//     at Object.resolveInstance (/home/node_modules/inversify/lib/resolution/instantiation.js:48:67)
//     at /home/node_modules/inversify/lib/resolution/resolver.js:73:42

Update to 0.15.0 version

Hi. Please, update UI to 0.15.0 version. No options for UI, but dropped node@4 and node@5 support.

Also, before 0.16.0 i want to up my own service on obfuscator.io domain. This service will based on your UI.

Update to 0.13.0 release

Hi. Please, update UI to 0.13.0 release.

  • Breaking change: mangle option was removed.
  • New option: identifierNamesGenerator allows to set identifier names generator (hexadecimal or mangled).

So, just dropdown with two values.

Error when code contains object spread syntax

I get the following error when trying to obfuscate Javascript code that uses the spread syntax to merge objects into one object using https://obfuscator.io/.

Error: Unknown node type ExperimentalSpreadProperty.

var newObj = {...obj1, ...obj2}
obj1 and obj2 only contain properties, no methods.

Array spread syntax does not cause any problems.

The project is not compiling correctly

After the installation of this bundle I can not get a textarea for putting my javascript.
I am using latest version of node and javascript-obfuscator 4. How should I solve the problem?

cannot upload files

hello,
why cannot upload files or multiple files in javascript-obfuscator-UI?

Examples page

Have some sort of examples pages showing the obfuscated code working.

For instance, find some HTML 5 web game here, host it with different options of the obfuscator and explain to the user: "Try to use the Developer Tool on this page" or "Here you can see source maps working".

the Obfuscate button doesn't work

This button doesn't work :(
i 2016-12-17 at 18 24 36

Browser/os:

  • Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14
  • Operating system OS X 10.12.1
  • Javascript enabled Yes
  • Cookies enabled Yes
  • Flash version Not installed
  • Java version Not installed
  • Websockets supported Yes

0.12.5 version

Please, update UI to 0.12.5 version with important fix.

Can't compile in windows.

I tried to compile in windows but it won't because it gives error when it try to use the command 'cp'.
So it will run only in Linux / MacOS machines?

obfuscator.io down

obfuscator.io website is down
Error 524 Ray ID: 49eecc634c55552e • 2019-01-26 00:19:25 UTC
A timeout occurred

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.