make debug output look better (patch from Sven)

git-svn: trunk@3172
remotes/push_mirror/metadata
Török Edvin 18 years ago
parent 7c6c3e1317
commit 4c748c36e3
  1. 5
      ChangeLog
  2. 2
      libclamav/phish_whitelist.c
  3. 6
      libclamav/phishcheck.c
  4. 4
      libclamav/regex_list.c

@ -1,3 +1,8 @@
Tue Aug 14 23:23:00 EEST 2007 (edwin)
----------------------------------
* libclamav/phishcheck.c, regex_list.c, phish_whitelist.c: make debug output
look better (patch from Sven)
Tue Aug 14 23:11:00 EEST 2007 (edwin)
----------------------------------
* libclamav/phishcheck.c: Don't report phishing on broken urls containing >

@ -47,7 +47,7 @@
int whitelist_match(const struct cl_engine* engine,const char* real_url,const char* display_url,int hostOnly)
{
const char* info;/*unused*/
cli_dbgmsg("Phishing: looking up in whitelist:%s:%s; host-only:%d\n",real_url,display_url,hostOnly);
cli_dbgmsg("Phishing: looking up in whitelist: %s:%s; host-only:%d\n",real_url,display_url,hostOnly);
return engine->whitelist_matcher ? regex_list_match(engine->whitelist_matcher,real_url,display_url,hostOnly,&info,1) : 0;
}

@ -352,7 +352,7 @@ static void free_if_needed(struct url_check* url)
static int build_regex(regex_t* preg,const char* regex,int nosub)
{
int rc;
cli_dbgmsg("Phishcheck: Compiling regex:%s\n",regex);
cli_dbgmsg("Phishcheck: Compiling regex: %s\n",regex);
rc = regcomp(preg,regex,REG_EXTENDED|REG_ICASE|(nosub ? REG_NOSUB :0));
if(rc) {
@ -401,7 +401,7 @@ static int get_host(const struct phishcheck* s,struct string* dest,const char* U
else {
start=URL;/*URL without protocol*/
if(isReal)
cli_dbgmsg("Phishcheck: Real URL without protocol:%s\n",URL);
cli_dbgmsg("Phishcheck: Real URL without protocol: %s\n",URL);
else ismailto=2;/*no-protocol, might be mailto, @ is no problem*/
}
}
@ -805,7 +805,7 @@ int phishingScan(message* m,const char* dir,cli_ctx* ctx,tag_arguments_t* hrefs)
if(pchk->is_disabled)
return CL_CLEAN;
free_if_needed(&urls);
cli_dbgmsg("Phishcheck: Phishing scan result:%s\n",phishing_ret_toString(rc));
cli_dbgmsg("Phishcheck: Phishing scan result: %s\n",phishing_ret_toString(rc));
switch(rc)/*TODO: support flags from ctx->options,*/
{
case CL_PHISH_CLEAN:

@ -284,10 +284,10 @@ int regex_list_match(struct regex_matcher* matcher,const char* real_url,const ch
buffer[buffer_len-match_len-1]=='.')
/* subdomain matched*/) {
cli_dbgmsg("Got a match:%s with %s\n",buffer,*info);
cli_dbgmsg("Got a match: %s with %s\n",buffer,*info);
break;
}
cli_dbgmsg("Ignoring false match:%s with %s\n",buffer,*info);
cli_dbgmsg("Ignoring false match: %s with %s\n",buffer,*info);
rc=0;
}
}

Loading…
Cancel
Save