Click here to Skip to main content
Click here to Skip to main content

Tagged as

Decoder for Dean Edwards' JavaScript Packer

, 4 Mar 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
This short article shows how to decrypt and beautify code encoded with Dean Edwards' Javascript Packer.

Introduction

If you are a website admin, you might want to know if the JavaScript provided to you is malicious. This code will decrypt the JavaScript code encrypted with Dean Edwards' Javascript Packer. JavaScript encoded with Dean Edwards' JavaScript Packer begins with this line:

eval(function(p,a,c,k,e,d){e=function(c){

Using the Code

This code is a simple HTML page with few lines of JavaScript.

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Decoder for Dean Edwards' Javascript Packer</title>
<script language="javascript" type="text/javascript">
function Decode() {
eval("var value=String" + txtInput.value.slice(4));
txtOutput.value = value;
}
</script>
</head>
<body>
<div>Input</div>
<textarea id="txtInput" style="width: 632px; height: 253px"></textarea>
<br />
<input id="btnDecode" style="width: 198px" 
type="button" value="Decode" onclick="Decode()" />
<br />
<div>Output</div>
<textarea id="txtOutput" style="width: 630px; height: 273px"></textarea>
<br />
<a href="http://dean.edwards.name/packer/">Dean Edwards' JS packer</a>
<br />
<a href="http://jsbeautifier.org/">Javascript unpacker and beautifier</a>
</body>
</html>

Points of Interest

After you decode the JavaScript with the page, beautify it with Javascript unpacker and beautifier.

You can read more about Dean Edwards' JS packer's inner workings on Golan Yosef blog.

History

  • 5th March, 2010: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Igor Krupitsky
Web Developer
United States United States
Igor is a business intelligence consultant working in Tampa, Florida. He has a BS in Finance from University of South Carolina and Masters in Information Management System from University of South Florida. He also has following professional certifications: MCSD, MCDBA, MCAD.

Comments and Discussions

 
GeneralJust what I was looking for Pinmembergeekgirljas4-Apr-10 22:57 
GeneralMy vote of 1 PinmemberJLuterek5-Mar-10 5:22 
GeneralRe: My vote of 1 PinmemberIgor Krupitsky5-Mar-10 16:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 5 Mar 2010
Article Copyright 2010 by Igor Krupitsky
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid