Tagged articles
hook
44 articles · Page 1 of 1
This article explains how Spring AI Alibaba’s Agent framework uses Hooks and Interceptors to dynamically control model, tool, and lifecycle contexts, demonstrating the concepts through a complete e‑commerce smart‑customer‑service demo with role‑based tool selection, dynamic prompts, and context compression.
AI AgentInterceptorJava
0 likes · 21 min read

This article delves into the hidden iOS OOM crashes, explains the Jetsam watchdog mechanism, the role of phys_footprint, compares industry solutions, and provides step‑by‑step implementations for monitoring, allocation tracking, and proactive memory‑management strategies to prevent silent terminations.
JetsamMemoryMetricKit
0 likes · 19 min read

This article explores Linux system call hooking by first reviewing syscall fundamentals, then detailing various Hook techniques—including function pointer replacement, LD_PRELOAD, and kernel modules—accompanied by C/C++ examples, and demonstrates practical applications in security monitoring, performance optimization, and debugging across real-world scenarios.
Linuxdebugginghook
0 likes · 29 min read

This article explains the concept of Android Hook, demonstrates how to intercept View.OnClickListener using Java reflection, shows step‑by‑step code for hooking startActivity via ActivityThread instrumentation, and introduces the Xposed framework’s mechanism for system‑wide method interception, providing practical examples and key implementation tips.
AndroidJava ReflectionXposed
0 likes · 12 min read

Learn how to eliminate repetitive pagination logic in Vue-based admin panels by using a custom usePageFetch hook that abstracts page state, loading, error handling, and caching, enabling developers to implement paginated data fetching with just a few lines of code and significantly improve development speed.
JavaScriptPaginationVue
0 likes · 11 min read

This article explains the concepts and implementation of Linux system‑call hooking, covering both user‑space techniques like LD_PRELOAD and kernel‑space methods such as inline patches and kprobes, and shows how to monitor, filter, and secure calls without breaking normal program flow.
LD_PRELOADLinuxhook
0 likes · 36 min read

This article explains the concept of Hook in Android, demonstrates how to intercept View OnClickListener and startActivity using Java reflection and instrumentation, and introduces the Xposed framework for system‑wide method hooking, providing step‑by‑step code examples and practical deployment tips.
API HookAndroidReflection
0 likes · 13 min read

This guide walks through using Frida to hook common Android methods, print stack traces, and extract runtime data, providing ready-to-use code snippets for functions like HashMap.put, ArrayList.add, TextUtils.isEmpty, Base64 encoding, and UI event handling.
AndroidFridaJava
0 likes · 11 min read

This article investigates a recurring text‑to‑speech crash on iOS 17 devices, detailing the EXC_BAD_ACCESS error, analyzing stack traces, exploring internal AVAudioEngine and AUAudioUnit_XPC structures, and presenting two remediation strategies—including a hook‑based approach that safely bypasses problematic dealloc and stop calls.
AVAudioEngineObjective-C++Text-to-Speech
0 likes · 16 min read

This article explains how to use reflection and dynamic proxies to hook the hidden Android Looper.Observer API for detailed message‑dispatch timing, demonstrates code examples for installing and removing the hook, discusses workarounds for hidden‑API restrictions and the .dex loading changes introduced in Android 14.
AndroidHidden APILooper
0 likes · 13 min read

This tutorial explains how to use Python's ctypes library to register, implement, and remove Windows hooks for low‑level keyboard monitoring, providing step‑by‑step code examples that demonstrate hook registration, callback definition, prototype declaration, and cleanup.
KeyloggerPythonctypes
0 likes · 8 min read

This tutorial walks through creating a lightweight Go ORM—covering a custom logger, converting structs to table metadata, implementing basic CRUD operations, handling transactions, and adding hook callbacks—while exposing the core Session data structure and providing a GitHub reference.
GORMGoORM
0 likes · 7 min read

This article explains how Webpack’s plugin system relies on the Tapable library, covering its basic usage, the nine built‑in hook types, advanced features like interceptors and HookMap, and the internal code‑generation mechanism that makes Webpack’s event handling both flexible and high‑performance.
Tapablehook
0 likes · 18 min read

This article explains how to create a generic useList hook for Vue 3 that handles pagination, data fetching, filtering, resetting, exporting, and customizable success/error hooks, complete with TypeScript generics and Element‑Plus UI integration.
Composition APIPaginationTypeScript
0 likes · 13 min read


ByteFEMay 24, 2023 · Frontend Development
This article analyses the conceptual design, possible implementation, and performance advantages of a new React Hook that can be called inside control flow, discusses its future extensions such as usePromise, lazy subscription, and integration with concurrent mode, and provides practical code examples.
Concurrent ModeReactfrontend
0 likes · 13 min read

