Connect with Expertise | Find Experts, Get Answers, Share Insights

How to decrypt text?

mistral
 
Posts: n/a
#1: Sep 14 '07
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%c 3%8c%c3%ae%c3%ba
%c3%b9%c3%9b%c3%bc%c2%b0%c2%b2%c3%aa%c3%a4%c3%a9%c 3%b1%c3%bc
%c3%a9%c3%b2%c3%ac%c3%ad%c3%86%c3%95%c3%8c%c3%8c%c 3%a1%c3%a9%c3%aa
%c3%b4%c3%bc%c2%b0%c2%b2%c3%ac%c3%a9%c3%ac%c3%b1%c 3%a6

decoding with unescape does not work it seems.

Regards,


Bruno Desthuilliers
 
Posts: n/a
#2: Sep 14 '07

re: How to decrypt text?


mistral a écrit :
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%c 3%8c%c3%ae%c3%ba
%c3%b9%c3%9b%c3%bc%c2%b0%c2%b2%c3%aa%c3%a4%c3%a9%c 3%b1%c3%bc
%c3%a9%c3%b2%c3%ac%c3%ad%c3%86%c3%95%c3%8c%c3%8c%c 3%a1%c3%a9%c3%aa
%c3%b4%c3%bc%c2%b0%c2%b2%c3%ac%c3%a9%c3%ac%c3%b1%c 3%a6
>
decoding with unescape does not work it seems.
using decodeURI:

ÙãïóÔÒÉÁÌîú
ùÛü°²êäéñü
éòì*ÆÕÌÌáéê
ôü°²ìéìñæ


Ok, that's still somewhat meaningless... but at least you know how it
has been encoded - now you just have to guess how to decrypt it !-)
Randy Webb
 
Posts: n/a
#3: Sep 14 '07

re: How to decrypt text?


mistral said the following on 9/14/2007 5:57 AM:
How to decrypt this text, what algorithm used to encode text, how to
recreate algorithm?
That depends - directly - on where that text came from.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Thomas 'PointedEars' Lahn
 
Posts: n/a
#4: Sep 14 '07

re: How to decrypt text?


mistral wrote:
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%c 3%8c%c3%ae%c3%ba
%c3%b9%c3%9b%c3%bc%c2%b0%c2%b2%c3%aa%c3%a4%c3%a9%c 3%b1%c3%bc
%c3%a9%c3%b2%c3%ac%c3%ad%c3%86%c3%95%c3%8c%c3%8c%c 3%a1%c3%a9%c3%aa
%c3%b4%c3%bc%c2%b0%c2%b2%c3%ac%c3%a9%c3%ac%c3%b1%c 3%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
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Closed Thread

Tags
decrypt text, javascript decrypttext