15 Repos
Intercepting function calls to return predefined values or throw errors to simulate dependencies.
Distinct from Function Call Tracking: Focuses on substituting behavior (stubs) rather than just recording calls (spies).
Explore 15 awesome GitHub repositories matching testing & quality assurance · Function Behavior Replacement. Refine with filters or upvote what's useful.
JSPatch is a JavaScript native bridge and method swizzler that allows for the dynamic injection of logic into a hosted native environment. It functions as a cross-language data mapper and execution engine, enabling the replacement of native function pointers with JavaScript wrappers to modify application behavior at runtime. The project provides the ability to perform runtime application patching by overriding native class methods and object properties. This allows for the modification of application logic and the application of hotfixes using JavaScript code loaded from local files or remote
Replaces native function pointers with JavaScript wrappers to modify class behavior without recompiling the binary.
Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit testing. It provides a collection of spies, stubs, and mocks that replace real function implementations and object methods with controlled substitutes. The project includes a specialized fake timer library for overriding the system clock, allowing the simulation of time progression to trigger timeouts and intervals without waiting for real-time delays. It also features a test sandbox mechanism to group multiple fakes together, ensuring the original state is restored between tes
Simulates specific dependencies by intercepting function calls and returning predefined values or throwing errors.
Better Discord enhances Discord desktop app with new features.
Intercepts and modifies existing Discord functions at runtime to alter behavior without source changes.
Aspects is an aspect-oriented programming library and method hooking framework designed for intercepting and modifying JavaScript function behavior without altering the original source code. It serves as a runtime logic injector that allows for the addition and removal of executable code wrappers from active functions. The library enables the injection of custom logic before or after methods to change application behavior at runtime. It further provides the ability to intercept method calls to capture or override return values before they reach the caller. The framework manages these interce
Swaps original function references with decorated versions at runtime to modify behavior without altering source code.
Mbed TLS is an open-source TLS and DTLS library with a small footprint, designed for embedded systems and IoT devices. It provides a portable cryptographic library that includes symmetric ciphers, hashing, and public-key cryptography, along with a reference implementation of the PSA Cryptography API for standardized cryptographic operations across platforms. The library also offers X.509 certificate management for parsing, validating, and managing certificate chains in secure communications. The library is built around a platform abstraction layer that decouples it from OS-specific services t
Allows overriding time functions for platform portability and certificate expiration validation.
Mbed TLS is a C library that provides a full implementation of the TLS and DTLS protocols for secure network communication, a library of fundamental cryptographic primitives, and a reference implementation of the PSA Cryptography API. It also includes libraries for parsing, validating, and managing X.509 digital certificates, as well as support for integrating hardware cryptoprocessors through the PSA Cryptoprocessor Driver Interface. The library is designed for resource-constrained environments and is built from source with a customizable feature set, allowing developers to select which TLS
Substitutes default time and date functions with platform-specific versions for portability.
Harmony is a library for modifying, replacing, and decorating compiled .NET and Mono methods during execution without altering binary files on disk. It functions as a runtime method patching tool, a CIL instruction manipulator, and a reflection extension for C#. The project provides mechanisms to intercept method execution, allowing custom code to run before or after original methods while maintaining the existing program flow. It enables the analysis and rewriting of Common Intermediate Language instructions to change the internal logic of compiled methods. The toolkit also includes utiliti
Serves as a library for modifying, replacing, and decorating compiled .NET and Mono methods at runtime.
Liger-Kernel is a collection of pre-built fused Triton kernels and patching utilities designed to accelerate large language model training. It provides drop-in kernel replacements for common LLM operations such as RMSNorm, cross-entropy loss, and attention, enabling increased throughput and reduced memory usage while preserving bitwise-exact gradients. The project serves as a toolkit for composing custom model architectures from individual optimized kernels and for patching pre-existing models with minimal code changes. The project distinguishes itself through its ability to perform runtime m
Enables runtime monkey-patching of Hugging Face and Megatron-LM model layers with optimized Triton kernels.
RemoveAdblockThing is a browser extension that removes YouTube's adblock detection popup and skips video ads without triggering the platform's anti-adblock systems. It is designed to maintain an uninterrupted viewing experience by eliminating the intrusive "Ad blocker are not allowed on YouTube" message and automatically bypassing ad detection mechanisms. The extension works by injecting a content script at document_start to intercept and modify page behavior before YouTube's ad detection scripts run. It uses a DOM MutationObserver to monitor the YouTube DOM for ad-related elements and detect
Patches YouTube's runtime scripts by replacing functions responsible for adblock detection logic.
CodeIgniter is a PHP web framework built on the Model-View-Controller pattern, designed for building full-stack web applications. It provides a lightweight toolkit with minimal configuration, organizing application logic into controllers, models, and views for clean separation of concerns. The framework includes a fluent query builder for constructing SQL statements programmatically, PSR-4 autoloading with namespace mapping, and a service-based dependency injection container for managing shared class instances. The framework distinguishes itself through its comprehensive set of built-in tools
Provides a mechanism to replace default global helper functions with custom implementations.
This repository is a collection of technical knowledge and solutions focused on mobile application development, particularly for Android and iOS platforms. It covers a wide range of practical engineering challenges, including hotfix and patching techniques, database management and repair, network communication, logging, and video processing. The content is presented as shared knowledge, documenting real-world problems and their implementations. The project provides detailed guidance on applying hotfixes to running Android applications through multiple methods, such as class replacement, full
Replaces method implementations at runtime using native hooks for immediate bug fixes without restarting the app.
This project is a technical resource and pattern library for building enterprise applications with Python. It serves as a guide for implementing clean architecture, providing a framework for separating core business logic from infrastructure and external frameworks. The material focuses on Domain-Driven Design and the application of architectural patterns to maintain complex business requirements. It provides specific guidance on the Repository pattern for data abstraction, Command-Query Responsibility Segregation for optimizing read and write paths, and the use of dependency inversion to dec
Demonstrates replacing method implementations at runtime to modify application behavior without altering source code.
Pester is a PowerShell testing framework and behavior-driven development tool used to write and run automated tests for scripts and modules. It defines and verifies software behavior through human-readable specifications to validate that code behaves as expected. The project includes a native mocking library that replaces real functions and commands with controlled implementations, allowing for the isolation of code and verification of command invocations without altering the system environment. It also functions as a code coverage tool that measures the percentage of executed lines during te
Intercepts function calls to return predefined values, simulating dependencies by replacing real command behavior.
TransformerLens is a library for mechanistic interpretability research designed to reverse engineer the learned algorithms within large language models. It provides a standardized framework for wrapping diverse transformer architectures, allowing researchers to extract, manipulate, and analyze internal activations and weights through a consistent interface. The project distinguishes itself through a comprehensive system of activation hooks that can capture, patch, and ablate internal tensors during the forward pass. It includes specialized utilities for decomposing fused projections, material
Replaces internal model activations with specific values during a forward pass to test the influence of specific neurons.
Uses runtime method replacement to alter Android framework methods without modifying system files.