dgl [Thu, 19 Jun 2003 16:12:31 +0000 (16:12 +0000)]
Changed a load of (struct something *) MyMalloc casts to just MyMalloc to
keep Andy happy, same with sizeof..
A few little warning fixes (with ./configure --extra-fascism), mostly for firedns.
dgl [Thu, 19 Jun 2003 15:30:46 +0000 (15:30 +0000)]
Reorganisation of the DNS code so it's a bit easier to read, and several bugs
fixed: the lookup is aborted if it can't send the lookup and the fd limit is
also correctly dealt with.
Several API changes and a new error for fd limit reached.
- Cleaned up bopm.conf.sample (it was a mess of tabs and not tabs..)
- Made firedns_resolveip4 accept IP as input (firedns really is getting messy)
- Added missing target_port to scanner block stuff (now documented too)
- DNSBL lookups no longer print timeout error to the channel
dnsbl.{c,h}:
- Many changes to accomdate configurable output from blacklists
- Return values from DNSBLs must now be set in the configuration file,
they are not hardcoded
- It is possible to ignore some of the results returned from DNSBLs
- Lookup errors are now sent to channels as errors as well as to the log
- The void pointer passed to firedns is now a dnsbl_scan struct (contains
a pointer to the blacklist and to the scan_struct).
firedns.{c,h}:
- firedns.conf is now read from the BOPM configuration dir
(etc/firedns.conf) not the system wide /etc.
(firedns.conf is just a list of IP addresses, one on each line)
- Fixes to make firedns.conf work in a sane way
- Better errors when problems occur reading configuration files
- firedns_resolveip4 fixed to actually work
- new error: Network error, for errors receiving from the dns server
inet.{c,h}, irc.c, scan.c, main.c:
- bopm_gethostbyname removed, code uses firedns_resolveip4 now
- DNS lookup code adjusted to use firedns
scan.c:
- %t in kline format strings - the type of proxy found on the host
works for both DNSBL results and proxies found by BOPM
configuation:
- Added new blacklist directives (this breaks old config files).
- scanner blocks now inherit settings from _the one above them_,
this saves multiple definitions of the same thing in different
scanner blocks (this affects vhost, fd, target_ip, target_port,
timeout, max_read and target_strning in scanner blocks).
dgl [Fri, 7 Mar 2003 00:37:05 +0000 (00:37 +0000)]
Of course, you need an extra header file for that to work..
so changing int32_t to int.
(I blame vim's syntax hilighting for lulling me into a false sense of
security, but probably testing stuff with the exact code you commit is also
a good idea).
andy [Sun, 2 Feb 2003 00:44:06 +0000 (00:44 +0000)]
Make sure that the param string is at least null terminated when there is
no parameter (this caused segfault on any oper command for implementations
whose strlen() can't handle null pointers, e.g. sparc-sun-solaris2.8).
andy [Fri, 17 Jan 2003 17:40:12 +0000 (17:40 +0000)]
A PHP/XML client for the opm.blitzed.org dnsbl for use if you wish to allow
people to check if they are in the DNSBL without them ever going outside your
website.
andy [Sat, 11 Jan 2003 06:28:45 +0000 (06:28 +0000)]
src/snprintf.[ch]:
Added Mark Martinec's (v)snprintf replacement from
http://www.ijs.si/software/snprintf/ for sstems with missing or
broken (v)snprintf.
src/compat.c:
Replace inet_aton() with bopm_inet_aton() to prevent clashes.
src/compat.h:
Systems without inet_aton() should use bopm_inet_aton() (compat.c).
Systems without (v)snprintf should use bopm_snprintf()
(snprintf.c).
Systems without inet_pton() should use bopm_inet_pton() (inet.c).
src/dnsbl.c:
src/firedns.c:
src/log.c:
src/main.c:
src/misc.c:
src/scan.c:
Needs to include compat.h if it wants to compile on Solaris.
src/inet.c:
For now made inetntoa() static as it is used nowhere but this
file. Later we need to either remove this and use bopm_inet_ntoa()
from compat.c, or else remove that one and rename this one.
Commented out inetntop() -- nothing seems to be using it currently?
Renamed inet_pton() to bopm_inet_pton() to avoid clashes.
andy [Thu, 9 Jan 2003 17:30:14 +0000 (17:30 +0000)]
Chekc for working snprintf (but do nothing about it yet). This macro came
from http://www.gnu.org/software/ac-archive/ac_func_snprintf.html and is
copyright RĂ¼diger Kuhlmann <redacted>.