This article explains the concept of ThinkPHP Hook behaviors, demonstrates how to define custom behavior classes, bind them to tags using Hook::add, trigger them with Hook::listen, and configure tag bindings in tags.php, providing complete code examples for a login scenario.
PHPThinkPHPbehavior
0 likes · 6 min read

This open‑source C++ mock framework leverages Frida‑gum to replace any function—including static, member, virtual, and library calls—at runtime without source changes, offering simple MOCK and MOCK_RETURN macros, call‑count expectations, automatic scope‑based rollback, and cross‑platform support for reliable, non‑intrusive unit testing.
C++FridaMocking
0 likes · 11 min read

The article explains how to use Aspect‑Oriented Programming to globally intercept and rewrite Ajax and JSONP requests—both native and framework based—by extending Function.prototype, overriding DOM methods, and employing ajax‑hook and Axios interceptors, culminating in a runnable demo that redirects traffic from a‑domain to b‑domain.
AJAXAOPAxios
0 likes · 19 min read

Thor is a unified Android container framework that combines Java and native hooking into a lightweight, dynamically loadable module, ensuring backward compatibility, hot‑plug plugin deployment, fault‑tolerant operation, and cloud‑controlled toggling, while real‑world plugins for threads, I/O, privacy, and memory deliver measurable performance and stability gains.
AndroidJavaNative
0 likes · 25 min read

The Thor Container Framework, created by Baidu for its App to meet Hook technology needs, offers standardized Java and Native Hook interfaces through an abstract layer, enabling lightweight, dynamically delivered plugins with hot‑swap capability, cloud‑controlled activation, and robust disaster‑recovery features, supporting use cases such as low‑end optimization, privacy compliance, OOM handling, and pipeline integration.
AndroidDynamic LoadingJava Hook
0 likes · 22 min read

This tutorial explains how to build a Windows keylogger in Python by importing Win32 DLLs with ctypes, registering a low‑level keyboard hook, defining the hook procedure and data structures, and handling installation, event processing, and cleanup, while providing full source code and usage notes.
KeyloggerPythonWin32 API
0 likes · 7 min read

This tutorial explains how to create a Windows key‑logging spy program by registering low‑level hooks through the user32 and kernel32 DLLs, using Python's ctypes library to call the required WinAPI functions, define callback prototypes, and manage hook installation and removal.
KeyloggerPythonSystem Programming
0 likes · 8 min read

This guide demonstrates how to use Frida for Android reverse engineering, covering essential commands, stack tracing, and practical hook scripts for common methods such as HashMap.put, Base64.encodeToString, and UI event listeners, enabling developers to locate and analyze encryption logic within apps.
AndroidFridahook
0 likes · 11 min read

To meet new Chinese privacy regulations, the article presents an mPaaS‑based solution that uses compile‑time Java HOOKs to replace privacy‑sensitive API calls and dangerous permission requests, automatically detecting and logging violations during build and runtime, and providing backend alerts and management tools for compliance.
ASMAndroidBytecode Manipulation
0 likes · 14 min read

The MemCorruption tool, developed by ByteDance's AppHealth team, provides an online, low‑overhead solution for detecting Use‑After‑Free, Double‑Free, and Heap‑Buffer‑Overflow problems in Android applications by hooking memory allocation functions, sampling allocations, and performing invisible SIGSEGV‑based detection.
AndroidNative DebuggingPerformance Monitoring
0 likes · 12 min read


ByteFESep 9, 2021 · Frontend Development
This article explains how to create a reusable React hook that uses two canvas layers to let users select a region on an image, shows a gray‑out overlay with a border during selection, and returns the cropped area as a base64 PNG, including full implementation details and future enhancements.
CanvasImage CroppingJavaScript
0 likes · 12 min read

This article explores obscure Android thread issues—including uncontrolled thread creation, stack memory leaks, and the impact of thread‑priority settings—while presenting monitoring techniques, a pthread hook implementation, and performance considerations to help developers detect and resolve thread‑related crashes.
AndroidThread Leakhook
0 likes · 15 min read

The article introduces JavaTweakHook, a lightweight Android hook framework that avoids Xposed by directly manipulating ART structures, compares it with existing solutions, details the hook process—including method creation, ArtMethod copying, assembly trampolines, and native‑Java integration—and provides compilation, usage, and limitation notes.
AndroidJavaNative
0 likes · 15 min read

