PageSourceSearch

https://okaytc.github.io/tags/

html okaytc.github.io collected 2026-10-03 09:42:34 UTC 13,466 bytes, 443 lines download raw bytes

1<!DOCTYPE html>
2<html lang="zh-CN" color-mode="light">
3
4  <head>
5  <meta charset="utf-8">
6  <meta name="viewport" content="width=device-width, initial-scale=1" />
7  <meta name="keywords" content="" />
8  <meta name="author" content="Okaytc" />
9  <meta name="description" content="生活 健身 学习 沉淀" />
10  
11  
12  <title>
13    
14      标签 
15      
16      
17      |
18    
19     Okaytc
20  </title>
21
22  
23    <link rel="apple-touch-icon" href="/images/head-3.jpg">
24    <link rel="icon" href="/images/head-3.jpg">
25  
26
27  <!-- Raleway-Font -->
28  <link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
29
30  <!-- hexo site css -->
31  <link rel="stylesheet" href="/css/main.css" />
32  <link rel="stylesheet" href="//at.alicdn.com/t/font_1886449_67xjft27j1l.css" />
33  <!-- 代码块风格 -->
34  
35    
36<link rel="stylesheet" href="/css/figcaption/mac-block.css">
37
38  
39
40  <!-- jquery3.3.1 -->
41  
42    
42<script defer type="text/javascript" src="/plugins/jquery.min.js"></script>
42
43  
44
45  <!-- fancybox -->
46  
47    <link href="/plugins/jquery.fancybox.min.css" rel="stylesheet">
48    
48<script defer type="text/javascript" src="/plugins/jquery.fancybox.min.js"></script>
48
49  
50  
51<script src="/js/fancybox.js"></script>
51
52
53
54  
55
56  
57
58  
58<script>
59    var html = document.documentElement
60    const colorMode = localStorage.getItem('color-mode')
61    if (colorMode) {
62      document.documentElement.setAttribute('color-mode', colorMode)
63    }
64  </script>
64
65<meta name="generator" content="Hexo 6.3.0"></head>
66
67
68  <body>
69    <div id="app">
70      <div class="header">
71  <div class="avatar">
72    <a href="/">
73      <!-- 头像取消懒加载,添加no-lazy -->
74      
75        <img src="/images/head-3.jpg" alt="">
76      
77    </a>
78    <div class="nickname"><a href="/">Okaytc</a></div>
79  </div>
80  <div class="navbar">
81    <ul>
82      
83        <li class="nav-item" data-path="/">
84          <a href="/">主页</a>
85        </li>
86      
87        <li class="nav-item" data-path="/archives/">
88          <a href="/archives/">文章</a>
89        </li>
90      
91        <li class="nav-item" data-path="/tags/">
92          <a href="/tags/">标签</a>
93        </li>
94      
95        <li class="nav-item" data-path="/friends/">
96          <a href="/friends/">友链</a>
97        </li>
98      
99        <li class="nav-item" data-path="/about/">
100          <a href="/about/">关于</a>
101        </li>
102      
103    </ul>
104  </div>
105</div>
106
107
108<script src="/js/activeNav.js"></script>
108
109
110
111
112      <div class="flex-container">
113        <!-- 文章详情页,展示文章具体内容,url形式:https://yoursite/文章标题/ -->
114<!-- 同时为「标签tag」,「朋友friend」,「分类categories」,「关于about」页面的承载页面,具体展示取决于page.type -->
115
116
117  <!-- LaTex Display -->
118
119  
120    
120<script async type="text/javascript" src="/plugins/mathjax/tex-chtml.js"></script>
120
121  
122  
122<script>
123    MathJax = {
124      tex: {
125        inlineMath: [['$', '$'], ['\\(', '\\)']]
126      }
127    }
128  </script>
128
129
130
131
132
133
134  <!-- clipboard -->
135
136  
137    
137<script async type="text/javascript" src="/plugins/clipboard.min.js"></script>
137
138  
139  
140<script src="/js/codeCopy.js"></script>
140
141
142
143
144
145
146
147  <!-- 标签页 url形式:https://yoursite/tags/ -->
148  <div class="container tag-index">
149    <div>
150      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Java%E5%AE%89%E5%85%A8/" rel="tag">Java安全</a><span class="tag-list-count">17</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java%E5%88%A9%E7%94%A8%E9%93%BE/" rel="tag">java利用链</a><span class="tag-list-count">12</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/php%E5%86%85%E6%A0%B8/" rel="tag">php内核</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/php%E5%AE%89%E5%85%A8/" rel="tag">php安全</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1/" rel="tag">代码审计</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AE%9E%E6%88%98%E8%AE%B0%E5%BD%95/" rel="tag">实战记录</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/" rel="tag">漏洞复现</a><span class="tag-list-count">16</span></li></ul>
151    </div>
152  </div>
153  
154
155  
156
157  
158
159  
160
161  
162
163        
164<div class="footer">
165  <div class="social">
166    <ul>
167      
168        <li>
169          <a title="github" target="_blank" rel="noopener" href="https://github.com/Okaytc">
170            <i class="iconfont icon-github"></i>
171          </a>
172        </li>
173      
174    </ul>
175  </div>
176  
177    
178    <div class="footer-more">
179      
180        <a href="https://okaytc.github.io/">Copyright © Okaytc 2022</a>
181        
182    </div>
183  
184    
185    <div class="footer-more">
186      
187        <a href="https://okaytc.github.io/">一个热爱健身的脚本小子</a>
188        
189    </div>
190  
191  
192</div>
193
194      </div>
195
196      <div class="tools-bar">
197        <div class="back-to-top tools-bar-item hidden">
198  <a href="javascript: void(0)">
199    <i class="iconfont icon-chevronup"></i>
200  </a>
201</div>
202
203
204<script src="/js/backtotop.js"></script>
204
205
206
207
208        
209  <div class="search-icon tools-bar-item" id="search-icon">
210    <a href="javascript: void(0)">
211      <i class="iconfont icon-search"></i>
212    </a>
213  </div>
214
215  <div class="search-overlay hidden">
216    <div class="search-content" tabindex="0">
217      <div class="search-title">
218        <span class="search-icon-input">
219          <a href="javascript: void(0)">
220            <i class="iconfont icon-search"></i>
221          </a>
222        </span>
223        
224          <input type="text" class="search-input" id="search-input" placeholder="搜索...">
225        
226        <span class="search-close-icon" id="search-close-icon">
227          <a href="javascript: void(0)">
228            <i class="iconfont icon-close"></i>
229          </a>
230        </span>
231      </div>
232      <div class="search-result" id="search-result"></div>
233    </div>
234  </div>
235
236  
236<script type="text/javascript">
237    var inputArea = document.querySelector("#search-input")
238    var searchOverlayArea = document.querySelector(".search-overlay")
239
240    inputArea.onclick = function() {
241      getSearchFile()
242      this.onclick = null
243    }
244
245    inputArea.onkeydown = function() {
246      if(event.keyCode == 13)
247        return false
248    }
249
250    function openOrHideSearchContent() {
251      let isHidden = searchOverlayArea.classList.contains('hidden')
252      if (isHidden) {
253        searchOverlayArea.classList.remove('hidden')
254        document.body.classList.add('hidden')
255        // inputArea.focus()
256      } else {
257        searchOverlayArea.classList.add('hidden')
258        document.body.classList.remove('hidden')
259      }
260    }
261
262    function blurSearchContent(e) {
263      if (e.target === searchOverlayArea) {
264        openOrHideSearchContent()
265      }
266    }
267
268    document.querySelector("#search-icon").addEventListener("click", openOrHideSearchContent, false)
269    document.querySelector("#search-close-icon").addEventListener("click", openOrHideSearchContent, false)
270    searchOverlayArea.addEventListener("click", blurSearchContent, false)
271
272    var searchFunc = function (path, search_id, content_id) {
273      'use strict';
274      var $input = document.getElementById(search_id);
275      var $resultContent = document.getElementById(content_id);
276      $resultContent.innerHTML = "<ul><span class='local-search-empty'>首次搜索,正在载入索引文件,请稍后……<span></ul>";
277      $.ajax({
278        // 0x01. load xml file
279        url: path,
280        dataType: "xml",
281        success: function (xmlResponse) {
282          // 0x02. parse xml file
283          var datas = $("entry", xmlResponse).map(function () {
284            return {
285              title: $("title", this).text(),
286              content: $("content", this).text(),
287              url: $("url", this).text()
288            };
289          }).get();
290          $resultContent.innerHTML = "";
291
292          $input.addEventListener('input', function () {
293            // 0x03. parse query to keywords list
294            var str = '<ul class=\"search-result-list\">';
295            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
296            $resultContent.innerHTML = "";
297            if (this.value.trim().length <= 0) {
298              return;
299            }
300            // 0x04. perform local searching
301            datas.forEach(function (data) {
302              var isMatch = true;
303              var content_index = [];
304              if (!data.title || data.title.trim() === '') {
305                data.title = "Untitled";
306              }
307              var orig_data_title = data.title.trim();
308              var data_title = orig_data_title.toLowerCase();
309              var orig_data_content = data.content.trim().replace(/<[^>]+>/g, "");
310              var data_content = orig_data_content.toLowerCase();
311              var data_url = data.url;
312              var index_title = -1;
313              var index_content = -1;
314              var first_occur = -1;
315              // only match artiles with not empty contents
316              if (data_content !== '') {
317                keywords.forEach(function (keyword, i) {
318                  index_title = data_title.indexOf(keyword);
319                  index_content = data_content.indexOf(keyword);
320
321                  if (index_title < 0 && index_content < 0) {
322                    isMatch = false;
323                  } else {
324                    if (index_content < 0) {
325                      index_content = 0;
326                    }
327                    if (i == 0) {
328                      first_occur = index_content;
329                    }
330                    // content_index.push({index_content:index_content, keyword_len:keyword_len});
331                  }
332                });
333              } else {
334                isMatch = false;
335              }
336              // 0x05. show search results
337              if (isMatch) {
338                str += "<li><a href='" + data_url + "' class='search-result-title'>" + orig_data_title + "</a>";
339                var content = orig_data_content;
340                if (first_occur >= 0) {
341                  // cut out 100 characters
342                  var start = first_occur - 20;
343                  var end = first_occur + 80;
344
345                  if (start < 0) {
346                    start = 0;
347                  }
348
349                  if (start == 0) {
350                    end = 100;
351                  }
352
353                  if (end > content.length) {
354                    end = content.length;
355                  }
356
357                  var match_content = content.substr(start, end);
358
359                  // highlight all keywords
360                  keywords.forEach(function (keyword) {
361                    var regS = new RegExp(keyword, "gi");
362                    match_content = match_content.replace(regS, "<span class=\"search-keyword\">" + keyword + "</span>");
363                  });
364
365                  str += "<p class=\"search-result-abstract\">" + match_content + "...</p>"
366                }
367                str += "</li>";
368              }
369            });
370            str += "</ul>";
371            if (str.indexOf('<li>') === -1) {
372              return $resultContent.innerHTML = "<ul><span class='local-search-empty'>没有找到内容,请尝试更换检索词。<span></ul>";
373            }
374            $resultContent.innerHTML = str;
375          });
376        },
377        error: function(xhr, status, error) {
378          $resultContent.innerHTML = ""
379          if (xhr.status === 404) {
380            $resultContent.innerHTML = "<ul><span class='local-search-empty'>未找到search.xml文件,具体请参考:<a href='https://github.com/zchengsite/hexo-theme-oranges#configuration' target='_black'>configuration</a><span></ul>";
381          } else {
382            $resultContent.innerHTML = "<ul><span class='local-search-empty'>请求失败,尝试重新刷新页面或稍后重试。<span></ul>";
383          }
384        }
385      });
386      $(document).on('click', '#search-close-icon', function() {
387        $('#search-input').val('');
388        $('#search-result').html('');
389      });
390    }
391
392    var getSearchFile = function() {
393        var path = "/search.xml";
394        searchFunc(path, 'search-input', 'search-result');
395    }
396  </script>
396
397
398
399
400
401        
402  <div class="tools-bar-item theme-icon" id="switch-color-scheme">
403    <a href="javascript: void(0)">
404      <i id="theme-icon" class="iconfont icon-moon"></i>
405    </a>
406  </div>
407
408  
409<script src="/js/colorscheme.js"></script>
409
410
411
412
413
414
415        
416  
417    <div class="share-icon tools-bar-item">
418      <a href="javascript: void(0)" id="share-icon">
419        <i class="iconfont iconshare"></i>
420      </a>
421      <div class="share-content hidden">
422        
423          <a class="share-item" href="https://twitter.com/intent/tweet?text=' + tags + '&url=' + https%3A%2F%2Fokaytc.github.io%2Ftags%2Findex.html + '" target="_blank" title="Twitter">
424            <i class="iconfont icon-twitter"></i>
425          </a>
426        
427        
428          <a class="share-item" href="https://www.facebook.com/sharer.php?u=https://okaytc.github.io/tags/index.html" target="_blank" title="Facebook">
429            <i class="iconfont icon-facebooksquare"></i>
430          </a>
431        
432      </div>
433    </div>
434  
435  
436<script src="/js/shares.js"></script>
436
437
438
439
440      </div>
441    </div>
442  </body>
443</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.