mistral said:
How to decrypt this text, what algorithm used to encode text, how to
recreate algorithm?
%c3%99%c3%a3%c3%af%c3%b3%c3%94%c3%92%c3%89%c3%81%c3%8c%c3%ae%c3%ba
%c3%b9%c3%9b%c3%bc%c2%b0%c2%b2%c3%aa%c3%a4%c3%a9%c3%b1%c3%bc
%c3%a9%c3%b2%c3%ac%c3%ad%c3%86%c3%95%c3%8c%c3%8c%c3%a1%c3%a9%c3%aa
%c3%b4%c3%bc%c2%b0%c2%b2%c3%ac%c3%a9%c3%ac%c3%b1%c3%a6
decoding with unescape does not work it seems.
The proprietary unescape() method AFAIK can only decode percent-encoded
ASCII/ISO-8859-1 characters. The standards compliant decodeURI() method
decodes percent-encoded strings as if the bytes denoted UTF-8 code units
(ES3, 15.1.3.1). Hence your result --
ÙãïóÔÒÉÃÂÌîúùÛü°²êäéñüéòìÃÂÆÕÌÌáéêôü°²ìéìñæ
-- and the result that Bruno Desthuilliers posted.
The above, however, looks more like UTF-16 code units where each byte
sequence was percent-encoded. So the following might produce output that
makes sense:
var s = [
"%c3%99%c3%a3%c3%af%c3%b3%c3%94%c3%92%c3%89%c3%81%c3%8c%c3%ae%c3%ba",
"%c3%b9%c3%9b%c3%bc%c2%b0%c2%b2%c3%aa%c3%a4%c3%a9%c3%b1%c3%bc",
"%c3%a9%c3%b2%c3%ac%c3%ad%c3%86%c3%95%c3%8c%c3%8c%c3%a1%c3%a9%c3%aa",
"%c3%b4%c3%bc%c2%b0%c2%b2%c3%ac%c3%a9%c3%ac%c3%b1%c3%a6"
].join("");
window.alert(
s.replace(/%([0-9a-f]{2})%([0-9a-f]{2})/g,
function(s, p1, p2)
{
return String.fromCharCode(parseInt(p1 + p2, 16));
}));
That displays a character string of 41 Hangul syllables (U+AC00 to U+D7A3)
here. Hangul is described by Wikipedia as being the most used alphabet in
Korea.
The corresponding encoding algorithm can be derived from the above
decoding algorithm, and is left as an exercise to the reader.
HTH
PointedEars