1

I have part of code like this:

var test = new startClear.Cleaner('key', {floor: 100});

My point is, how to convert startClear function to something like this: 5azjfxa123. (or other) This same with floor ex. ooas and then use: azjfxa.Cleaner('key', {ooas21: 100});

Is any possible to do this? Thanks

Pac0
  • 21,465
  • 8
  • 65
  • 74
Jensej
  • 1,255
  • 6
  • 21
  • 33

1 Answers1

1

You can use a tool like https://javascriptobfuscator.herokuapp.com/ .

make sure to enable "rename globals" (as your function names can be global names, especially).

Example :

(with only "Rename globals" enabled, and "hexadecimal" for Identifier Names Generator option)

// Paste your JavaScript code here
function abcdefgh() {
  console.log("Hello World!");
}
abcdefgh();

has become :

function _0x3120f9() {
    console['log']('Hello\x20World!');
}
_0x3120f9();

It is an open source library / tool. See here for the code : https://github.com/javascript-obfuscator/javascript-obfuscator

Pac0
  • 21,465
  • 8
  • 65
  • 74
  • var c = b('0x0'); var d = new startClear.Cleaner[(b('0x1'))](c, { 'floor': 0.5 }); if (!d[b('0x2')]() && !d[b('0x3')](0x3840)) { d[b('0x4')](); } look it doesn't change startClear ;( – Jensej Jan 19 '18 at 11:16
  • But where is your `startClear` function defined ? The tool cannot rename it if it doesn't have the definition – Pac0 Jan 19 '18 at 11:17
  • @Jensej You need to give the definition of startClear. If the obfuscator would change names without changing also how they were defined, then the code wouldn't work anymore : this is valid `function myFunction() { console.log('hello)}; myFunction();` -> this is not valid anymore `function myFunction() {console.log('hello') }; sdvaeg3r51();` – Pac0 Jan 19 '18 at 12:59