mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 12:18:47 +00:00
factor out setup_hooks()
This commit is contained in:
parent
50c84176da
commit
205004fa2a
@ -99,6 +99,17 @@ static void* load_sym(char* symname, void* proxyfunc) {
|
|||||||
|
|
||||||
const char *proxychains_get_version(void);
|
const char *proxychains_get_version(void);
|
||||||
|
|
||||||
|
static void setup_hooks(void) {
|
||||||
|
SETUP_SYM(connect);
|
||||||
|
SETUP_SYM(sendto);
|
||||||
|
SETUP_SYM(gethostbyname);
|
||||||
|
SETUP_SYM(getaddrinfo);
|
||||||
|
SETUP_SYM(freeaddrinfo);
|
||||||
|
SETUP_SYM(gethostbyaddr);
|
||||||
|
SETUP_SYM(getnameinfo);
|
||||||
|
SETUP_SYM(close);
|
||||||
|
}
|
||||||
|
|
||||||
static void do_init(void) {
|
static void do_init(void) {
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
core_initialize();
|
core_initialize();
|
||||||
@ -110,14 +121,7 @@ static void do_init(void) {
|
|||||||
|
|
||||||
proxychains_write_log(LOG_PREFIX "DLL init: proxychains-ng %s\n", proxychains_get_version());
|
proxychains_write_log(LOG_PREFIX "DLL init: proxychains-ng %s\n", proxychains_get_version());
|
||||||
|
|
||||||
SETUP_SYM(connect);
|
setup_hooks();
|
||||||
SETUP_SYM(sendto);
|
|
||||||
SETUP_SYM(gethostbyname);
|
|
||||||
SETUP_SYM(getaddrinfo);
|
|
||||||
SETUP_SYM(freeaddrinfo);
|
|
||||||
SETUP_SYM(gethostbyaddr);
|
|
||||||
SETUP_SYM(getnameinfo);
|
|
||||||
SETUP_SYM(close);
|
|
||||||
|
|
||||||
init_l = 1;
|
init_l = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user