Giter VIP home page Giter VIP logo

Comments (9)

Krex38 avatar Krex38 commented on June 2, 2024 1

Oh here

C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\js-confuser\dist\transforms\controlFlowFlattening\switchCaseObfuscation.js:31
    return object.type == "SwitchStatement" && !object.cases.find(x => !(x.test.type == "Literal" && typeof x.test.value === "number" && Math.abs(x.test.value) < 100000));
                                                                                ^

TypeError: Cannot read properties of null (reading 'type')
    at C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\transforms\controlFlowFlattening\switchCaseObfuscation.js:31:81
    at Array.find (<anonymous>)
    at SwitchCaseObfuscation.match (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\transforms\controlFlowFlattening\switchCaseObfuscation.js:31:62)
    at SwitchCaseObfuscation.input (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\transforms\transform.js:189:14)
    at C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\transforms\transform.js:141:21
    at walk (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\traverse.js:59:18)
    at walk (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\traverse.js:76:15)
    at walk (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\traverse.js:65:13)
    at walk (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\traverse.js:76:15)
    at walk (C:\Users\onmaz\Downloads\Krex Priv Gr@bber\Priv\node_modules\←[4mjs-confuser←[24m\dist\traverse.js:76:15)

from js-confuser.

kitsune7 avatar kitsune7 commented on June 2, 2024 1

Using the low preset, but setting minify and compact to false seemed to fix the issue for me.

from js-confuser.

MichaelXF avatar MichaelXF commented on June 2, 2024

Hi, can you provide the entire error stack so I can understand better

from js-confuser.

Krex38 avatar Krex38 commented on June 2, 2024

Hi, can you provide the entire error stack so I can understand better

i'm only getting the same error

from js-confuser.

MichaelXF avatar MichaelXF commented on June 2, 2024

I mean please show the stack trace. It should appear like this: (example)

/Users/michael/Desktop/test/node_modules/js-confuser/dist/index.js:89
    throw new TypeError("code must be type string");
          ^

TypeError: code must be type string
    at JsConfuser (/Users/michael/Desktop/test/node_modules/js-confuser/dist/index.js:89:11)
    at Object.obfuscate (/Users/michael/Desktop/test/node_modules/js-confuser/dist/index.js:56:16)
    at Object.<anonymous> (/Users/michael/Desktop/test/index.js:3:12)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47

from js-confuser.

MichaelXF avatar MichaelXF commented on June 2, 2024

Thanks I will get to working on this soon. It seems to do with Switch statements with default cases.

from js-confuser.

Krex38 avatar Krex38 commented on June 2, 2024

Thanks I will get to working on this soon. It seems to do with Switch statements with default cases.

oh ok

from js-confuser.

Le0Developer avatar Le0Developer commented on June 2, 2024

Sounds like #45 which is closed. @Krex38 can you still reproduce the issue?
If so, can you try to get a minimal reproduction case?

from js-confuser.

kitsune7 avatar kitsune7 commented on June 2, 2024

I'm running into this same issue. I don't know if it helps, but I got a different error that the maximum call stack was exceeded when I tried to add verbose: true to the options. There are some decently big files that I'm working with. They're all chunked by webpack, but it always fails in the same spot. I've tried adjusting options to no avail. I'm on the latest version.

from js-confuser.

Related Issues (20)

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.