Sitemap
JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

JavaScript Deobfuscation

4 min readOct 6, 2023

--

Press enter or click to view image in full size
Javascript Deobfuscation

Introduction:

Code deobfuscation is an important skill to learn if we want to be skilled in code analysis and reverse engineering. Obfuscation is a technique used to make a script more difficult to read by humans but allows it to function the same from a technical point of view, though performance may be slower.This article will explain what is code deobfuscation, the reasons for using it, and its potential advantages and disadvantages.

Deobfuscated code:

This is usually achieved automatically by using an obfuscation tool, which takes code as input, and attempts to re-write the code in a way that is much more difficult to read, depending on its design

For example consider the following two snippets of code and their output

Snippet 1:

console.log("Hello by Dhanush")

Output of Snippet 1:

Hello by Dhanush

Snippet 2:

eval(
(function (p, a, c, k, e, d) {
e = function (c) {
return c;
};
if (!"".replace(/^/, String)) {
while (c--) {
d[c] = k[c] || c;
}
k = [
function (e) {
return d[e];
},
];
e = function () {
return "\\w+";
};
c = 1;
}
while (c--) {…

--

--

CISO 🛡️ Cybersecurity Enthusiast. I build, break and hack systems while exploring the art of problem-solving.

See more from me

JavaScript in Plain English
JavaScript in Plain English

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.