Wirekit Interface #2

Open
opened 2025-06-26 20:37:33 +00:00 by YJN · 0 comments
Owner

Wirekits implement an "init" function that takes as parameter a pointer to a collection of syscall hooks (and additional context data). The first 1024 or so are in an array, the others in a binary search tree. During initialization, provided functions can be used to add hooks.

Next, a "run" function is called with the provided command line arguments. A provided function can be used to make "rewire" run a command in the adjusted environment. A call to this function should typically be the last step in "run".

Each hook takes a process control block pointer as argument. Additional functions are provided to e.g. interact with tracee memory.

Wirekits implement an "init" function that takes as parameter a pointer to a collection of syscall hooks (and additional context data). The first 1024 or so are in an array, the others in a binary search tree. During initialization, provided functions can be used to add hooks. Next, a "run" function is called with the provided command line arguments. A provided function can be used to make "rewire" run a command in the adjusted environment. A call to this function should typically be the last step in "run". Each hook takes a process control block pointer as argument. Additional functions are provided to e.g. interact with tracee memory.
YJN added this to the Rewire v1.0 milestone 2025-06-26 20:37:33 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: YJN/rewire#2
No description provided.