前提條件
- FontCreator 字型編輯工具:查詢網路字碼點或字形名稱
- Umi-OCR 文字識別工具:用來識別
FontCreator
中的字形 - 同時你需要一點點
js
知識和對未知的探索精神 🙃
查詢加密字型
F12 或 Ctrl + Shift + C 或 Ctrl + Shift + J 開啟控制檯,找到對應文字內容元素節點。
查詢字型
- 網頁顯示內容和原始碼內容不一致
- 發現不常見字型
bqg
大機率加密字型 - 取消設定的預設字型,觀察頁面變化,發現確實是字型加密了。如下圖:
下載字型
- 控制檯條件過濾選擇字型,
F5
重新整理頁面。沒有條件過濾欄,點選左上側有個漏斗形狀圖示。 - 在當前請求上右鍵 -> 在新標籤頁開啟(第一個)自動下載字型。
字碼點和字形
- 開啟
FontCreator
將bqg.ttf
拖進去就可以看到字碼點和字形了。 - Ctrl + A 全選所有字形,Ctrl + C 複製所有字碼點。示例:
uni3984
- 使用
Umi-OCR
識別漢字,內容少可以手動敲。
預設情況下字碼點複製順序和字形排列順序一致,從左到右。
字碼點:uni3984
uni 沒用,關鍵在後四位是字型 Unicode
字元轉十六進位制後的結果。將獲取到的字碼點和漢字分成兩個陣列一一對應,方便後面程式碼處理。
編寫程式碼
有了字碼點和字形文字後,可以使用任意開發語言進行解碼處理。這裡使用 JavaScript
解碼可以再瀏覽器直觀看到內容變化。
關鍵程式碼
// 將網頁獲取的亂碼字型先轉 Unicode 編碼,再轉 十六進位制 大寫就得到了最終資料。
text.charCodeAt(i).toString(16).toUpperCase();
原始碼
function fontDecoding() {
// 字碼點
const points = ["37E6", "37E7", "382B", "382C", "382D", "386D", "38C7", "38C8", "38C9", "38CA", "3917",
"3919", "391A", "3955", "3956", "3967", "3968", "396B", "396F", "3981", "3982", "3983", "3984",
"3985", "3986", "3987", "39A6", "39A7", "39A8", "39A9", "39AA", "39AB", "39AC", "39B1", "39B2",
"39B3", "39B4", "39B5", "39B6", "39B7", "39B9", "39BA", "39D6", "39D7", "39D8", "39D9", "39DA",
"39DB", "39DC", "39DD", "39DE", "39E0", "3A26", "3A27", "3A29", "3A2A", "3A2B", "3A2C", "3A3C",
"3A3D", "3A3E", "3A3F", "3A40", "3A41", "3A58", "3A59", "3A5A", "3A5B", "3A76", "3A77", "3A78",
"3A79", "3A7A", "3A7B", "3A7C", "3A7D", "3A7E", "3A8F", "3A90", "3A91", "3A92", "3AA7", "3AA8",
"3AA9", "3AAA", "3AAB", "3AB2", "3AB3", "3AB4", "3AB5", "3AB6", "3AB7", "3AB8", "3AB9", "3ABA",
"3ABB", "3ABC", "3ABD", "3ABE", "3ABF", "3AC0", "3AC5", "3AC6", "3AC7", "3AC8", "3AC9", "3ACA",
"3ACB", "3ACC", "3AE0", "3AE1", "3AE2", "3AE3", "3AE4", "3AE5", "3AE6", "3AE7", "3AE8", "3AE9",
"3AEA", "3AEB", "3AEC", "3AED", "3AEE", "3AEF", "3AF7", "3AF8", "3AF9", "3AFA", "3AFB", "3AFC",
"3BBA", "3BBB", "3BBC", "3BBD", "3BBE", "3C18", "3C19", "3C1A", "3C1B", "3C1C", "3C1D", "3C30",
"3C31", "3C32", "3C33", "3C34", "3C35", "3C36", "3C37", "3C38", "3C39", "3C3A", "3C4F", "3C50",
"3C51", "3C52", "3C53", "3C54", "3C55", "3C56", "3C57", "3C5A", "3C5B", "3C5C", "3C5D", "3C5E",
"3C5F", "3C66", "3C67", "3C68", "3C69", "3C6A", "3C6B", "3CA4", "3CA5", "3CCD", "3CCE", "3CCF",
"3CD0", "3CD1", "3CD2", "3CD3", "3CD4", "3CE1", "3CE2", "3CE3", "3CE4", "3CE5", "3D50", "3D51",
"3D52", "3D53", "3D54", "3D55", "3D56", "3D57", "3D59", "3D5B", "3D5C", "3D82", "3D83", "3D84",
"3D85", "3E4F", "3E50", "3E51", "3E52", "3E53", "3E54", "3E55", "3E56", "3E57", "3EA7", "4031",
"4032", "4033", "4034", "4068", "4069", "406A", "406B", "406C", "406D", "406F", "4070", "4071",
"4072", "40C3", "40C4", "40E2", "40E3", "40E4", "42C1", "42C2", "42C3", "42C4", "42C5", "42C6",
"42C7", "42DD", "42DE", "42DF", "42E0", "42E1", "42E2", "42E3", "42E4", "42E5", "42E6", "42E7",
"42E8", "42E9", "42EA", "431E", "431F", "4320", "4321", "4453", "4454", "4455", "4456", "4457",
"45D5", "45D6", "45D7", "45D8", "45D9", "45FB", "45FC", "45FD", "45FE", "45FF", "4602", "4613",
"4614", "4618", "46C8", "46C9", "46CA", "46CB", "46CC", "46CD", "46CE", "46CF", "46D0", "46D1",
"46D2", "46D3", "46D4", "46D5", "46D6", "46D7", "4725", "4727", "4728", "472A", "472C", "472D",
"472E", "4949", "494A", "494B", "494C", "494D", "49A1", "49A2", "49A3", "49A4", "49A5", "4A08",
"4A09", "4A0A", "4A9F", "4AA0", "4B74", "4B75", "4B76", "4B77", "4B78", "4B79", "4B7A", "4B7B",
"4B7C", "4B7D", "4B7E", "4B7F", "4B80", "4B81", "4B8A", "4B8B", "4B8C", "4B8D", "4B8E", "4B8F",
"4BB7", "4BB8", "4BB9", "4BBA", "4BBB", "4BE9", "4BEA", "4BEB", "4BEC", "4BED", "4BEE", "4BEF",
"4BF0", "4C02", "4C03", "4C04", "4C05", "4C85", "4C86", "4C87", "4C88", "4C89", "4C96", "4C97",
"4C98", "4C99", "4CBA", "4CBB", "4CBC", "4CBD", "4CBE", "4CBF", "4CC0", "4D8F", "4D90", "4D91",
"4D92", "4D93", "4E33", "4E35", "4E37", "4E40", "4E41", "4E44", "4E46", "4E4A", "4E55", "50FE",
"5677", "5678", "5679", "56A0", "56A1", "56A2", "5718", "5719", "571A", "571B", "571D", "5828",
"5868", "587A", "587F", "58B5", "58B7", "58BA", "58C4", "58DC", "590C", "590D", "596B", "5A48",
"5A56", "5A64", "5A7A", "5A90", "5AA9", "5AB1", "5AC0", "5AF3", "5B28", "5B2E", "5D57", "5D59",
"5D5A", "5D5C", "5D5E", "5D5F", "5DEA", "5DEC", "5DED", "6AFF", "6B07", "6B1B", "6B1C", "6B1D",
"9F32", "9F33", "9F34", "9F35", "9F36", "9F37", "9F38", "9F40", "9F42", "D6D2"
];
// 字形
const indices =
"一二十丁廠七八人入兒九幾了刀力又三千虧士工才寸丈大與萬上小口山巾千亡義之屍已弓己也飛氣川億個麼久勺丸凡及習叉馬鄉豐開夫天元無雲扎藝五支廳犬區尤匹車巨牙屯互切止少日中貝岡見手午氣升長?片化仇幣仍僅斤爪反介父從今兇乏倉氏風欠丹勻烏勾鳳六文方火憶訂戶認心尺巴隊辦以允予幻玉未未擊打巧正撲功扔甘世古節本術可丙左厲石右布龍平軋東的是在不有和這為國我電由只要他時來叫用們嘆四失生到代作地於出就分乎對令成會樂句冊外處冬鳥包主市閃發年動頭漢寧它百同能而下過子說產種面後多定學法行至此所民得光經進蟲著等部度家裡如回水高自理起物現實加量都兩體制機當使點業去把性好應合還因其些然前政那社事形相全表間樣色關各重新線內數你明看原利比或但質第向道命變條汙沒結解問意建月公軍系很情者最立想通並提直題黨階陰程奸展婦媽戲果料象員革位常總痙莖築弄戰嬰輪澤xxx毛林溼白醫痺皰批扯疣走抄壩貢裸赤槍抓女美罪交密宮啊愛癢她媚變縹購屌殘智共親活克神麗李獨暴遊集男死套騷操足插圓假幼弟盜貨芽花爹跌勞魔鬼殖器領屁逼菊婊棒極消妹母衛";
const decodeing = (text) => {
let target = '';
for (let i = 0; i < text.length; i++) {
let code = text.charCodeAt(i).toString(16).toUpperCase();
const findIndex = points.findIndex(item => item === code);
if (findIndex != -1) {
target += indices[findIndex]
} else {
target += text[i]
}
}
return target
};
const html = document.querySelector("#content").innerHTML;
const text = decodeing(html);
document.querySelector("#content").innerHTML = text;
alert('解碼完成')
};
書籤指令碼
javascript:function fontDecoding(){const points=["37E6","37E7","382B","382C","382D","386D","38C7","38C8","38C9","38CA","3917","3919","391A","3955","3956","3967","3968","396B","396F","3981","3982","3983","3984","3985","3986","3987","39A6","39A7","39A8","39A9","39AA","39AB","39AC","39B1","39B2","39B3","39B4","39B5","39B6","39B7","39B9","39BA","39D6","39D7","39D8","39D9","39DA","39DB","39DC","39DD","39DE","39E0","3A26","3A27","3A29","3A2A","3A2B","3A2C","3A3C","3A3D","3A3E","3A3F","3A40","3A41","3A58","3A59","3A5A","3A5B","3A76","3A77","3A78","3A79","3A7A","3A7B","3A7C","3A7D","3A7E","3A8F","3A90","3A91","3A92","3AA7","3AA8","3AA9","3AAA","3AAB","3AB2","3AB3","3AB4","3AB5","3AB6","3AB7","3AB8","3AB9","3ABA","3ABB","3ABC","3ABD","3ABE","3ABF","3AC0","3AC5","3AC6","3AC7","3AC8","3AC9","3ACA","3ACB","3ACC","3AE0","3AE1","3AE2","3AE3","3AE4","3AE5","3AE6","3AE7","3AE8","3AE9","3AEA","3AEB","3AEC","3AED","3AEE","3AEF","3AF7","3AF8","3AF9","3AFA","3AFB","3AFC","3BBA","3BBB","3BBC","3BBD","3BBE","3C18","3C19","3C1A","3C1B","3C1C","3C1D","3C30","3C31","3C32","3C33","3C34","3C35","3C36","3C37","3C38","3C39","3C3A","3C4F","3C50","3C51","3C52","3C53","3C54","3C55","3C56","3C57","3C5A","3C5B","3C5C","3C5D","3C5E","3C5F","3C66","3C67","3C68","3C69","3C6A","3C6B","3CA4","3CA5","3CCD","3CCE","3CCF","3CD0","3CD1","3CD2","3CD3","3CD4","3CE1","3CE2","3CE3","3CE4","3CE5","3D50","3D51","3D52","3D53","3D54","3D55","3D56","3D57","3D59","3D5B","3D5C","3D82","3D83","3D84","3D85","3E4F","3E50","3E51","3E52","3E53","3E54","3E55","3E56","3E57","3EA7","4031","4032","4033","4034","4068","4069","406A","406B","406C","406D","406F","4070","4071","4072","40C3","40C4","40E2","40E3","40E4","42C1","42C2","42C3","42C4","42C5","42C6","42C7","42DD","42DE","42DF","42E0","42E1","42E2","42E3","42E4","42E5","42E6","42E7","42E8","42E9","42EA","431E","431F","4320","4321","4453","4454","4455","4456","4457","45D5","45D6","45D7","45D8","45D9","45FB","45FC","45FD","45FE","45FF","4602","4613","4614","4618","46C8","46C9","46CA","46CB","46CC","46CD","46CE","46CF","46D0","46D1","46D2","46D3","46D4","46D5","46D6","46D7","4725","4727","4728","472A","472C","472D","472E","4949","494A","494B","494C","494D","49A1","49A2","49A3","49A4","49A5","4A08","4A09","4A0A","4A9F","4AA0","4B74","4B75","4B76","4B77","4B78","4B79","4B7A","4B7B","4B7C","4B7D","4B7E","4B7F","4B80","4B81","4B8A","4B8B","4B8C","4B8D","4B8E","4B8F","4BB7","4BB8","4BB9","4BBA","4BBB","4BE9","4BEA","4BEB","4BEC","4BED","4BEE","4BEF","4BF0","4C02","4C03","4C04","4C05","4C85","4C86","4C87","4C88","4C89","4C96","4C97","4C98","4C99","4CBA","4CBB","4CBC","4CBD","4CBE","4CBF","4CC0","4D8F","4D90","4D91","4D92","4D93","4E33","4E35","4E37","4E40","4E41","4E44","4E46","4E4A","4E55","50FE","5677","5678","5679","56A0","56A1","56A2","5718","5719","571A","571B","571D","5828","5868","587A","587F","58B5","58B7","58BA","58C4","58DC","590C","590D","596B","5A48","5A56","5A64","5A7A","5A90","5AA9","5AB1","5AC0","5AF3","5B28","5B2E","5D57","5D59","5D5A","5D5C","5D5E","5D5F","5DEA","5DEC","5DED","6AFF","6B07","6B1B","6B1C","6B1D","9F32","9F33","9F34","9F35","9F36","9F37","9F38","9F40","9F42","D6D2"];const indices="一二十丁廠七八人入兒九幾了刀力又三千虧士工才寸丈大與萬上小口山巾千亡義之屍已弓己也飛氣川億個麼久勺丸凡及習叉馬鄉豐開夫天元無雲扎藝五支廳犬區尤匹車巨牙屯互切止少日中貝岡見手午氣升長?片化仇幣仍僅斤爪反介父從今兇乏倉氏風欠丹勻烏勾鳳六文方火憶訂戶認心尺巴隊辦以允予幻玉未未擊打巧正撲功扔甘世古節本術可丙左厲石右布龍平軋東的是在不有和這為國我電由只要他時來叫用們嘆四失生到代作地於出就分乎對令成會樂句冊外處冬鳥包主市閃發年動頭漢寧它百同能而下過子說產種面後多定學法行至此所民得光經進蟲著等部度家裡如回水高自理起物現實加量都兩體制機當使點業去把性好應合還因其些然前政那社事形相全表間樣色關各重新線內數你明看原利比或但質第向道命變條汙沒結解問意建月公軍系很情者最立想通並提直題黨階陰程奸展婦媽戲果料象員革位常總痙莖築弄戰嬰輪澤xxx毛林溼白醫痺皰批扯疣走抄壩貢裸赤槍抓女美罪交密宮啊愛癢她媚變縹購屌殘智共親活克神麗李獨暴遊集男死套騷操足插圓假幼弟盜貨芽花爹跌勞魔鬼殖器領屁逼菊婊棒極消妹母衛";const decodeing=(text)=>{let target='';for(let i=0;i<text.length;i++){let code=text.charCodeAt(i).toString(16).toUpperCase();const findIndex=points.findIndex(item=>item===code);if(findIndex!=-1){target+=indices[findIndex]}else{target+=text[i]}}return target};const html=document.querySelector("#content").innerHTML;const text=decodeing(html);document.querySelector("#content").innerHTML=text;alert('解碼完成')};fontDecoding();
書籤指令碼如何使用? 參考:谷歌瀏覽器書籤指令碼
最終效果
隨便開啟一篇小說,開啟控制檯觀察,點選一次書籤指令碼,此時原文內容已被更新。
文字有xxx三個字是敏感字,被替換換了,否則發不了
原文地址