今天和一道题玩了捉迷藏

同步: https://zhufn.fun/archives/今天和一道题玩了捉迷藏(xxxorrr)/
当你在main中找不到程序逻辑的时候,如何考虑?

  1. 有没有注册异常处理程序。还有像__cxa_atexit 这样退出时执行的函数。

  2. __lib_start_main的参数中有用于初始化的函数。顺便贴一下它的定义:

    int __libc_start_main(
    	int (*main) (int, char * *, char * *), 
    	int argc, 
    	char * * ubp_av, 
    	void (*init) (void), 
    	void (*fini) (void), 
    	void (*rtld_fini) (void), 
    	void (* stack_end)
    );
    

    • performing any necessary security checks if the effective user ID is
    not the same as the real user ID.
    • initialize the threading subsystem.
    • registering the rtld_fini to release resources when this dynamic shared object exits (or is unloaded).
    • registering the fini handler to run at program exit.
    • calling the initializer function (**init*)().
    • calling main() with appropriate arguments.
    • calling exit() with the return value from main().

  3. 通过字符串或字节数组的交叉引用,可以找出隐藏的操作。

所以当你遇到了灵异事件的时候,不要惊慌,不然连个难度1的题的隐藏操作都找不出来。
cnblogs

posted @   ZhuFN  阅读(27)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 【杂谈】分布式事务——高大上的无用知识?
欢迎阅读『今天和一道题玩了捉迷藏』
点击右上角即可分享
微信分享提示