<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>算法 on Timmoc 的技术小屋</title>
    <link>https://t1mmoc.github.io/tags/%E7%AE%97%E6%B3%95/</link>
    <description>Recent content in 算法 on Timmoc 的技术小屋</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sat, 17 Oct 2026 16:28:00 +0800</lastBuildDate>
    <atom:link href="https://t1mmoc.github.io/tags/%E7%AE%97%E6%B3%95/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>【AIGC】一段 40 行的字符串打乱实验：把 memcpy 的 4 改成 1，它才肯还原</title>
      <link>https://t1mmoc.github.io/posts/2026-10-17-string-shuffle/</link>
      <pubDate>Sat, 17 Oct 2026 16:28:00 +0800</pubDate>
      <guid>https://t1mmoc.github.io/posts/2026-10-17-string-shuffle/</guid>
      <description>旧目录里有个 ConsoleApplication2，40 行代码把 upx!shell_1s_a_compression_she11 打乱再还原，看着像字符串混淆的练习。把两段循环换成脚本跑一遍才发现它根本还原不回来：第三句 memcpy 写的是 4 字节，而变量里只有 1 字节有效，剩下三个 0x00 把后面三个字符直接抹平了，输出只剩 ps!x 四个字符。改成 1 之后立刻互逆，因为那三段交换共用下标、构成一条链，逆运算必须反着走。另外它只动了前 14 个字节，尾巴上的 _compression_she11 原样留着——这类混淆对字符串搜索几乎不起作用。</description>
    </item>
  </channel>
</rss>
