This is simple PoC that allows you to define AST pattern you want to process and make some actions with them
Current code contains templates for:
- Replacing inlined strlen called on global variable
- Auto renaming globals in expressions like global_var = func(arg1, "newglobalname")
- Auto renaming structure fields like glob_str.f0 = sub_cafebabe to glob_str.sub_cafebabe = sub_cafebabe
FULL REPO HERE:
Quote:
https://github.com/sibears/HRAST
|