Giter Site home page Giter Site logo

zixia / bbs Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 3.0 5.22 MB

大话西游 BBS

Home Page: https://www.zixia.net/bbs

License: GNU General Public License v3.0

Dockerfile 0.04% Shell 0.86% Makefile 0.27% M4 0.72% Java 0.39% C 95.22% C++ 0.51% PHP 0.69% Gnuplot 0.01% Perl 0.47% Roff 0.35% Yacc 0.36% Assembly 0.10%
bbs kbs smth zixia

bbs's People

Contributors

huan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bbs's Issues

Convert the 2006 version .PASSWD to the latest version: 波若波罗密!

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 月光宝盒!

Current <200 users .PASSWDS

[email protected]:~$ ls -l .PASSWDS
-rwxr-xr-x 1 bbs bbs 22400000 Jan  5 09:48 .PASSWDS

The Hope: a .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

What We Have

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.

Todo

Find the right struct & maxuser for the backup file from 2006, and then convert it to match our latest version of code!

BBS docker-compose.yml settings

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

recover .BOARDS from 0Announce and other

Struct: 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.