{"id":348368,"date":"2021-02-23T09:42:45","date_gmt":"2021-02-23T01:42:45","guid":{"rendered":"http:\/\/4563.org\/?p=348368"},"modified":"2021-02-23T09:42:45","modified_gmt":"2021-02-23T01:42:45","slug":"%e6%9c%89%e5%81%bf%ef%bc%8c%e8%bf%99%e6%ae%b5php-ase%e5%86%99%e6%b3%95%e6%8d%a2%e6%88%90lua","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=348368","title":{"rendered":"\u6709\u507f\uff0c\u8fd9\u6bb5php ase\u5199\u6cd5\u6362\u6210lua"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>1121744186<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u6709\u507f\uff0c\u8fd9\u6bb5php ase\u5199\u6cd5\u6362\u6210lua<\/h3>\n<p>  \t\tfunction encrypt($string, $key) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; $data = openssl_encrypt($string, &#8216;AES-128-ECB&#8217;, $key, 0);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; $data = strtolower(bin2hex($data));<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; return $data;<br \/>  }<\/p>\n<p>  \u6362\u6210 lua \u89e3\u5bc6\uff0c\u73af\u5883 \u662f \u5b9d\u5854\u7684nginx \u548c lua-resty-string<\/p>\n<p>  \u5927\u6982\u5199\u4e86\u4e2a \u89e3\u5bc6\u4e0d\u4e86\u3002\u3002\u3002<\/p>\n<p>  local aes = require &quot;resty.aes&quot;<br \/>  local str = require &quot;resty.string&quot;<\/p>\n<p>  &#8212; key<br \/>  local aes_128_cbc_md5 = aes:new(&quot;c369d6e2e63fafcfbfb93c9010ce1c9b&quot;)<\/p>\n<p>  ngx.say(&quot;AES 128 CBC (MD5) Decrypted: &quot;, aes_128_cbc_md5:decrypt(&quot;6d4c7278633941496230714f673959456339374d6343672b7a3969342b6c56717159704c73356f41366c673d&quot;))  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>1121744186<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t1222\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>TechBlack<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 TechBlack \u4e8e 2021-2-22 16:58 \u7f16\u8f91 <\/p>\n<p> AES-128-ECB<br \/>  aes_128_cbc_md5 <br \/>  \u8fd9\u90fd\u5bf9\u4e0d\u4e0a \u4f60\u600e\u4e48\u89e3\u5bc6:L<\/p>\n<p>  local aes = require &quot;resty.aes&quot;<br \/>  local str = require &quot;resty.string&quot;<\/p>\n<p>  local aes_decode = aes:new(&quot;c369d6e2e63fafcfbfb93c9010ce1c9b&quot;,nil,aes.cipher(128,&quot;ecb&quot;))<\/p>\n<p>  function hex2bin(hexstr)<br \/>  &nbsp; &nbsp; local str = &quot;&quot;<br \/>  &nbsp; &nbsp; for i = 1, string.len(hexstr) &#8211; 1, 2 do<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;local doublebytestr = string.sub(hexstr, i, i+1);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;local n = tonumber(doublebytestr, 16);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;if 0 == n then<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;str = str .. &#8216;\u00000&#8217;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;else<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;str = str .. string.format(&quot;%c&quot;, n)<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;end<br \/>  &nbsp; &nbsp; end<br \/>  &nbsp; &nbsp; return str<br \/>  end<\/p>\n<p>  local res =aes_decode:decrypt(hex2bin(&quot;6d4c7278633941496230714f673959456339374d6343672b7a3969342b6c56717159704c73356f41366c673d&quot;))<\/p>\n<p>  https:\/\/cdn.jsdelivr.net\/gh\/hishis\/forum-master\/public\/images\/patch.gif\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>icy37785<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u52a0\u5bc6\u65b9\u5f0f\u90fd\u4e0d\u4e00\u6837\uff0c\u79c0\u4e86\uff0c\u54c8\u54c8\u54c8\u54c8\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>host5217<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tAES-128-ECB<br \/>  aes_128_cbc\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>1121744186<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\thost5217 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-2-22 16:50<br \/>  AES-128-ECB<br \/>  aes_128_cbc<\/p>\n<p> \u8bd5\u4e86\u4e0b\u4e5f\u662f\u89e3\u5bc6\u4e0d\u51fa\u6765\uff0c\uff0c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>1121744186<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tTechBlack \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-2-22 16:45<br \/>  AES-128-ECB<br \/>  aes_128_cbc_md5 <br \/>  \u8fd9\u90fd\u5bf9\u4e0d\u4e0a \u4f60\u600e\u4e48\u89e3\u5bc6<\/p>\n<p> \u8fd9\u4e2a\u4e5f \u89e3\u5bc6\u4e0d\u4e86~~ \u80fd\u4e0d\u80fd\u52a0\u4e2aq\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>h20<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tecb\u662f\u52a0\u5bc6\u540e\u6570\u636e\u4e0d\u4f1a\u53d8\u52a8\u7684\uff0ccbc\u6709iv\u6240\u4ee5\u6bcf\u6b21\u7ed3\u679c\u90fd\u4e0d\u4e00\u6837\u7684\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>TechBlack<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t1121744186 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-2-22 17:45<br \/>  \u8fd9\u4e2a\u4e5f \u89e3\u5bc6\u4e0d\u4e86~~ \u80fd\u4e0d\u80fd\u52a0\u4e2aq<\/p>\n<p> \u628ahexbin\u53bb\u6389\uff0c\u5185\u5bb9\u76f4\u63a5\u653e\u8fdb\u53bb\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>1121744186<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tTechBlack \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-2-22 21:03<br \/>  \u628ahexbin\u53bb\u6389\uff0c\u5185\u5bb9\u76f4\u63a5\u653e\u8fdb\u53bb<\/p>\n<p> \u4e00\u6837\u7684 nil\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>1121744186 \u5927\u4f6c\u6709\u8bdd\u8bf4 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/348368"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=348368"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/348368\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348368"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}