mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-13 05:31:36 +01:00
- Made scan_socks & scan work under win32. Only bug is a \1 IP in /quote scan (?)
This commit is contained in:
parent
615936938b
commit
41246edb24
5 changed files with 20 additions and 8 deletions
3
Changes
3
Changes
|
@ -660,4 +660,5 @@ seen. gmtime warning still there
|
|||
- Removed a // comment in src/ircd.c
|
||||
- Fixed a bunch of updconf bugs reported by DarkSypher
|
||||
- Fixed an SVSFLINE bug when removing an unknown dccdeny
|
||||
- Made win32 compile and work ..
|
||||
- Made win32 compile and work ..
|
||||
- Made scan_socks & scan work under win32. Only bug is a \1 IP in /quote scan (?)
|
||||
|
|
|
@ -27,6 +27,7 @@ typedef struct _conf_blackhole ConfigItem_blackhole;
|
|||
struct _conf_blackhole
|
||||
{
|
||||
char *ip;
|
||||
char *outip;
|
||||
short port;
|
||||
};
|
||||
|
||||
|
|
|
@ -1065,6 +1065,9 @@ int InitwIRCD(argc, argv)
|
|||
chmod(CPATH,DEFAULT_PERMISSIONS);
|
||||
#endif
|
||||
init_dynconf();
|
||||
#ifdef STATIC_LINKING
|
||||
l_commands_init();
|
||||
#endif
|
||||
init_conf2(configfile);
|
||||
validate_configuration();
|
||||
booted = TRUE;
|
||||
|
@ -1115,9 +1118,6 @@ int InitwIRCD(argc, argv)
|
|||
conf_listen->options |= LISTENER_BOUND;
|
||||
me.umodes = conf_listen->options;
|
||||
run_configuration();
|
||||
#ifdef STATIC_LINKING
|
||||
l_commands_init();
|
||||
#endif
|
||||
botmotd = (aMotd *) read_file(BPATH, &botmotd);
|
||||
rules = (aMotd *) read_rules(RPATH);
|
||||
opermotd = (aMotd *) read_file(OPATH, &opermotd);
|
||||
|
|
|
@ -419,9 +419,14 @@ DLLFUNC int m_scan(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
DLLFUNC int h_config_set_blackhole_rehash(void) {
|
||||
DLLFUNC int h_config_set_blackhole_rehash(void)
|
||||
{
|
||||
if (blackhole_conf.ip)
|
||||
MyFree(blackhole_conf.ip);
|
||||
if (blackhole_conf.outip)
|
||||
MyFree(blackhole_conf.outip);
|
||||
blackhole_conf.ip = NULL;
|
||||
blackhole_conf.outip = NULL;
|
||||
}
|
||||
|
||||
DLLFUNC int h_config_set_blackhole(void)
|
||||
|
@ -441,6 +446,10 @@ DLLFUNC int h_config_set_blackhole(void)
|
|||
config_error("%s:%i: set::blackhole - missing parameter");
|
||||
goto explodeblackhole;
|
||||
}
|
||||
if (sets->ce_entries)
|
||||
{
|
||||
blackhole_conf.outip = strdup(sets->ce_entries->ce_varname);
|
||||
}
|
||||
ipport_seperate(sets->ce_vardata, &ip, &port);
|
||||
if (!ip || !*ip)
|
||||
{
|
||||
|
|
|
@ -165,9 +165,10 @@ void scan_socks_scan(HStruct *h)
|
|||
sin.SIN_PORT = htons(SCAN_ON_PORT);
|
||||
sin.SIN_FAMILY = AFINET;
|
||||
/* We do this blocking. */
|
||||
if (connect(fd, (struct sockaddr *)&sin,
|
||||
sizeof(sin)) == -1)
|
||||
if ((retval = connect(fd, (struct sockaddr *)&sin,
|
||||
sizeof(sin))) == -1)
|
||||
{
|
||||
printf("%i", ERRNO);
|
||||
/* we have no socks server! */
|
||||
CLOSE_SOCK(fd);
|
||||
goto exituniverse;
|
||||
|
@ -185,7 +186,7 @@ void scan_socks_scan(HStruct *h)
|
|||
goto exituniverse;
|
||||
}
|
||||
|
||||
sin.SIN_ADDR.S_ADDR = inet_addr(blackh_conf->ip);
|
||||
sin.SIN_ADDR.S_ADDR = inet_addr(blackh_conf->outip ? blackh_conf->outip : blackh_conf->ip);
|
||||
theip = htonl(sin.SIN_ADDR.S_ADDR);
|
||||
bzero(socksbuf, sizeof(socksbuf));
|
||||
socksbuf[0] = 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue