Comments (6)
PASSWDS.2005.old是可以使用的用户数据库。问题在于这个备份文件userec结构只有204字节,但当前的结构有320字节。
目前看到的差距:
- 备份文件看起来是32位系统编译的,time_t的大小只有32位。
- MAXCLUB可能从128调整到了512.
需要继续对齐其他字段确定字段的位置
from bbs.
备份文件的结构如下,已经恢复完毕:
#define IDLEN 12
#define IPLEN 16
#define NAMELEN 40
#define MAXCLUB 128
#define MD5PASSLEN 16
#pragma pack (4)
#define time_t unsigned int
struct userec { /* Structure used to hold information in */
char userid[IDLEN + 2]; /* PASSFILE */
char flags; /*一些标志,戒网,版面排序之类的*/
unsigned char title; /*用户级别*/
time_t firstlogin;
char lasthost[16];
unsigned int numlogins;
unsigned int numposts;
char username[NAMELEN];
unsigned int club_read_rights[MAXCLUB>>5];
unsigned int club_write_rights[MAXCLUB>>5];
unsigned char md5passwd[MD5PASSLEN];
unsigned userlevel;
time_t lastlogin;
time_t stay;
int signature;
unsigned int userdefine[2];
time_t notedate;
int noteline;
int notemode;
time_t exittime;
/* 生日数据转移到 userdata 结构中 */
unsigned int usedspace; /* used space of user's mailbox, in bytes */
char unused[28];
};
from bbs.
Update Jan 20, 2021
1. All files together
$ ls -l /bbs/tmp/convert/
-rwxr-xr-x 1 bbs bbs 12951300 Jan 18 19:10 PASSWDS.2005.new
-rwxr-xr-x 1 bbs bbs 30600000 Jan 18 19:10 PASSWDS.2005.old
-rwxr-xr-x 1 bbs bbs 22400000 Jan 18 18:19 PASSWDS.2020
-rw-r--r-- 1 bbs bbs 1618 Jan 18 19:03 zixia2020.c
Latest file & code
- The
PASSWDS.2020
is the latest password file, with the currentuserec
structure. (but we only left less than 200 users...) - The
zixia2020.c
can readPASSWDS.2020
with the right structure, which is the latest version of the source code.
Old (2006) files
PASSWDS.2005.new
& PASSWDS.2005.old
are founded from the original backup files, can be located at /bbs/bak.20210105/src/kbs_bbs/contrib/convert/
, which is original located at /bbs/src/kbs_bbs/contrib/convert/.
Some source code (utils) can be found in the same directory but I'm not sure which one is the right one. (I had tried the cnv_passwd.c
& cnvclub.c
Progress
The right userec
structure for the PASSWDS.2016 need to be found.
from bbs.
大部分用户的home mail目录应该已经被删除了。需要修复的时候建立,内容肯定没了
from bbs.
备份文件看起来是32位系统编译的,time_t的大小只有32位。
这可能就是我怎么都搞不定的主要原因了。。。能通过 time_t 的数据看出是否 64 位架构编译,上帝威武!
from bbs.
Update 6:07 pm, Jan 21, 2021
43,171 zixia bbs users restored from 2006!
K core V5! Orz
bbs@bbs:~$ ps axf
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 /bin/sh -c /entrypoint.sh
6 ? S 0:00 s6-svscan -t0 /var/run/s6/services
32 ? S 0:00 \_ s6-supervise s6-fdholderd
227 ? S 0:00 \_ s6-supervise kbs
233 ? Ss 0:00 | \_ bash ./run
241 ? S 0:00 | \_ sleep 3600
228 ? S 0:00 \_ s6-supervise apache
232 ? Ss 0:00 | \_ bash ./run
344 ? S 0:00 | \_ sleep 60
229 ? S 0:00 \_ s6-supervise sshd
231 ? Ss 0:00 \_ /usr/sbin/sshd -D -e -p 2222
255 ? Ss 0:00 \_ sshd: bbs [priv]
257 ? S 0:00 | \_ sshd: bbs@pts/0
258 pts/0 Ss 0:00 | \_ -bash
347 pts/0 R+ 0:00 | \_ ps axf
281 ? Ss 0:00 \_ sshd: bbs [priv]
283 ? S 0:00 | \_ sshd: bbs@pts/1
286 pts/1 Ss+ 0:00 | \_ -bash
345 ? Ss 0:00 \_ sshd: unknown [priv]
346 ? S 0:00 \_ sshd: unknown [net]
198 ? Ss 0:00 /kbs/bin/miscd timed
202 ? S 0:00 \_ /kbs/bin/miscd killd
203 ? S 0:00 \_ /kbs/bin/miscd userd
209 ? S 0:00 \_ /kbs/bin/miscd flushd
206 ? S 0:00 /kbs/bin/bbslogd
210 ? S 0:00 /kbs/bin/bbsd -p 23
263 ? Ss 0:00 \_ bbsd:zixia sd -p 23
276 ? Ss 0:00 \_ bbsd:KCN bbsd -p 23
323 ? Ss 0:00 \_ /kbs/bin/bbsd -p 23
211 ? Ss 0:00 /kbs/bin/sshbbsd -p 22
from bbs.
Related Issues (10)
- BBS Net (月光宝盒) does not work
- BBS docker-compose.yml settings
- Enable strace for docker container HOT 1
- Stop killing users whose life has burned out... (365 days of life is too short in 2020!) HOT 2
- recover .BOARDS from 0Announce and other HOT 11
- Recover 0Announce menu entrence HOT 3
- 版面帖子的已读/未读标记无法更新 HOT 3
- 配置 Web 服务
- Chat Room (盘丝洞) not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbs.