function-interposition

Interposing of OS X system calls

℡╲_俬逩灬. 提交于 2019-12-01 18:21:25
I need to interpose (get my functions called instead of the original functions) some OS X system calls to overcome a flaw in a piece of closed-source software. Preferably, the resulting solution would work under 10.5 (Leopard) and newer, but I might be able to require 10.6 (Snow Leopard) if the argument were strong enough. Preferably, the resulting solution would be an executable, but I might settle for a script. Preferably, the resulting solution would be able to interpose ("steal the vectors") even after the target application is running, but I could settle for a technology that must inject

Interposing of OS X system calls

流过昼夜 提交于 2019-12-01 18:18:28
问题 I need to interpose (get my functions called instead of the original functions) some OS X system calls to overcome a flaw in a piece of closed-source software. Preferably, the resulting solution would work under 10.5 (Leopard) and newer, but I might be able to require 10.6 (Snow Leopard) if the argument were strong enough. Preferably, the resulting solution would be an executable, but I might settle for a script. Preferably, the resulting solution would be able to interpose ("steal the

Capturing Display / Monitor Images, Sending Keyboard Input on Linux

情到浓时终转凉″ 提交于 2019-11-30 16:08:33
问题 I need to process images sent to my laptop's video display, and I need to send keyboard input to my Linux system, using a C++ or shell program. My goal is to process images that are part of an FPS game, then taking action inside that game (hence the keyboard input) based on these images. Instead of trying to understand (if it's even possible) how to interface to game X or Y, using some API, I figured this is the quickest way to interface to any game, hijacking Linux input and output somehow.

Capturing Display / Monitor Images, Sending Keyboard Input on Linux

穿精又带淫゛_ 提交于 2019-11-30 16:08:31
I need to process images sent to my laptop's video display, and I need to send keyboard input to my Linux system, using a C++ or shell program. My goal is to process images that are part of an FPS game, then taking action inside that game (hence the keyboard input) based on these images. Instead of trying to understand (if it's even possible) how to interface to game X or Y, using some API, I figured this is the quickest way to interface to any game, hijacking Linux input and output somehow. Is there any way to do this without any kernel, or device driver hacking? I used recordmydesktop to

Function interposition in Linux without dlsym

陌路散爱 提交于 2019-11-27 14:10:45
I'm currently working on a project where I need to track the usage of several system calls and low-level functions like mmap , brk , sbrk . So far, I've been doing this using function interposition: I write a wrapper function with the same name as the function I'm replacing ( mmap for example), and I load it in a program by setting the LD_PRELOAD environment variable. I call the real function through a pointer that I load with dlsym . Unfortunately, one of the functions I want to wrap, sbrk , is used internally by dlsym , so the program crashes when I try to load the symbol. sbrk is not a

Function interposition in Linux without dlsym

拥有回忆 提交于 2019-11-26 16:39:21
问题 I'm currently working on a project where I need to track the usage of several system calls and low-level functions like mmap , brk , sbrk . So far, I've been doing this using function interposition: I write a wrapper function with the same name as the function I'm replacing ( mmap for example), and I load it in a program by setting the LD_PRELOAD environment variable. I call the real function through a pointer that I load with dlsym . Unfortunately, one of the functions I want to wrap, sbrk ,