zixia / bbs Goto Github PK
View Code? Open in Web Editor NEW大话西游 BBS
Home Page: https://www.zixia.net/bbs
License: GNU General Public License v3.0
大话西游 BBS
Home Page: https://www.zixia.net/bbs
License: GNU General Public License v3.0
目前 BBS 网站还没有启动,所以无法访问 https://bbs.zixia.net
需要将 apache 进行配置,并在 docker 里面加入 s6 service 启动脚本。
boardheader
kbs_bbs/site/zixia.h
kbs_bbs/src/struct.h
#define MAXBOARD 2048
struct boardheader {
char filename[STRLEN]; /* the BOARDS files */
char BM[BM_LEN];
char title[STRLEN];
unsigned level; // level设成PERM_SYSOP.
unsigned int idseq; // idseq就是1自增的数应该就可以
unsigned int clubnum; /*如果是俱乐部,这个是俱乐部序号*/
unsigned int flag;
union {
unsigned int adv_club; /* 用于指定club对应关系,0表示没有,1表示序号*/
unsigned int group_total; /*如果是二级目录,应该是目录的版面总数*/
} board_data;
time_t createtime; // createtime写现在
/* int toptitle; move to board status */
unsigned int score_level;
char ann_path[128]; // ann_path是0Announce/groups下的版面精华区相对路径
int group; /*所属目录*/
char title_level; /* 设定用户需要什么title可见这个版面*/
char des[195]; /*版面描述,用于www的版面说明和search */
#ifdef FLOWBANNER
int bannercount;
char banners[MAXBANNER][BANNERSIZE];
#endif
}
$ ./getboard picture
1349
filename: Picture
idreq : 2284053
title : 2[影音] 贴图
flag : 41200
level : 0
group : 4dc
ann_path: rec.faq/Picture
strcpy(rela_board[count].title, bh->title+13);
从第十三个字符开始,是版面中文名
list of boards:
$ find . -maxdepth 2 -name .DIR -type f| sed "s/.*\/\(.*\)\/\.DIR$/\1/g"
cherryzl_fan
YTHT_Crafts
circler
kika_room
WOW_XSXQRaid
Italy
StarCraft
PKU.CHEM
AimGraduate
QiXiaoFu
THU.English12B
FightChick
Billiards
Princeton
GirlBoy
CoxswainElection6
.....
Total: 761
Content of file ".Names" in 0Announce:
bbs@bbs:~$ cat 0Announce/groups/Entertain/.Names
#
# Title=生亦何哀 (BM: last della spiderbug)
#
Name=Fashion/流行时尚
Attach=0
Path=~/Fashion
Numb=1
#
Name=Birthday/生亦何哀
Attach=0
Path=~/Birthday
Numb=2
#
Name=Dance/舞迷之家
Attach=0
Path=~/Dance
Numb=3
#
Name=food/吃遍天下
Attach=0
Path=~/food
Numb=4
#
Name=开怀笑话 (BM: michealr)
Attach=0
Path=~/Joke
Numb=5
Group defined in etc/menu.ini
@EGroups 10, 25, 0, "0BBS", "0) 斧 头 帮 -- [黑帮/系统]"
@EGroups 0, 0, 0, "1THU", "1) 大话西游 -- [科学/技术]"
@EGroups 0, 0, 0, "2Class", "2) 大小分舵 -- [地盘/校班]"
@EGroups 0, 0, 0, "3Computer", "3) 吃喝玩乐 -- [生活/享受]"
@EGroups 0, 0, 0, "4Rec", "4) 游戏人生 -- [游戏/娱乐]"
@EGroups 0, 0, 0, "5Art", "5) 吟风弄月 -- [感性/文化]"
@EGroups 0, 0, 0, "6Society", "6) 西游之路 -- [出国/取经]"
@EGroups 0, 0, 0, "7Science", "7) 豆腐西施 -- [信息/商业]"
@EGroups 0, 0, 0, "8City", "8) 东成西就 -- [乡情/城市]"
@EGroups 0, 0, 0, "9Talk", "9) 大圣取经 -- [专业/申请]"
Some other information from syssecurity board.
The latest backup of the .PASSWD file only contains no more than 180 bbs users who have permanent life, which is really sad for the 斧头帮🪓 ... (we have lost almost all our members!)
So we need a 波若波罗密 via 月光宝盒!
[email protected]:~$ ls -l .PASSWDS
-rwxr-xr-x 1 bbs bbs 22400000 Jan 5 09:48 .PASSWDS
.PASSWDS
file from 2006[email protected]:~/bak.20210105/src/kbs_bbs/contrib/convert$ ls -la
total 42912
drwxr-xr-x 3 bbs bbs 4096 Jan 5 09:28 .
drwxr-xr-x 11 bbs bbs 4096 Dec 29 16:00 ..
-rwxr-xr-x 1 bbs bbs 12951300 Apr 27 2006 .PASSWDS.NEW
-rwxr-xr-x 1 bbs bbs 30600000 Apr 27 2006 .PASSWDS.OLD
drwxr-xr-x 2 bbs bbs 4096 Dec 29 16:00 CVS
-rwxr-xr-x 1 bbs bbs 3040 Aug 7 2005 calc_effsize.c
-rwxr-xr-x 1 bbs bbs 626 Aug 7 2005 ch_brdflag.c
-rwxr-xr-x 1 bbs bbs 3773 Aug 7 2005 change_tmpl.c
-rwxr-xr-x 1 bbs bbs 2287 Aug 7 2005 cnv_bh.c
-rwxr-xr-x 1 bbs bbs 2775 Aug 7 2005 cnv_bh2.c
-rwxr-xr-x 1 bbs bbs 9703 Aug 7 2005 cnv_brddir.c
-rwxr-xr-x 1 bbs bbs 1065 Aug 7 2005 cnv_brdflag.c
-rwxr-xr-x 1 bbs bbs 3170 Aug 7 2005 cnv_passwd.c
-rwxr-xr-x 1 bbs bbs 1780 Aug 7 2005 cnv_register.c
-rwxr-xr-x 1 bbs bbs 6875 Apr 27 2006 convclub
-rwxr-xr-x 1 bbs bbs 3047 Apr 23 2006 convclub.c
-rwxr-xr-x 1 bbs bbs 4305 Aug 7 2005 convpass356.c
-rwxr-xr-x 1 bbs bbs 15228 Aug 7 2005 g2b_table
-rwxr-xr-x 1 bbs bbs 271808 Aug 7 2005 gen_table.c
-rwxr-xr-x 1 bbs bbs 1197 Aug 7 2005 recalc_signum.c
-rwxr-xr-x 1 bbs bbs 896 Aug 7 2005 refriend.c
-rwxr-xr-x 1 bbs bbs 9074 Aug 7 2005 strip_fh.c
It seems there's a very high probability that the old/new .PASSWDS
file is converted by the following source code: https://github.com/zixia/bbs.zixia.net/blob/main/kbs_bbs/contrib/convert/cnv_passwd.c, to be confirmed.
Find the right struct & maxuser for the backup file from 2006, and then convert it to match our latest version of code!
We have some very old backup files, such a .PASSWDS
from 2006.
If we start the bbs with this backup and do not disable the life check, then most of the users who have no permanent life will die immediately!
With the help of @realkcn, we found that we can define a SAVELIVE
to archive that!
That's all users zixia bbs have now!
上帝说,要有光。于是就有了光。
KCN: 方便动态调试,docker启动需要允许strace
docker run --cap-add=SYS_PTRACE ...
version: '3.8'
services:
bbs:
image: ghcr.io/zixia/bbs.zixia.net
container_name: bbs
network_mode: bridge
hostname: bbs.zixia.net
# ⬇️
# https://github.com/docker/compose/issues/4729#issuecomment-436148318
# https://medium.com/@junwan01/quote-your-ports-in-docker-compose-file-34d9505999ad
ports:
- '22:22'
- '23:23'
- '2222:2222'
expose:
- 80
volumes:
- /data/bbs/:/bbs
environment:
TZ: "Asia/Shanghai"
VIRTUAL_HOST: 'bbs.zixia.net,*.bbs.zixia.net,wforum.zixia.net,*.wforum.zixia.net'
LETSENCRYPT_HOST: 'bbs.zixia.net,wforum.zixia.net'
HTTPS_METHOD: 'noredirect'
Read the original version at here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.