Git Product home page Git Product logo

ld_preload_hacks's Introduction

This is a tiny helpers-workarounds for fixing bugs and/or adding new feature to
programs available only in binary form.

By using system linker feature LD_PRELOAD, it's possible intercepts various
system calls which programs use to, and fixing wrong parameters, and/or calling
additional system functions.

hack_fix_reuseaddr/
    Useful for programs which do not use SO_REUSEADDR for tcp sockets.
    As usual such programs has problems with restarting, and fail with error
    "Address already in use".

    This helper intercepts socket() and call additional setsockopt(..SO_REUSEADDR);

    Usage:
    $ LD_PRELOAD=/path/to/hack_fix_reuseaddr.so program

hack_shift_sys_ports/
    Some programs has hardcoded system IP ports (from 0 to 1023), and usually
    can be used by programs with root permissions.

    If you want to run some tests, but without root permissions on unprivileged ports,
    this helper will shift all system IP ports opened by program to unprivileged ports.
    By default ports shifted by 60000.
    For example your program open port 111, with this helper it's will be moved to 60111.

    Usage:
    $ LD_PRELOAD=/path/to/hack_shift_sys_ports.so program

(c) [email protected] 2018
GPL
https://github.com/ramok/ld_preload_hacks

ld_preload_hacks's People

Contributors

ramok avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.