0%

@TOC

申明:本文只做学习交流使用,严禁任何组织和个人通过转发、转载等方式进行传播,因此导致的法律后果与本文作者无关。

小菜鸡昨晚正在积极进补雷神大大的课程的时候:
在这里插入图片描述
老板的消息划破了寂静的夜空,也打断了我学习的脚步:
在这里插入图片描述
按照我的尿性,这种时候我肯定偷偷装死没跑了。
不过这个漏洞还是引起了我的兴趣,毕竟热度就那么多,蹭一蹭就没有了,我肯定也要蹭一蹭了。于是在昨晚瞎整了一晚上没结果后,今天上班的时候划水就把这整个利用过程给跑通了…..
果然上班划水才是生产力啊。

阅读全文 »

检查网站是否开启了pjax
查看主题配置文件,搜索关键字pjax
如果pjax的值为true,则证明开启了,此时若要使得内嵌js在每次访问时都能够执行在js标签上添加data-pjax 属性即可

1
2
3
4
<script data-pjax type="text/javascript">
xxxx
</script>

我的hexo使用的时hexo-renderer-marked渲染引擎,在该引擎的lib/renderer.js文件中搜索img关键字 添加标签属性referrerpolicy="no-referrer"即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
image({ href, title, text }) {
const { options } = this;
const { hexo } = options;
const { relative_link } = hexo.config;
const { lazyload, figcaption, prependRoot, postPath } = options;

if (!/^(#|\/\/|http(s)?:)/.test(href) && !relative_link && prependRoot) {
if (!href.startsWith('/') && !href.startsWith('\\') && postPath) {
const PostAsset = hexo.model('PostAsset');
// findById requires forward slash
const asset = PostAsset.findById(join(postPath, href.replace(/\\/g, '/')));
// asset.path is backward slash in Windows
if (asset) href = asset.path.replace(/\\/g, '/');
}
href = url_for.call(hexo, href);
}

let out = `<img src="${encodeURL(href)}" referrerpolicy="no-referrer"`;
if (text) out += ` alt="${escape(text)}"`;
if (title) out += ` title="${escape(title)}"`;
if (lazyload) out += ' loading="lazy"';

out += '>';
if (figcaption && text) {
return `<figure>${out}<figcaption aria-hidden="true">${text}</figcaption></figure>`;
}
return out;
}