j4k0xb / webcrack

Deobfuscate obfuscator.io, unminify and unpack bundled javascript
https://webcrack.netlify.app
MIT License
647 stars 73 forks source link

Require.D #66

Open McIvanX opened 4 months ago

McIvanX commented 4 months ago

Sorry if i am missinformed and could find the solution without opening an issue. I am also new to webpacks and the programming language overall.

I get this output on one of the files using the tool:

require.d(exports, {
  JF: function () {
    return c;
  },
  UZ: function () {
    return u;
  },
  jK: function () {
    return a;
  }
});
const n = "^https?:";
const i = "^wss?:";
function o(t) {
  const e = t.match(new RegExp(/^\w+:/, "gi"));
  if (e && e.length) {
    return e[0];
  }
}
function s(t, e) {
  const r = o(t);
  return typeof r !== "undefined" && new RegExp(e).test(r);
}
function a(t) {
  return s(t, n);
}
function u(t) {
  return s(t, i);
}
function c(t) {
  return new RegExp("wss?://localhost(:d{2,5})?").test(t);
}

require.d isn't defined, this should be the func to export the functions to call them later on. Is it generated on purpose? What should i change in order for it to not give me an error?

McIvanX commented 4 months ago

UPDATE: i found https://deploy-preview-50--webcrack.netlify.app/, i am now trying to find the CLI version for this.

j4k0xb commented 4 months ago

yeah its currently work in progress you'll have to clone that branch and build it to use the CLI

McIvanX commented 4 months ago

oh, fast reply, thanks. Do you know whether unpacking multiple js files will be possible? What if i just merge all of them into a single one?

j4k0xb commented 4 months ago

it unpacks only the first bundle it finds in a file

McIvanX commented 4 months ago

sure, thank you so much

McIvanX commented 4 months ago

i get this issue:

npm ERR! npm ERR! code EUNSUPPORTEDPROTOCOL npm ERR! npm ERR! Unsupported URL Type "workspace:": workspace:*

McIvanX commented 4 months ago

fixed