Posts List

博客迁移到 Hugo

感觉用 Hexo 编译博客越来越慢了,而且 Hexo 社区也不怎么活跃,索性把博客迁移到了 Hugo。虽然我个人很讨厌 Golang,但是 Hugo 的用户体验还是不错的。之前用 Hexo 的时候要修改主题的内容就要修改主题目录内的文件(哪怕只是加菜单),给自动化构建带来了很大的困扰,而 Hugo 就没有这种问题。那么这篇讲讲自动化构建吧。 ……

编写自动化逆向工具

最近在做梆梆的脚本,这个游戏用 ProtoBuf 搭载通信数据。最开始的思路是先抓包知道 ProtoBuf 的 *field_id*,然后从逆向数据里得出 *field_name*,最后构建出 ProtoBuf。干了几天之后发现好累,而且有的时候数据包是不全的。 然后发现这个游戏的 ProtoBuf 是用 ProtoBuf-Net 这个库实现的,特点是每个字段都用 Attribute 标注字段序号,而不是官方的 protoc 根据 .proto 文件生成代码的形式。那么问题就简单了,只要能获取到 Attribute 就可以分析出数据。 ……

The Design of a New REST API Framework in Node.js

Abstract I am working on Sandra as a backend engineer, constructing a full-restified API. I found Koa is quite a satisfying solution, but not enough. As known to all, REST specification utilizes a set of HTTP features to accomplish schematic features. A good case in point is that if the client requests with Accept: application/json, then the server is expected to return a JSON content. However, in Koa, such features should be implemented on my own, and no other frameworks, even the Hapi, provides a simple enough API to fulfill the requirement. So I have decided to develop my own REST API framework, Ulla, both resolving such problem and utilizing the decorator features in TypeScript. ……