
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
babel-plugin-array-reveal
Advanced tools
A babel plugin to deobfuscate array-based JavaScript obfuscation
The ArrayReveal Babel Plugin was developed to simplify and automate the process of deobfuscating low-level JavaScript obfuscations based on shuffled arrays and indexing functions. This type of obfuscation, which we will refer to as Array-Index Obfuscation, is commonly encountered in basic anti-bot scripts and simple website JavaScript code. Examples of this obfuscation structure include:
function YA() {
var A = ["obfuscatedValue1", "obfuscatedValue2", "..."];
return (YA = function () { return A; })();
}
function dB(index) {
var arr = YA();
return arr[index - 270];
}
console.log(dB(270)); // "obfuscatedValue1"
console.log("obfuscatedValue1");
This plugin was created to eliminate the need for manual deobfuscation or repetitive custom function writing, allowing you to focus on higher-level tasks.
While deobfuscating a large number of files, this pattern repeatedly appeared in low-level scripts, especially in basic anti-bot mechanisms or obfuscated web assets. By automating the process, this plugin saves significant time.
Note: For more advanced obfuscations, such as PerimeterX scripts with multiple interdependent array-based obfuscations (e.g., 10-15 instances), additional custom logic will be required to track associations and calls, as this plugin assumes a single array-obfuscation per script.
Install the plugin using npm:
npm install babel-plugin-array-reveal --save-dev
Add the plugin to your Babel configuration file (babel.config.js or .babelrc):
module.exports = {
plugins: ["babel-plugin-array-reveal"]
};
Run Babel to deobfuscate your script:
npx babel input.js --out-file output.js
You can also use the plugin programmatically:
const babel = require("@babel/core");
const arrayReveal = require("babel-plugin-array-reveal");
const code = `/* your obfuscated JavaScript code here */`;
const output = babel.transform(code, {
plugins: [arrayReveal]
});
console.log(output.code);
The plugin is designed for low-level obfuscations and assumes a single array-based obfuscation per script. Advanced scripts with multiple layers of obfuscation may require manual intervention or additional tooling.
If you prefer not to set up an environment, use the web app version of ArrayReveal to quickly deobfuscate your code. Simply paste your obfuscated code into the interface, and the app will process it using the same core logic.
Check it out on array-reveal.com
Made with ❤️ by @glizzykingdreko sponsord by TakionAPI
FAQs
A babel plugin to deobfuscate array-based JavaScript obfuscation
We found that babel-plugin-array-reveal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.