加载中...
分类 - 漏洞原理
2021
Java ysoserial学习之CommonsCollections5(四)
Java ysoserial学习之CommonsCollections5(四)
Java ysoserial学习之CommonsCollections6(三)
Java ysoserial学习之CommonsCollections6(三)
Java ysoserial学习之CommonsCollections1(二)
Java ysoserial学习之CommonsCollections1(二)
Java ysoserial学习之URLDNS(一)
Java ysoserial学习之URLDNS(一)
Java反序列化漏洞分析(二)-Shiro550
Java反序列化漏洞分析(二)-Shiro550
Java反序列化漏洞分析(一)-Shiro550
Java反序列化漏洞分析(一)-Shiro550
初探Java反序列化漏洞(二)
150) { content = content.substring(0,150) + '...' } return content } const findTrueUrl = (array) => { Promise.all(array.map(item => fetch(item.url).then(resp => resp.json()).then(data => { const urlArray = data.body.match(/(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?/ig) if (data.user.login === 'utterances-bot') { return urlArray.pop() } else { return urlArray.shift() } }) )).then(res => { array = array.map((i,index)=> { return { ...i, url: res[index] } }) saveToLocal.set('github-newest-comments', JSON.stringify(array), 10/(60*24)) generateHtml(array) }); } const getComment = () => { fetch('https://api.github.com/repos/yhy0/blog_comments/issues/comments?sort=updated&direction=desc&per_page=6&page=1',{ "headers": { Accept: 'application/vnd.github.v3.html+json' } }) .then(response => response.json()) .then(data => { const githubArray = data.map(item => { return { 'avatar': item.user.avatar_url, 'content': changeContent(item.body_html), 'nick': item.user.login, 'url': item.issue_url, 'date': item.updated_at, 'githubUrl': item.html_url } }) findTrueUrl(githubArray) }).catch(e => { const $dom = document.querySelector('#card-newest-comments .aside-list') $dom.innerHTML= "无法获取评论,请确认相关配置是否正确" }) } const generateHtml = array => { let result = '' if (array.length) { for (let i = 0; i < array.length; i++) { result += '
' if (true) { const name = 'src' result += `${array[i].nick}` } result += `
${array[i].content}
${array[i].nick} /
` } } else { result += '没有评论' } let $dom = document.querySelector('#card-newest-comments .aside-list') $dom.innerHTML= result window.lazyLoadInstance && window.lazyLoadInstance.update() window.pjax && window.pjax.refresh($dom) } const newestCommentInit = () => { if (document.querySelector('#card-newest-comments .aside-list')) { const data = saveToLocal.get('github-newest-comments') if (data) { generateHtml(JSON.parse(data)) } else { getComment() } } } newestCommentInit() document.addEventListener('pjax:complete', newestCommentInit) })