Skip to content

Instantly share code, notes, and snippets.

@ppoffice
Created April 25, 2016 14:56
Show Gist options
  • Select an option

  • Save ppoffice/e3f603a15139a1475fe3181daa97b3ad to your computer and use it in GitHub Desktop.

Select an option

Save ppoffice/e3f603a15139a1475fe3181daa97b3ad to your computer and use it in GitHub Desktop.
Unicode Garbled Text Decoder
x = '\xE7\xBB\xBF\xE8\x89\xB2\xE5\x81\xA5\xE5\xBA\xB7\xE5\xB0\x8F\xE6\xB8\x85\xE6\x96\xB0';
x.split('').map(i => (j = i.charCodeAt(0).toString(2), i.charCodeAt(0) > 127 ? j : new Array((4 - (j.length % 4)) % 4).fill('0').join('') + j)).map((i, j, k) => (l = i.match(/^0|^1{2,4}0/), l ? m = new Array(l[0] === '0' ? 1 : l[0].length - 1).fill(0) : m = [], m.map((o, r) => r === 0 ? i.slice(l[0].length, i.length) : k[j + r].slice(2, k[j + r].length)))).filter(i => i.length).map(i => String.fromCharCode(parseInt(i.join(''), 2))).join('');
@yourwife88

Copy link
Copy Markdown

Ɲ 䴒ȊĀĒᨲ㰠䒍쇀 谪昦᜵镄恀弖睧踫�棯᧖⊑판쵷綾Ǫ懣گ隩絮⪵䌐౰坤ⷞ⇰魿溩읡⋹ੈ㈉㈮⸶⸳㤷Ț㌴ʸ숀ဂ⼞ࠃ岝僽ᰊֶ煹ˊ渠ዃ卿굄ꈮ習Ӏ㾕沀恹㓟ꀥ暑缈⻏パ尀ꦹ穸 斏᷑⿘畣ꊋ우퐵횝漳㣝쳅ᰨ풍蛷嵜ῡⲘ㺾먉빑ㄮ秬筐空軷蒦鯾ඌ颂쑿뾻뜰绻⢗�疡쏮駦ⶐ酙靁뷫莶⮃抍恊퇨侂屣ഒ낕뫣帰뭈『㞌罱㑔濁늒뎪権

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment