You are here: hacking technology > encryption decipher > Content
Hot Articles
Recommend Articles
New Articles
Javascript large collection encrypt, decrypt skills
  Add date: 03/16/2011   Publishing date: 03/16/2011   Hits: 75
Total 3 pages, Current page:1, Jump to page:
 

A: the most simple encryption decryption

Everybody to JAVASCRIPT function escape () and unescape () must be better understand la (many web pages with them), encrypted were encoding and decoding string, such as example code with escape () function encrypted into the following format:

U9ED1%22 where % 28% u5BA2 % u9632 % u7EBF % 22 percent 29% 3B

 

How? Also see to understand? Of course the ASCII characters "where" hasn't been encryption, if we can write to JAVASCRIPT code to make it encryption is as follows:

% 61% 6C % 65% 72% 74% u9ED1 % u5BA2 28% 22% u9632 % u7EBF % 22%3B 29

 

Ha ha! How? This is completely encryption!

Of course, such encrypted code is not directly running, fortunately have eval (codeString) is available, this function role is check JavaScript code and execution, will codeString parameter is contain valid option to JavaScript code string values, plus the above decoding unescape (), encrypted results are as follows:

 

Var code = unescape (" % 61% 6C % 65% 72% 74% u9ED1 % u5BA2 28% 22% u9632 % u7EBF % 22%29% gn20-3b ");

Eval (code)

 

 

It is not very simple? Don't happy, decryption is the same simple, decryption code to put others unescape ())! (!!!!! Ha ha

2: escape character "\" the magical

Everyone is likely to escape character "\" not very familiar, but for JavaScript provides some special characters such as: \ n (wrap), \ r (enter), \ '(single quotation marks) should be understand? Actually "\" behind can still follow octal or hexadecimal number, such as character "a" can be expressed as: "\ 141" or "\ x61" (note is lowercase characters "x"), as for double byte characters such as Chinese characters "black" will only use hex expressed as "\ u9ED1" (note is lowercase characters "u"), characters "u" says is double byte characters, according to this principle can be expressed as the code examples:

Octal escapes string as follows:

 

Eval (" \ 141\154\145\162\164\50\42 u9ED1 \ u5BA2 \ \ \ u9632 \ u7EBF \ 42\51\73 ")

 

 

 

Hex escapes string as follows:

 

Eval (" \ x61 \ x6C \ x72 \ x74 x65 \ x28 \ x22 \ \ \ u9ED1 \ u5BA2 \ u9632 \ u7EBF \ x22 \ x29 \ x3B ")

 

 

 

This without decoding function, because JavaScript execution by, as when converting decoded also is very simple as follows:

 

Where (x6C x61 \ '\ x72 \ x74 x65 \ \ \ x28 \ x22 \ \ \ u9ED1 \ u5BA2 \ u9632 \ u7EBF \ x22 \ x29 \ x3B ")

 

 

 

Will popup dialog tell you decrypted results!

3: use Microsoft produces the Script Encoder Encoder to coded. Script

Tools using won't introduce! I am directly use JavaScript calls the Encoder Scripting. Complete control code! The HTML code is as follows:

 

Var Senc = new ActiveXObject (" Scripting. Encoder ");

Var code = '\ r \ nalert (" the matrix "); defense" \ r \ n ';

Var Encode = Senc. EncodeScriptFile (". HTM ", code, 0, "");

 

Other pages: : 1 * 2 * 3 * Next>>
Prev:Sep UPX shells ideas Next:Explains how to manually take off the double process with Key specific shell

Comment:

Category: Home > encryption decipher