mirror of
https://github.com/Estom/notes.git
synced 2026-04-13 16:29:42 +08:00
总结了下hook思想
This commit is contained in:
@@ -22,3 +22,13 @@
|
||||
* 如果框架没有预留钩子可以使用破坏性的方式实现一些细节的定义。如java的反射和字节码注入等。
|
||||
|
||||
Hook 原意是指钩子,它表示的就是在某个函数的上下文做自定义的处理来实现我们想要的黑科技。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Hooks就像一些外来的钩子,在源代码之间钩取(窃听)一些信息,当它捕捉到自己感兴趣的事发生,就拦截下来,让自己的代码执行一下,处理一下这个信息,然后再放出去继续之前的进程。这样就可以在不用改变源代码的情况下,做一些别的事情,比方说监控、分析和一些恶意的事。
|
||||
|
||||
> 参考文献:https://www.cnblogs.com/ArsenalfanInECNU/p/12871887.html
|
||||
>
|
||||
> https://zh.wikipedia.org/wiki/%E9%92%A9%E5%AD%90%E7%BC%96%E7%A8%8B
|
||||
|
||||
BIN
设计模式/image/1.8整体局部思想/1704639706282.png
Normal file
BIN
设计模式/image/1.8整体局部思想/1704639706282.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 476 KiB |
BIN
设计模式/image/1.8整体局部思想/1704639766373.png
Normal file
BIN
设计模式/image/1.8整体局部思想/1704639766373.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Reference in New Issue
Block a user