- 主题:telnet下的隐藏IP函数如何写?
php界面下的隐藏IP函数我用explode就搞定了
C语言的指针传递我就是搞不懂,算了晚上回来再搞
--
FROM 218.26.243.*
我打算直接修改default.c
哈,发现你们的这个函数真是累赘
【 在 etnlegend (etn|金字塔·神|perplexity) 的大作中提到: 】
: site.h 定义 HAVE_OWN_USERIP 宏, 然后 site.c 里面定义
: char *showuserip(struct userec *user,char *ip);
: 来处理...
: ...................
--
FROM 218.26.243.*
改了,好像没有效果,没招了
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 我打算直接修改default.c
: 哈,发现你们的这个函数真是累赘
--
FROM 218.26.243.*
该死...
./site/default.h:#define SHOW_USERIP(y,x) x
./src/default.h:#define SHOW_USERIP(y,x) x
./libBBS/default.h:#define SHOW_USERIP(y,x) x
怪不得我改了半天没有效果...
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 改了,好像没有效果,没招了
--
修改:sxdxsimple FROM 218.26.243.*
FROM 218.26.243.*
改成SHOW_USERIP(y,x) showuserip(y,x)就好了
然后到default.c里面改
char *showuserip(struct userec *user, char *ip)
{
int length=0,out=0,count=0;
while(*ip++)
{length++;
if(*ip=='.') {count++;out=length;}
}
ip=ip-length-1;
*(ip+out+1)='*';
*(ip+out+2)='\0';
if(count==3){
return ip;
}
else return ip;
}
这个代码非常原始,不用strncpy函数
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 该死...
: ./site/default.h:#define SHOW_USERIP(y,x) x
: ./src/default.h:#define SHOW_USERIP(y,x) x
: ...................
--
修改:sxdxsimple FROM 218.26.243.*
FROM 218.26.243.*