增强安全下载功能

This commit is contained in:
Ember 2024-08-10 07:25:21 +08:00
parent e7db2d6e5c
commit 46b5d108e1
12 changed files with 670 additions and 56 deletions

623
et --hard HEAD~1 Normal file

File diff suppressed because it is too large Load Diff

1
js/downloadjm.js Normal file
View File

@ -0,0 +1 @@
let client;async function f1(){try{const e=await fetchNoCache("https://download.xn--xhq44jb2fzpc.com/download/json/s.json");const t=await e.json();const o=t.masterKey;const n=CryptoJS.SHA256(o);const c={region:d2(t.encryptedRegion,n),accessKeyId:d2(t.encryptedKeyId,n),accessKeySecret:d2(t.encryptedKeySecret,n),bucket:d2(t.encryptedBucket,n)};client=new OSS(c)}catch(e){console.error("Failed to fetch or decrypt OSS config:",e)}}function d2(e,t){e=e.replace(/\s/g,"");const o=CryptoJS.enc.Base64.parse(e);const n=CryptoJS.lib.WordArray.create(o.words.slice(0,4));const c=CryptoJS.lib.WordArray.create(o.words.slice(4));const r=CryptoJS.AES.decrypt({ciphertext:c},t,{iv:n,mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return r.toString(CryptoJS.enc.Utf8)}

View File

@ -7,7 +7,7 @@
<meta name="robots" content="index, follow">
<title>更新日志 | NEU小站</title>
<meta name="keywords" content="">
<meta name="description" content="2024.08 08.08 优化安全下载功能 08.04 优化投稿Markdown编辑器样式 2024.07 07.28 搜索页新增热门关键词 07.26 修复部分情况下加载草稿不展示最新草稿内容的Bug 07.25 修复了内容详情页面不展示最新头像的Bug 配置并优化资源存储子域名 07.03 升级资源内容系统接入投稿用户系统 升级投稿系统为投稿者中心引入投稿用户系统 07.02 新增资源投稿系统 投稿系统优化CORS安全机制以保护文件 2024.06 06.30 优化了资源密码验证机制 06.29 增加资源密码保护功能 06.27 新增 $LaTeX$ 数学公式支持 新增投稿者头像 06.24 优化首页新生指南样式 为网站配置资源防盗链 优化评论区表情稳定性 06.23 新增新生指南板块 06.22 优化主页背景图片稳定性 06.20 更新主页LOGO 更新404页面样式 06.19 更新网站主页样式电脑端和手机端 更新主页按钮样式 06.18 更新网站图标
<meta name="description" content="2024.08 08.10 资源下载采用临时签名URL防止爬虫 08.08 优化安全下载功能 08.04 优化投稿Markdown编辑器样式 2024.07 07.28 搜索页新增热门关键词 07.26 修复部分情况下加载草稿不展示最新草稿内容的Bug 07.25 修复了内容详情页面不展示最新头像的Bug 配置并优化资源存储子域名 07.03 升级资源内容系统接入投稿用户系统 升级投稿系统为投稿者中心引入投稿用户系统 07.02 新增资源投稿系统 投稿系统优化CORS安全机制以保护文件 2024.06 06.30 优化了资源密码验证机制 06.29 增加资源密码保护功能 06.27 新增 $LaTeX$ 数学公式支持 新增投稿者头像 06.24 优化首页新生指南样式 为网站配置资源防盗链 优化评论区表情稳定性 06.23 新增新生指南板块 06.22 优化主页背景图片稳定性 06.20 更新主页LOGO 更新404页面样式 06.19 更新网站主页样式电脑端和手机端 更新主页按钮样式 06.18 更新网站图标
评论区启用贴吧表情。
优化投稿作者样式。
优化网站夜间模式样式。
@ -240,6 +240,10 @@
<div class="post-content">
<h2 id="202408">2024.08<a hidden class="anchor" aria-hidden="true" href="#202408">#</a></h2>
<h3 id="0810">08.10<a hidden class="anchor" aria-hidden="true" href="#0810">#</a></h3>
<ul>
<li>资源下载采用临时签名URL防止爬虫。</li>
</ul>
<h3 id="0808">08.08<a hidden class="anchor" aria-hidden="true" href="#0808">#</a></h3>
<ul>
<li>优化安全下载功能。</li>

View File

@ -7,7 +7,7 @@
<meta name="robots" content="index, follow">
<title>选修课评分 | NEU小站</title>
<meta name="keywords" content="">
<meta name="description" content=" 下载选修课榜单 分类版 ver20230811.2220.xlsx点击下载 下载安全保护中 3秒后将开始下载... 点击 此处 进入虎扑评分选修课榜单。 在评论区交流有关选修课的一切。评论区支持markdown语法。 ">
<meta name="description" content=" 下载选修课榜单 分类版 ver20230811.2220.xlsx 点击下载 下载安全保护中 3秒后将开始下载... 点击 此处 进入虎扑评分选修课榜单。 在评论区交流有关选修课的一切。评论区支持markdown语法。 ">
<meta name="author" content="
@ -231,19 +231,17 @@
<div class="post-content">
<ul>
<li>下载<code>选修课榜单 分类版 ver20230811.2220.xlsx</code><a href="javascript:void(0);" id="download-1" class="download-link">点击下载</a>
<li>下载<code>选修课榜单 分类版 ver20230811.2220.xlsx</code><script src="https://download.xn--xhq44jb2fzpc.com/upload/dl.js?v=1.0.1"></script>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-6.20.0.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/download/downloadjm.js"></script>
<a href="javascript:void(0);" id="download-1" class="download-link">点击下载</a>
<div id="popup-download-1" class="popup">
<div class="popup-title">下载安全保护中</div>
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const linkId = "download-1";
const actualLink = "\/ratings\/选修课榜单 分类版 ver20230811.2220.xlsx";
const popupId = "popup-" + linkId;
initializeDownloadLink(linkId, popupId, actualLink);
});
document.addEventListener("DOMContentLoaded",function(){f1().then(()=>{if(client){const t="download-1";const o="resources\/files\/选修课\/选修课榜单 分类版 ver20230811.2220.xlsx";const n="popup-"+t;let e=client.signatureUrl(o,{expires:20,response:{"content-disposition":"attachment"}});e=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");initializeDownloadLink(t,n,e)}else{console.error("Failed to initialize OSS client due to decryption error.")}}).catch(e=>{console.log("Error initializing OSS Client:",e)})});
</script>
</li>
<li>点击 <a href="https://bbsactivity.hupu.com/pc-viewer/index.html?t=https%3A%2F%2Fm.hupu.com%2Fscore%2Fdetail.html%3Fnight%3D0%26env%3Dprod%26outBizNo%3D67538%26outBizType%3Dcommon_first%26env%3Dprod" target="_blank">此处</a>

View File

@ -451,19 +451,17 @@
<p><strong>标签:</strong>#word #孙子兵法 #期末真题 #人文选修 #线上课 #题库</p>
</blockquote>
<p>此处收录了《孙子兵法》2023年春期末考试题。此文件不支持预览请手动下载。</p>
<script src="https://download.xn--xhq44jb2fzpc.com/upload/dl.js?v=1.0.1"></script>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-6.20.0.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/download/downloadjm.js"></script>
<a href="javascript:void(0);" id="download-1" class="download-link">点击下载</a>
<div id="popup-download-1" class="popup">
<div class="popup-title">下载安全保护中</div>
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const linkId = "download-1";
const actualLink = "https:\/\/download.xn--xhq44jb2fzpc.com\/resources\/files\/孙子兵法\/孙子兵法-2023春-期末考试.zip";
const popupId = "popup-" + linkId;
initializeDownloadLink(linkId, popupId, actualLink);
});
document.addEventListener("DOMContentLoaded",function(){f1().then(()=>{if(client){const t="download-1";const o="resources\/files\/孙子兵法\/孙子兵法-2023春-期末考试.zip";const n="popup-"+t;let e=client.signatureUrl(o,{expires:20,response:{"content-disposition":"attachment"}});e=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");initializeDownloadLink(t,n,e)}else{console.error("Failed to initialize OSS client due to decryption error.")}}).catch(e=>{console.log("Error initializing OSS Client:",e)})});
</script>
<hr>

View File

@ -447,19 +447,17 @@
<p><strong>标签:</strong>#PPT #工图 #工程制图 #课后习题 #答案 #压缩包</p>
</blockquote>
<p>此处收录了《工程制图》习题答案。此文件不支持预览,请手动下载。</p>
<script src="https://download.xn--xhq44jb2fzpc.com/upload/dl.js?v=1.0.1"></script>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-6.20.0.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/download/downloadjm.js"></script>
<a href="javascript:void(0);" id="download-1" class="download-link">点击下载</a>
<div id="popup-download-1" class="popup">
<div class="popup-title">下载安全保护中</div>
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const linkId = "download-1";
const actualLink = "https:\/\/download.xn--xhq44jb2fzpc.com\/resources\/files\/工程制图\/工程制图习题答案.zip";
const popupId = "popup-" + linkId;
initializeDownloadLink(linkId, popupId, actualLink);
});
document.addEventListener("DOMContentLoaded",function(){f1().then(()=>{if(client){const t="download-1";const o="resources\/files\/工程制图\/工程制图习题答案.zip";const n="popup-"+t;let e=client.signatureUrl(o,{expires:20,response:{"content-disposition":"attachment"}});e=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");initializeDownloadLink(t,n,e)}else{console.error("Failed to initialize OSS client due to decryption error.")}}).catch(e=>{console.log("Error initializing OSS Client:",e)})});
</script>
<hr>

View File

@ -454,19 +454,17 @@
<p><strong>标签:</strong>#可预览 #PDF #大学英语 #大英 #新通用 #教师用书</p>
</blockquote>
<p>此处收录了新通用大学英语综合教程1第二版的教师用书。</p>
<script src="https://download.xn--xhq44jb2fzpc.com/upload/dl.js?v=1.0.1"></script>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-6.20.0.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/download/downloadjm.js"></script>
<a href="javascript:void(0);" id="download-1" class="download-link">点击下载</a>
<div id="popup-download-1" class="popup">
<div class="popup-title">下载安全保护中</div>
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const linkId = "download-1";
const actualLink = "https:\/\/download.xn--xhq44jb2fzpc.com\/resources\/files\/NEUsitefiles\/%E6%96%B0%E9%80%9A%E7%94%A8%E5%A4%A7%E5%AD%A6%E8%8B%B1%E8%AF%AD%E6%95%99%E5%AD%A6%E5%8F%82%E8%80%83%E4%B9%A61%EF%BC%88%E7%AC%AC%E4%BA%8C%E7%89%88%EF%BC%89.pdf";
const popupId = "popup-" + linkId;
initializeDownloadLink(linkId, popupId, actualLink);
});
document.addEventListener("DOMContentLoaded",function(){f1().then(()=>{if(client){const t="download-1";const o="resources\/files\/NEUsitefiles\/新通用大学英语教学参考书1第二版.pdf";const n="popup-"+t;let e=client.signatureUrl(o,{expires:20,response:{"content-disposition":"attachment"}});e=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");initializeDownloadLink(t,n,e)}else{console.error("Failed to initialize OSS client due to decryption error.")}}).catch(e=>{console.log("Error initializing OSS Client:",e)})});
</script>
<hr>

View File

@ -451,19 +451,17 @@
<p><strong>标签:</strong>#PDF #选择题 #毛概 #毛泽东思想与中国特色社会主义体系概论 #复习指南 #选择题 #毛概题库</p>
</blockquote>
<p>此处收录了《毛泽东思想与中国特色社会主义体系概论》复习指南及选择题。此文件不支持预览,请手动下载。</p>
<script src="https://download.xn--xhq44jb2fzpc.com/upload/dl.js?v=1.0.1"></script>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-6.20.0.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/download/downloadjm.js"></script>
<a href="javascript:void(0);" id="download-1" class="download-link">点击下载</a>
<div id="popup-download-1" class="popup">
<div class="popup-title">下载安全保护中</div>
<div class="popup-content">3秒后将开始下载...</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const linkId = "download-1";
const actualLink = "https:\/\/download.xn--xhq44jb2fzpc.com\/resources\/files\/毛概\/毛概复习指南及选择题.zip";
const popupId = "popup-" + linkId;
initializeDownloadLink(linkId, popupId, actualLink);
});
document.addEventListener("DOMContentLoaded",function(){f1().then(()=>{if(client){const t="download-1";const o="resources\/files\/毛概\/毛概复习指南及选择题.zip";const n="popup-"+t;let e=client.signatureUrl(o,{expires:20,response:{"content-disposition":"attachment"}});e=e.replace("emberimg.oss-cn-beijing.aliyuncs.com","download.xn--xhq44jb2fzpc.com");initializeDownloadLink(t,n,e)}else{console.error("Failed to initialize OSS client due to decryption error.")}}).catch(e=>{console.log("Error initializing OSS Client:",e)})});
</script>
<hr>

View File

@ -529,7 +529,7 @@
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/marked.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.1"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.2"></script>
<div id="1">
<form onsubmit="event.preventDefault(); a('1', document.getElementById('password-1').value, 'https:\/\/download.xn--xhq44jb2fzpc.com\/password\/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%AD%94%E6%A1%88\/2021-2022-%E7%A7%8B%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0-%E5%8E%86%E5%B1%8A%E8%80%83%E9%A2%98-%E7%AD%94%E6%A1%88.json');" class="password-form">
<input type="password" id="password-1" placeholder="为本站投稿资源以获取查看此内容的密码。" class="text">
@ -608,7 +608,7 @@
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/marked.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.1"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.2"></script>
<div id="2">
<form onsubmit="event.preventDefault(); a('2', document.getElementById('password-2').value, 'https:\/\/download.xn--xhq44jb2fzpc.com\/password\/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%AD%94%E6%A1%88\/2020-2021-%E7%A7%8B%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0-%E5%8E%86%E5%B1%8A%E8%80%83%E9%A2%98-%E7%AD%94%E6%A1%88.json');" class="password-form">
<input type="password" id="password-2" placeholder="为本站投稿资源以获取查看此内容的密码。" class="text">
@ -687,7 +687,7 @@
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/marked.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.1"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.2"></script>
<div id="3">
<form onsubmit="event.preventDefault(); a('3', document.getElementById('password-3').value, 'https:\/\/download.xn--xhq44jb2fzpc.com\/password\/%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0%E7%AD%94%E6%A1%88\/2020-2021-%E6%98%A5%E7%BA%BF%E6%80%A7%E4%BB%A3%E6%95%B0-%E5%8E%86%E5%B1%8A%E8%80%83%E9%A2%98-%E7%AD%94%E6%A1%88.json');" class="password-form">
<input type="password" id="password-3" placeholder="为本站投稿资源以获取查看此内容的密码。" class="text">

View File

@ -459,7 +459,7 @@
<script src="https://download.xn--xhq44jb2fzpc.com/password/crypto-js.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/marked.min.js"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.1"></script>
<script src="https://download.xn--xhq44jb2fzpc.com/password/pt.js?v=1.0.2"></script>
<div id="1">
<form onsubmit="event.preventDefault(); a('1', document.getElementById('password-1').value, 'https:\/\/download.xn--xhq44jb2fzpc.com\/password\/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95\/data.json');" class="password-form">
<input type="password" id="password-1" placeholder="为本站投稿资源以获取查看此内容的密码。" class="text">

Some files were not shown because too many files have changed in this diff Show More