-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path2010-12-04-aadecode-decode-encoded-as-aaencode.html
94 lines (81 loc) · 9.21 KB
/
2010-12-04-aadecode-decode-encoded-as-aaencode.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
layout: post
title: aadecode - Decode encoded-as-aaencode JavaScript program. ['_']
date: '2010-12-04T23:10:00.002+09:00'
author: cat_in_136
tags:
- javascript
- web application
last_modified_at: '2016-03-02T00:38:28+09:00'
blogger_id: tag:blogger.com,1999:blog-5670234897870215734.post-1467690952267666505
blogger_orig_url: http://cat-in-136.blogspot.com/2010/12/aadecode-decode-encoded-as-aaencode.html
---
<p>
aadecode - Decode encoded-as-<em><a href="http://utf-8.jp/public/aaencode.html">aaencode</a></em> JavaScript program. (゚Д゚) ['_']
</p>
<div>
<label for="aadecode_encoded">Enter encoded code:</label>
<textarea id="aadecode_encoded" style="width:100%;height:20em">
゚ω゚ノ= /`m´)ノ ~┻━┻ //*´∇`*/ ['_']; o=(゚ー゚) =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');
</textarea>
</div>
<div style="text-align: right;">
<input type="button" value="aadecode" onclick="AADecode.doDecode()" />
</div>
<div>
<textarea id="aadecode_decoded" style="width:100%;height:20em" readonly="readonly">
</textarea>
</div>
<aside><div style="font-size: xx-small;">
"aadecode" is released under
the <a href="http://opensource.org/licenses/mit-license.php" rel="noindex,nofollow">MIT License</a>.
</div></aside>
<script type="text/javascript" defer="defer" async="async"><!-- ///* --><![CDATA[ // */
/* AADecode - Decode encoded-as-aaencode JavaScript program.
*
* Copyright (C) 2010 @cat_in_136
*
* This software is released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*/
var AADecode = {
decode: function(text) {
var evalPreamble = "(\uFF9F\u0414\uFF9F) ['_'] ( (\uFF9F\u0414\uFF9F) ['_'] (";
var decodePreamble = "( (\uFF9F\u0414\uFF9F) ['_'] (";
var evalPostamble = ") (\uFF9F\u0398\uFF9F)) ('_');";
var decodePostamble = ") ());";
// strip beginning/ending space.
text = text.replace(/^\s*/, "").replace(/\s*$/, "");
// returns empty text for empty input.
if (/^\s*$/.test(text)) {
return "";
}
// check if it is encoded.
if (text.lastIndexOf(evalPreamble) < 0) {
throw new Error("Given code is not encoded as aaencode.");
}
if (text.lastIndexOf(evalPostamble) != text.length - evalPostamble.length) {
throw new Error("Given code is not encoded as aaencode.");
}
var decodingScript = text.replace(evalPreamble, decodePreamble)
.replace(evalPostamble, decodePostamble);
return eval(decodingScript);
},
doDecode: function() {
var oEncoded = document.getElementById("aadecode_encoded");
var oDecoded = document.getElementById("aadecode_decoded");
try {
oDecoded.value = AADecode.decode(oEncoded.value);
} catch (ex) {
oDecoded.value = "****Error:\n" + ex.toString();
}
},
dummy: null
};
// ]]><!-- --></script>
<hr />
<h4>See also</h4>
<ul>
<li><a href="http://utf-8.jp/public/aaencode.html">aaencode</a> - Encode any JavaScript program to Japanese style emoticons (^_^)</li>
<li><a href="{% post_url 2010-11-29-code-reading-aaencoded-javascript-code %}">code reading : javascript code encoded as aaencode</a></li>
</ul>