https://github.com/sloweax/dlblock
LD_PRELOAD program that forces specified calls to fail
https://github.com/sloweax/dlblock
dlsym hook ld-preload
Last synced: 3 months ago
JSON representation
LD_PRELOAD program that forces specified calls to fail
- Host: GitHub
- URL: https://github.com/sloweax/dlblock
- Owner: sloweax
- License: mit
- Created: 2024-03-07T03:58:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-18T18:15:11.000Z (about 1 year ago)
- Last Synced: 2025-01-25T20:44:50.529Z (5 months ago)
- Topics: dlsym, hook, ld-preload
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
```
usage: dlblock [-b block-list] command [args]
```## Example
```sh
# the program you want to run must be dynamically linkeddlblock -b connect curl google.com # makes every `connect(2)` calls fail
# curl: (7) Failed to connect to google.com port 80 after 22 ms: Couldn't connect to serverdlblock -b open,openat touch file # both `open(2)` and `openat(2)` will fail
# touch: cannot touch 'file': Cannot allocate memory
```## Build
Make sure to have `make` and `gcc` installed
```
git clone https://github.com/sloweax/dlblock
cd dlblock
make install
```