是不是可以参考sacnIP.c:
#include "bbs.h"
char IP[20];
int check(struct userec *uentp, void *arg)
{
if(strstr(uentp->lasthost, IP)!=NULL) {
printf("%s\t%s\n", uentp->userid, uentp->lasthost);
}
return 0;
}
int main(int argc, char **argv)
{
if(argc<=1) return 0;
strcpy(IP, argv[1]);
chdir(BBSHOME);
resolve_boards();
resolve_ucache();
apply_users(check,NULL);
return 0;
}
"local_utl/scanIP.c" [readonly] 23L, 399Cc
【 在 pplong2000@newsmth.net-SPAM.no (hiker) 的大作中提到: 】
: 我的想法是遍历所有用户,比较lasthost参数,kbs里面有逐个取用户的userec的这种函数吗??还有就是我想在php扩展里面加入一个函数,怎么加?谢谢了先
--
FROM 10.10.66.*