Skip to content

Instantly share code, notes, and snippets.

View mdabir1203's full-sized avatar
🎯
Focusing

uknowWho mdabir1203

🎯
Focusing
View GitHub Profile
class PathTraversalSanitizer
{
@MethodHook(type = HookType.AFTER, targetClassName = "java.io.File", targetMethod = "<init>", targetMethodDescriptor = "(Ljava/lang/String;)")
public static void fileConstructorHook(MethodHandle method, Object thisObject, Object[] arguments, int hookId, Object returnValue)
{
File file = (File) thisObject;
String pathname = (String) arguments[0];
try
@mdabir1203
mdabir1203 / gist:9bed9c14b66661fc5c4d013863b1eac0
Created April 4, 2024 00:12
MermaidDiagram(ArenaMemoryManagement)
graph TD
%% Define styles for different components %%
style ExistingCode fill:#FFCCCC,stroke:#000,stroke-width:2px;
style ArenaMemory fill:#CCFFCC,stroke:#000,stroke-width:2px;
style IntegrationChallenges fill:#FFD699,stroke:#000,stroke-width:2px;
style Integration fill:#CCDDFF,stroke:#000,stroke-width:2px;
%% Existing Codebase %%
subgraph ExistingCodebase
A[Module A] -.-> |Traditional Memory Management| MA