Posts
Rust Global Variable and Impl Singleton elegantly
· ☕ 3 min read
Although the mechanism of Rust Lifetime suggest people using local variable guaranteed to ownership is correct, we inevitably need to use global variables in some situations. Rust designer have added many limitations to guarantee that global variables are safe in terms of memory and threading, compared to other languages such as C/C++ and Python. These limitations indeed help developers avoid lots of crash or unexpected issues that are difficult to

Rust FFI
· ☕ 5 min read
Sometimes, we need to implement some libs using rust, and these libs should be loaded by other programs, which means we have to implement some interface for these libs based on the specific foreign interface standard. Usually, this specific standard is called FFI(Foreign Function Interface). It is an important mechanism that allows libraries to access functions from other programming language. In this way, we can use this mechanism call C functions in Rust language or call Rust functions in C language.

Rust Hook
· ☕ 6 min read
With the accelerating advancement of Rust language, more and more tech companies are recompiling their programs using Rust, especially client security software. However, there are few documents available that explain how to hook any functions using Rust. Therefore, I have written this blog to help you understand how to hook programs using the retour-rs crate for Rust. In the C language, two hook libraries, detour and MinHook, are commonly used and both have been implemented in Rust.

使用Clang-Format格式化代码
· ☕ 8 min read
代码风格一致化和规范化,可以说是一直困扰我多年,并严重干扰我写代码效率的一个巨大难题。我总是会在写的时候思考变量、方法、类的命名,代码块的缩

Vue3 + ElementUI + Flask 速成网站
· ☕ 5 min read
Vue Install Install Node.js 先安装 nodejs 下载 LTS Windows Installer (.msi)然后运行安装就可以了。安装时有一个勾选项是“是否安装其他依赖库”可以不勾选 安装完毕后 node -v 和 npm -v 查看是否

如何向LLVM提交代码
· ☕ 3 min read
这几天给LLVM提了一些Commit,整一个提交过程非常复杂(因为其官方是不接受Github PullRequest的),review也十分严

LLVM Opt view-cfg 优雅展示程序结构
· ☕ 2 min read
在写混淆的时候,经常会遇到一个问题:在实现一些会改变控制流的混淆时,会理不清现在的控制流到底是怎么样的。比如在平坦化时,需要涉及很多移动基本

Windows下优雅使用LLVMPass
· ☕ 6 min read
LLVM16-有bug不建议折腾,究极复杂;16及以上的版本可以玩 本文第一次公布的时候是LLVM12版本,所以最初也是以这个版本的配置来写的

LLVM 调试环境配置
· ☕ 5 min read
感谢@Richar,教我配出了超级方便的LLVM Pass源码级调试环境 Orzzzz 准备工作 按照前一篇博客 LLVM编译与FirstPass 配置好LLVM

LLVM 编译与First Pass
· ☕ 7 min read
要开始正儿八经认真学LLVM了。先吐槽一下,这东西是真的麻烦,编译起来一堆坑,项目还贼大,一编译就是十几分钟至一个小时。还吃电脑各种环境,各

【Design Patterns】创建型模式
· ☕ 9 min read
工厂模式(Factory Method) 意图:定义一个创建对象的接口,让其子类自己决定实例化哪一个工厂类,工厂模式使其创建过程延迟到子类进行。

【Design Patterns】设计模式
· ☕ 3 min read
总的来说就是,越来越觉得自己开发有问题。写东西,我能写,能实现,但是代码越看越丑,尤其是代码量高的一些大项目,写到后面就会觉得语法和结构上各

数据结构课设——赫夫曼编码译码器
· ☕ 9 min read
大家都太强太卷了,人均可视化套接字,逼的本菜鸡被迫也要来卷一下。 为了不落俗套又要为紧张的期末(睡觉)省时间,这次整了个双语言+QT+Sock