bbspost (list|visit) bbs_home
post board_path < uid + title + Article...
mail board_path < uid + title + passwd + realfrom + Article...
cancel bbs_home board filename
expire bbs_home board days [max_posts] [min_posts]
我只会用这一个格式
cat thisdocument|bbspost post /home/bbs/bbshome/sysop
贴到sysop版了
如果利用/etc/alias或者~/.forward
可以写点东西把寄到somebody@mybbs.org的信
经过需要的处理以后贴到版面上,
这里有一段从别的地方弄来的wrapper.c
如果不能用script的地方,可以用它代替一下
比如现在这个,编译了以后,可以改名来用,
比如编译成a.out, 然后改名为asdf那么运行它的话,就会去
执行asdf.pl
我发现似乎在alias里面用管道的时候,写bbspost1.pl之类的不大灵光,
只好用这种东西倒一下,不知道大家有什么看法?
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
char *CMD;
char *x;
setreuid(geteuid(),geteuid());
setregid(getegid(),getegid());
CMD = (char *) malloc(strlen(argv[0])+5);
strcpy(CMD,argv[0]);
x = strstr(CMD+strlen(CMD)-5,".cgi");
if (!x)
strcat(CMD,".pl");
else
strcpy(x,".pl");
execv(CMD,argv);
}
--
FROM 162.105.22.233