一个用 WPF 写的查看所有宝箱位置和状态的小程序,写得很粗糙,高 DPI 下有 BUG。
从程序中快速获取 zip 密码
大概半年前,在我尚未远离汉化,不懂珍惜生命的时候,发现一些游戏的资源是打包在有密码的 zip 里的。 虽然不用分析封包很开心,不过找 zip 密码也是很麻烦的事情。
后来拍了拍脑袋,翻了翻 zlib 源码,发现个 init_keys 函数:
根据注释和代码,猜测第一个参数 passwd 就是明文密码。
接下来就简单了:
- OD 加载
- 查找这三个 key 定位 init_keys
- 下条件断点输出 passwd
- 收工
Post with a Background Image
Here be a sample post with a custom background image. To utilize this “feature” just add the following YAML to a post’s front matter.
This little bit of YAML makes the assumption that your background image asset is in the
folder. If you place it somewhere else or are hotlinking from the web, just include the full http(s):// URL. Either way you should have a background image that is tiled.1
/images
If you want to set a background image for the entire site just add
to your 1
background: filename.png
and BOOM — background images on every page!1
_config.yml
Syntax Highlighting Post
Syntax highlighting is a feature that displays source code, in different colors and fonts according to the category of terms. This feature facilitates writing in a structured language such as a programming language or a markup language as both structures and syntax errors are visually distinct. Highlighting does not affect the meaning of the text itself; it is intended only for human readers.
Pygments Code Blocks
To modify styling and highlight colors edit
and compile 1
/assets/less/pygments.less
with your favorite preprocessor. Or edit 1
main.less
if that’s your thing, the classes you want to modify all begin with 1
main.css
.1
.highlight
Line numbering enabled:
1
2
3
4
5
6
7
8
<nav class="pagination" role="navigation">
{% if page.previous %}
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
{% endif %}
{% if page.next %}
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
{% endif %}
</nav><!-- /.pagination -->
Standard Code Block
1
2
3
4
5
6
7
8
<nav class="pagination" role="navigation">
{% if page.previous %}
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
{% endif %}
{% if page.next %}
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
{% endif %}
</nav><!-- /.pagination -->
Fenced Code Blocks
To modify styling and highlight colors edit
and compile 1
/assets/less/coderay.less
with your favorite preprocessor. Or edit 1
main.less
if that’s your thing, the classes you want to modify all begin with 1
main.css
. Line numbers and a few other things can be modified in 1
.coderay
under 1
_config.yml
.1
coderay
1
2
3
4
5
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
1
2
3
4
5
6
7
8
<nav class="pagination" role="navigation">
{% if page.previous %}
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
{% endif %}
{% if page.next %}
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
{% endif %}
</nav><!-- /.pagination -->
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Jekyll
class TagIndex < Page
def initialize(site, base, dir, tag)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'tag_index.html')
self.data['tag'] = tag
tag_title_prefix = site.config['tag_title_prefix'] || 'Tagged: '
tag_title_suffix = site.config['tag_title_suffix'] || '–'
self.data['title'] = "#{tag_title_prefix}#{tag}"
self.data['description'] = "An archive of posts tagged #{tag}."
end
end
end
Sample Link Post
This theme supports link posts, made famous by John Gruber. To use, just add
to the post’s YAML front matter and you’re done.1
link: http://url-you-want-linked