This article explains the relationship between Tapable and webpack, detailing how Tapable implements a flexible hook system that powers webpack's plugin architecture, covering core concepts, hook classifications, usage patterns, internal mechanics, and practical examples for building custom webpack plugins.
Tapablehook
0 likes · 19 min read

This article examines Objective‑C method swizzling, compares two common implementation schemes, analyzes 18 inheritance‑hook scenarios for child‑first and parent‑first hook orders, and provides practical recommendations to ensure correct execution order and avoid crashes.
Method SwizzlingObjective-C++hook
0 likes · 14 min read

This article outlines the ThinkPHP framework’s execution flow, detailing the sequence from index.php entry through configuration loading, application generation, class loading, controller action execution, and template rendering, and highlights key classes such as Think\Hook and Think\Behavior.
BackendPHPThinkPHP
0 likes · 2 min read

This article explains how QuNar’s front‑end team built a comprehensive Android SDK privacy monitoring system using a custom Transform, ASM bytecode manipulation, and annotation‑driven hook configurations, detailing both basic and advanced solutions for globally intercepting sensitive API calls and ensuring extensible, version‑independent protection.
ASMAndroidAnnotations
0 likes · 20 min read

This article explains the fundamentals of hooking on iOS, covering Method Swizzle and Facebook's fishhook, detailing the Mach‑O file structure, PIC technique, and providing complete source code examples that demonstrate how to replace system functions such as NSLog at runtime.
FishhookMach-Ohook
0 likes · 22 min read

This article explains what hook functions are, how they work as programmable insertion points in a program flow, provides a simple Python implementation example, and demonstrates their use in popular deep‑learning frameworks such as Keras and mmdetection.
CallbackKerashook
0 likes · 16 min read

This article explains the concept of ThinkPHP Hook behaviors, demonstrates how to define, bind, and trigger custom behavior classes with code examples, and shows how to decouple login logic using event‑like hooks for more maintainable backend development.
BackendDecouplingEvent
0 likes · 6 min read

Android activity startup latency stems from three phases—Pause, Launch, and Render—so optimizing only onCreate often leaves perceived delays; developers can measure each phase via system logs or AOP hooks (Instrumentation, Looper‑Printer, or ActivityThread handler) to pinpoint and reduce bottlenecks.
ActivityAndroidLooper
0 likes · 21 min read

IOCanary is a non‑intrusive Android tool that hooks file I/O APIs and StrictMode to collect operation details, detect main‑thread blocking, small buffers, duplicate reads, and closeable leaks, then reports them for performance analysis and debugging.
AndroidCloseable LeakFile I/O
0 likes · 10 min read

This article explains how Android P refactors the Activity lifecycle handling, details the shift from LAUNCH_ACTIVITY messages to EXECUTE_TRANSACTION processing, and describes the necessary code adaptations for the 分身大师 framework to support dual‑open apps on Android P.
Activity LifecycleAndroidAndroid P
0 likes · 10 min read

This article explains how the Xposed framework works, why it normally requires root, and presents a technical approach using application sandboxing and dual‑app virtualization to enable Xposed modules on non‑root Android phones, including details of framework porting and hook mechanisms.
AndroidRootlessXposed
0 likes · 6 min read

The article explains the challenges of mobile network environments in China, introduces connection migration issues, and presents iOS network monitoring solutions using NSURLProtocol, code injection (Hook) with Method Swizzling, NSProxy, and Fishhook, as well as detailed usage of NSURLSessionTaskMetrics for performance analysis.
FishhookMethod SwizzlingNSURLProtocol
0 likes · 18 min read

This article provides a detailed analysis of the Xposed framework on Android, explaining its purpose, how it integrates with the Zygote process, and step‑by‑step walkthrough of the Hook workflow, including key native methods, ArtMethod manipulation, and example code for method interception.
AndroidArtMethodXposed
0 likes · 8 min read

This article describes how to use root access on an iPhone to locate the lock‑screen notification table view via Cycript, create a THEOS tweak that hooks its insertion method, extract message details, and silently email them, providing a complete iOS jailbreak tutorial.
CycriptTHEOShook
0 likes · 8 min read

This article explains how to perform function-level performance testing on Android applications by leveraging Hook frameworks to monitor each method’s execution time and call count, detailing function selection, class categorization, monitoring levels, data collection, result analysis, and practical implementation considerations.
AndroidFunction Monitoringhook
0 likes · 10 min read

This article explores practical techniques for intercepting and protecting JavaScript APIs—such as setAttribute—using MutationObserver, API hooks, random token naming, property hiding, and recursive iframe monitoring to build a resilient front‑end defense against XSS and other injection attacks.
API interceptionJavaScriptMutationObserver
0 likes · 14 min read
