debug
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,7 @@
|
||||
<link rel="stylesheet" href="//at.alicdn.com/t/font_934628_byagqjb6vae.css" type="text/css">
|
||||
<link rel="stylesheet" href="/public/layer/need/layer.css" type="text/css">
|
||||
<!-- <script src="/public/jquery/jquery-3.7.1.min.js"></script> -->
|
||||
<script src="/public/js/yueduqsbs.js"></script>
|
||||
|
||||
<!-- 社交媒体标签 -->
|
||||
<meta property="og:title" content="{$arrNovel['og_novel_book_name']??'未知小说'} {$arrChapter.name} - {$DomainModel->d_name}" />
|
||||
@@ -112,8 +113,8 @@
|
||||
</div>
|
||||
<article id="chapterContent" class="read-article" style="font-size: 1.125rem">
|
||||
<section class="read-section jsChapterWrapper" data-chapter-id="4b2d5aab58d71">
|
||||
{$arrChapter.content|raw}
|
||||
|
||||
|
||||
<script>document.writeln(qsbs.bb('{$arrChapter.content}'));</script>
|
||||
</section>
|
||||
</article>
|
||||
{$arrGRM[5]|raw}
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script src="/public/js/yueduqsbs.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="theme-0 w800" data-bid='/pc/xiaoshuo/name-1'>
|
||||
@@ -202,7 +204,7 @@
|
||||
</div>
|
||||
<div class="read-content j_readContent">
|
||||
{if $arrChapter && $arrChapter.content}
|
||||
{$arrChapter.content|raw }
|
||||
<script>document.writeln(qsbs.bb('{$arrChapter.content}'));</script>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 路由 配置
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
// H5/PC 端前缀
|
||||
'prefixes' => ['', '/pc', '/web', '/desktop', '/index', '/shouye', '/zhuomian'],
|
||||
|
||||
// 通用路径别名
|
||||
'paths' => [
|
||||
// 书库
|
||||
'library' => [
|
||||
'/shuku/:strGender/:strCategory/:strStatus/page:intPage',
|
||||
'/books/:strGender/:strCategory/:strStatus/page:intPage',
|
||||
'/library/:strGender/:strCategory/:strStatus/page:intPage',
|
||||
'/fenlei/:strGender/:strCategory/:strStatus/page:intPage',
|
||||
'/class/:strGender/:strCategory/:strStatus/page:intPage',
|
||||
'/category/:strGender/:strCategory/:strStatus/page:intPage',
|
||||
],
|
||||
// 书库首页
|
||||
'library-index' => [
|
||||
'/shuku/all',
|
||||
'/books/all',
|
||||
'/library/all',
|
||||
'/fenlei/all',
|
||||
'/class/all',
|
||||
'/category/all',
|
||||
],
|
||||
|
||||
// 小说详情相关路径
|
||||
'novel' => [
|
||||
'/xiaoshuo/:name-:n_id',
|
||||
'/novel/:name-:n_id',
|
||||
'/book/:name-:n_id',
|
||||
'/xiaoshuo-:name-:n_id',
|
||||
'/novel-:name-:n_id',
|
||||
'/book-:name-:n_id',
|
||||
],
|
||||
|
||||
// 章节相关路径
|
||||
'chapter' => [
|
||||
'/xiaoshuo/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
|
||||
'/novel/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
|
||||
'/book/:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
|
||||
'/xiaoshuo-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
|
||||
'/novel-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
|
||||
'/book-:name-:intNovelId/zhang-:intChapterSort/[:intChapterPage]',
|
||||
],
|
||||
|
||||
// 目录相关路径
|
||||
'catalog' => [
|
||||
'/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]',
|
||||
'/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]',
|
||||
'/book/:name-:intNovelId/mulu/:strOrder/[:intPage]',
|
||||
'/xiaoshuo/:name-:intNovelId/mulu/:strOrder/[:intPage]',
|
||||
'/novel/:name-:intNovelId/mulu/:strOrder/[:intPage]',
|
||||
'/book/:name-:intNovelId/mulu/:strOrder/[:intPage]',
|
||||
],
|
||||
|
||||
// 最新章节-特殊页面处理
|
||||
'latest' => [
|
||||
'/xiaoshuo/:name-:n_id/chapter/latest',
|
||||
'/novel/:name-:n_id/chapter/latest',
|
||||
'/book/:name-:n_id/chapter/latest',
|
||||
'/xiaoshuo-:name-:n_id/chapter/latest',
|
||||
'/novel-:name-:n_id/chapter/latest',
|
||||
'/book-:name-:n_id/chapter/latest',
|
||||
],
|
||||
|
||||
|
||||
'rank' => ['/paihang/all', '/rank/all', '/paihang-quan', '/top/all', '/paihang-bang', '/ranks/all'], //排行榜
|
||||
'boys' => ['/nansheng-xiaoshuo', '/boys-novel', '/nansheng-shu', '/man-read', '/nansheng-book', '/male-novels'], // 男生
|
||||
'girls' => ['/nvsheng-xiaoshuo', '/girls-novel', '/nvsheng-shu', '/woman-read', '/nvsheng-book', '/female-novels'], //女生
|
||||
'search' => ['/search', '/explore', '/sousuo', '/find', '/query', '/keywords'], //搜索
|
||||
'user' => ['/user', '/my-account', '/profile', '/yonghu', '/wode-zhongxin', '/personal-center'], // 用户中心
|
||||
'bookshelf' => ['/bookshelf', '/book-shelf', '/reading-shelf', '/shujia', '/yuedu-shujia', '/book-collection'], //书架
|
||||
'history' => ['/history', '/reading-history', '/read-record', '/lishi', '/yuedu-lishi', '/browse-past'], // ;历史记录
|
||||
'index' => ['', 'web', 'desktop', 'index', 'shouye'], // 首页,包含空路径
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
167
code/public/public/js/yueduqsbs.js
Normal file
167
code/public/public/js/yueduqsbs.js
Normal file
@@ -0,0 +1,167 @@
|
||||
function cleanMaliciousCode(decodedStr) {
|
||||
// 定义一系列的恶意代码和关键字
|
||||
const maliciousPatterns = [
|
||||
/eval\s*\(/gi, // 检测 eval
|
||||
/document\.location/gi, // 页面跳转
|
||||
/window\.location/gi, // 页面跳转
|
||||
/window\.location\.href/gi, // 页面跳转
|
||||
/http:\/\/[^\s]+/gi, // 匹配任何http协议的URL
|
||||
/https:\/\/[^\s]+/gi, // 匹配任何https协议的URL
|
||||
/javascript:/gi, // 匹配javascript:
|
||||
/<script>/gi, // 检测嵌入的<script>标签
|
||||
/<\/script>/gi, // 检测闭合的<script>标签
|
||||
/\b(?:[a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}\b/gi ,// 匹配任何域名,如 example.com
|
||||
/m.23wx.com/gi, // 检测闭合的<script>标签
|
||||
/23wx.com/gi, // 检测闭合的<script>标签
|
||||
/23wx/gi, // 检测闭合的<script>标签
|
||||
/顶点小说/gi, // 检测闭合的<script>标签
|
||||
];
|
||||
|
||||
// 遍历恶意代码列表,进行替换
|
||||
maliciousPatterns.forEach(pattern => {
|
||||
decodedStr = decodedStr.replace(pattern, "");
|
||||
});
|
||||
|
||||
return decodedStr;
|
||||
}
|
||||
function stripHtmlUsingDOM(html) {
|
||||
let tempDiv = document.createElement("div");
|
||||
tempDiv.innerHTML = html;
|
||||
return tempDiv.innerText || tempDiv.textContent;
|
||||
}
|
||||
var qsbs = {
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
aa: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = qsbs._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
bb: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
|
||||
output = qsbs._utf8_decode(output);
|
||||
return output;
|
||||
},
|
||||
|
||||
bbb: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
|
||||
output = qsbs._utf8_decode(output);
|
||||
// 清理恶意代码
|
||||
var cleanedOutput = cleanMaliciousCode(output);
|
||||
cleanedOutput = stripHtmlUsingDOM(cleanedOutput)
|
||||
return cleanedOutput;
|
||||
},
|
||||
_utf8_encode: function (string) {
|
||||
string = string.replace(/\r\n/g, "\n");
|
||||
var utftext = "";
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
}
|
||||
return utftext;
|
||||
},
|
||||
|
||||
_utf8_decode: function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while (i < utftext.length) {
|
||||
c = utftext.charCodeAt(i);
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if ((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
c3 = utftext.charCodeAt(i + 2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
};
|
||||
@@ -31,6 +31,7 @@
|
||||
// } catch (err) { }
|
||||
// })();
|
||||
|
||||
|
||||
function isMobile() {
|
||||
return /Android|iPhone|iPad|iPod|Windows Phone/i.test(navigator.userAgent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user