PythBBS and Holla Forums's BBS

Back in late 2015, early 2016 I ran a BBS for Holla Forums. It was plagued by a lack of good software, and the fact the only half decent one (Mystic BBS) didn't offer encryption, displayed User's IP, and was written in a proprietary language with no documentation.

So I've decided to write my own BBS software, I chose python cause it's easier to write in than say C (my main language I use), and I don't have much open time. I've never programmed in python much, but hey. Either it'll work or it'll crash and burn like my life.

I'm using bcrypt for password encryption, plan on implementing ssh, maybe not at first, but eventually, and want to add optimizations for running over Tor and I2p.

I want your opinions on dealing with message boards and posts. Should I implement something like a SQL database, have the python code read from text files inside folders, or a text file per message topic, with character indicators to tell where a old post and a new post begin (what mystic appeared to have used)?

Also any other suggestions for the project?

Other urls found in this thread:

github.com/spacejam/sled
cockroachlabs.com/
tokio.rs/.
github.com/niner/Inline-Perl5/blob/master/README.md
ix.io/A4x
github.com/andrewwyatt/photonbbs)
rosettacode.org/wiki/Echo_server#Ada
wiki.python.org/moin/PythonWarts
effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm
github.com/Zapod/PythBBS
docs.python.org/3/library/argparse.html#module-argparse
pfsense.org/download/
twitter.com/SFWRedditVideos

write it in perl rust tbh my fam

Sorry, I'm not a hipster from SoCal

Where is the github so anons can contribute?

Haven't made one yet. Want to get a working version and i'll put it up

Isn't this exactly what Go claims to be best at?
Use Go!

I'd have to learn a new language then

I recommend mongodb for the textor another non relational db, sql for your settings but not for the text.

If you understand json then mongodb is easy and quick.

I'm willing to help when you put it on a repo, I like the idea of a ssh bbs.

You said you don't really know python either so just do it and learn go.

I mean I know it well enough to use. And Go is just another hipster language i'll learn once then never use again. Plus I've already wrote a significant portion

One directory per thread, each post in a separate file. Messages have headers with id and parent id. A separate index file for each thread that gets rebuilt automatically like a cache.
You can do directory hashing (like root/forum_name/a/b/abcdefg/), but there probably won't be tons of traffic.
Oh and write it in Tcl. ;-)

Thats what I was thinking of doing. Seems like it would be the most efficient and easy to debug

You'll have to ask yourself: Do I want to do this to learn something (networking, databases) or will I provide a service? If it is the later, what features will your service offer that 8ch does not? Personally I think developing CRUD applications is boring and would rather do something else. Perhaps create something that we do not have yet, otherwise no one will use your service. It's hard to think what exactly is missing as everything is basically available: message boards - vichan, nextchan, nntpchan and tons of other similar projects, chat - IRC, XMPP, books - libgen, file share - torrent, catbox, ftp, general communication - mailing lists...

If I had skills, I would create GPL virtual assistant with "AI" to help with wide variety of tasks. From basic: todo lists with reminders, mail, file searching, remembering lastly accessed files (you watch a show - it automatically offers you next episode), help with errors when compiling missing libraries (watch output - find and offer correct version to install automatically - this would be a harder challenge - searching internet for tar archives if not in repos), interactive help when programming - search local pdf/text database to offer you possible solutions (algorithms, documentation) - local search engine, help with learning - again grep over pdf/text files to give relevant info from books (because stack overflow is a collection of bad ideas), other user scripted actions that I can't think of right now but probably waste time every day doing them. Of course appearance would be important as well, something like pic related but for desktop - rendered with transparent window in real time, animations for different actions e.g. goes to sleep when putting PC to sleep, hide/show, dances while music is playing add in personality, mood changes... We should look in to the future more, messing about with old tech is fun but we now use a lot more powerful machines and could do more interesting things with them that were impractical in the past. M$ already has cortana but it only offers few elementary actions and is botnet, GPL virtual assistant would be much more advanced.

My ideas aside, fell free to create your BBS, you'll learn quite a few useful things even if it fails. Worst thing is to do nothing.

lol

Honestly its a nice novelty that people like, and classic computing is one of my hobbies. Yeah it's not going to be anything useful, just a cool little project.

That'll be slow as fuck. Not because of python, but all those calls. A user refreshing the list of topics would trigger hundreds of open/read/close unless you keep it in memory and only use the text files as storage. And you'll need to lock the file before each reply (if two users post at the same time). For a small userbase like ours that'd be no problem at all, but it wouldn't scale (which is perfectly fine, if somehow you get users you can fix it then).
Python has sqlite. It isn't that hard to use and will by far outperform a naive solution. I don't know how it compares with though.
If you go with files do as suggested. As a bonus, files make writing shitty tools much easier.

sasuga

I'll put it up tonight then. Jesus

I'll rewrite it in Rust tomorrow then. XDDDD

...

this, using files is a really bad idea, it might work today with 1 or 2 people carefully browsing, but tomorrow with a few more faggots hammering the shit out of it for shits and giggles it'll shit itself.

mangodb is really easy, just like using dicts and better for handling large amounts of text than sqlite.

kek. this shit is absolutely rancid.
use sled instead. github.com/spacejam/sled

kek. this shit is absolutely rancid.
use cockroach instead. cockroachlabs.com/

are you a pajeet or recent cs grad?

There's no easy way to hammer a bbs like a website. At most the telnet or ssh port will get hammered, and that's got nothing to do with how the message base is stored. Because to view the messages or write new ones, you have to login. It's a simple matter to enforce a flood protection for new posts (and even lock the account if there's obvious spam faggotry at play). And reading posts on bbs isn't at all like a website where the whole thread gets loaded. You read messages one at a time, so it's self-throttling. And you can only have one active session. I guess you could be a lamer and create multiple accounts, but the sysop can also limit the maximum number of concurrent sessions (or "nodes").
So no, you don't need any fancy database layer to complicate things and turn what traditionally worked fine with plain text files on much weaker systems with slower disks (and sometimes those were floppy disks, not HDDs).

do you really think having all these open/read/write calls is a good idea?
Use a db to abstract it fam

it is not an rdbms though

no, fuck off cianigger, i bet you glow in the dark

I'm going to get a working bare bones spaghetti code version, post the source, then let myself get ripped apart by you guys for how shit it is. And go from there

So far I have the simple multhreaded socket server working, and basic user use. Including the message editor. Still to do is:

Finish code to read configuration files
Add multi-node chat.
Add user creation
Add ssh support
Debug everything and get it somewhat working, this will take the longest

I'm not gonna bail, cause this is emmensely fun to me. Despite how shit it is

did you actually write your own server? lmao

If you ever get it up and running, I'd be glad to repost all my asian porn.

Still have it. haha. The 750gb Sandisk drive I used for uploads has sat in the server since. So all the uploads and messages from the past are still saved. I want to see if I can get my program to read the files mystic created.


I mean it literally opens a thread with each connection. Not difficult. I tried copying other people code but couldn't get it working cause I didn't understand any of what it did, so I just read the socket and thread documentation and wrote my own.

just use tokio.rs/. rust futures are zero cost.

THIS
If you're writing a meme BBS, you should write it in a meme language.

RUST

wont it be anonymous?

OP is a CIAnigger so no, it won't be.

that is disappointing. oh well then i will just have to write my own bbs in rust

Can i contribute?

OP could add an user account.

You can contribute the CoC.

yeah you can get started on the logo while i work out the architecture

Yes it will be. if you type in 'user' at login you'll connect anonymously. But i'll also give the ability to add user accounts. Just like how I ran it 2 years ago.

REMOVE RUST

this stuff is actually pretty terrible.

I agree, there has been a lot of rust appearing lately.

...

Mind as well be considering how shit it is

I think Perl (5) would be a much better language for this than Python.

PERL DIED 5 YEARS AGO, PYTHON IS KING

And both are shit languages.

What's a better language?

perl 6

...

kys

Mongodb is awful and means you need a separate database daemon to manage. SQLite is linked in to your program's binary and is just a single file to save shit too.

t. use MongoDB for work and hate it

I would unironically recommend Perl 6 as a good way to learn the language. Python 3 is good if you already know Python 3 and don't feel like learning a new language.

...

im pretty sure that you can just execute perl 5 code

im pretty sure that you cant

well you are wrong: github.com/niner/Inline-Perl5/blob/master/README.md

6 is still slower than 5, nice try though

if i care about performance i would definitely not choose perl 5/6 though.

Would you choose rust?

of course steve klabnik would choose rust

I wrote my own BBS in Bash. You can see the sourcecode here:
ix.io/A4x
Or connect at pdxbbs.us

nice honeypot url

#!/bin/bash#GPLv3 or greaterBOARDDIR="/home/friend/boards/"TEMPDIR="/home/friend/temp/"error () { echo -e "${RED} INCORRECT ARGUMENTS${NC}"; }RED='\033[0;31m'LG='\033[1;32m'YW='\033[1;33m'NC='\033[0m' # No Colorecho -e "Welcome to ${LG}PDX${YW}BBS${RED}.US${NC}, your one-stop-shop for everything cool."echo -e "Shoutout to E-Dub"while true; doecho -n " > "read cmd board thread#here's where all the user-entered commands get runcase "$cmd" in help) echo -e " ${YW}latest${NC} list the 10 most recently bumped threads" echo -e " ${YW}list${NC} list boards" echo -e " ${YW}threads${NC} ${RED}x${NC} list threads in board ${RED}x${NC}" echo -e " ${YW}read${NC} ${RED}x${NC} ${LG}y${NC} read thread ${LG}y${NC} on board ${RED}x${NC}" echo -e " ${YW}post${NC} ${RED}x${NC} ${LG}y${NC} post to thread ${LG}y${NC} on board ${RED}x${NC}" echo -e " ${YW}create${NC} ${RED}x${NC} ${LG}y${NC} create thread ${LG}y${NC} on board ${RED}x${NC}" echo -e " ${YW}found${NC} ${RED}x${NC} create board ${RED}x${NC}" echo -e " ${YW}rules${NC} show the rules" echo -e " ${YW}credits${NC} please give me a job" echo -e " ${YW}exit${NC} this option does what it says on the tin" ;; latest) find /home/friend/boards -type f -printf "%T+\t%p\n" | sort | cut -f 2 | tr -d '.' | tr '/' ' ' | cut -d ' ' -f 5- | head -10 ;; list) if [[ -z "$board" && -z "$thread" ]]; then echo -en " ${RED}" ls "$BOARDDIR" echo -en "${NC}" else error fi ;; threads) if [[ ! -z "$board" && -z "$thread" && -d "$BOARDDIR$board" ]]; then echo -en " ${LG}" ls "$BOARDDIR$board" echo -en "${NC}" else error fi ;; read) if [[ ! -z "$board" && ! -z "$thread" && -e "$BOARDDIR$board/$thread" ]]; then more "$BOARDDIR$board/$thread" else error fi ;; post) if [[ ! -z "$board" && ! -z "$thread" && -e "$BOARDDIR$board/$thread" ]]; then post="$TEMPDIR/$(date +%s).txt" touch "$post" rnano "$post" echo -e "\n-------------------------------" >> "$BOARDDIR$board/$thread" echo "$(whoami) at $(date +%s):" >> "$BOARDDIR$board/$thread" cat "$post" >> "$BOARDDIR$board/$thread" rm "$post" else error fi ;; create) if [[ ! -z "$board" && ! -z "$thread" && -d "$BOARDDIR$board" && ! -e "$BOARDDIR$board/$thread" ]]; then touch "$BOARDDIR$board/$thread" echo "Created by $(whoami) on $(date +%s)" >> "$BOARDDIR$board/$thread" else error fi ;; found) if [[ ! -z "$board" && -z "$thread" && ! -d "$BOARDDIR$board" ]]; then mkdir "$BOARDDIR$board" 2> /dev/null else error fi ;; rules) echo " 1. Don't break the law." echo " 2. Don't spam." ;; credits) echo " Created by admin" echo " Made lovingly in bash" ;; exit) exit ;; *) echo -e " Command unknown. Try ${YW}help${NC} if this is your first time."esacunset cmd board threaddone

...

It's GPL. Improve it.

I'm working on my own

Mine is better

No problem, good luck with your vaporware, mr ideasman.

I honestly don't give a fuck.

Also

I'm not , I'm , but
nigga what do you need to config?
bloat
give a man a mask and he'll tell you the truth
sounds gay
My script is self-documenting
just sign in to the box as a different user and use the wall command. Why should randoms be able to wall the whole server? That's something that only root should be able to do.

Key codes for menus and their function

It's gonna add like half a fucking megabyte

MUH CYBERPUNK

It's not, was the most used thing on my last BBS

Anyone who says that is retarded

Not the fucking a command, but a wall. 'one liners'

erlang beautiful language

not this time

No, retard, the fagbow has the last colour replaced with pink.

Honestly. Leave the past behind.
It's obsolete and everyone have evolved.

If you gonna write something new, don't dream about the shitty past, live in the future.

Again, its my hobby. Not trying to make something new. just trying to set up a cool retro bbs

God-forbid someone gets to enjoy something.
The future is shit. Why don't you go there if you think it's so great?

Back to where you belong then

Turbo Pascal tbh fam.

It didn't matter 30 years ago, and it matters even less now.

I haven't had any experience with the community (I ruled it out after playing with it a day), when you say retarded is it newbs or smug morons like Ruby programmers?

brogram ebin;uzez Crd;begin WrideLn('EBIN xDDDDDDDDD');end.

There are basically four types of people using Go:
1. fairly young, fresh out of college, incapable of understanding a brilliant language
2. pajeets
3. people who are sick of c's shit but dont want to learn something new
4. people who want a job

maybe if you live in SF because nowhere else do people use go.

I remember your BBS and miss it. I hope you can bring it back because it was fun.

Python is going to be your best bet, it'll cut down on the time implementing basic things so you can work on the important stuff.

SQL database sounds like a good idea, it's a cleaner solution IMO and it will take away the headache of dealing with character indicators. Just make sure to properly sanitize any data that's going to be used on an SQL query.

Worst case, you could always fork PhotonBBS (github.com/andrewwyatt/photonbbs) which already has SSL, but I believe it's written in perl.

...

paste "prepared statement" into your favorite search engine

use that
/thread

...

I'm finishing up message posting. I ended up doing a text file with a listing. Will implement SQL later on. Once everything posts and works, hopefully by the end of today, I'll post it online. But I'm at work now, and can't test any of this code cause the main code is on my desktop.

From kernel coding style:
You may want to do some refactoring, once you're finished.

...

Writing good servers is hard. Go ahead write a server that works reliably, is scalable and can not be exploited.

Nothing easier than that. Just use node.js

He's using Python isn't he? There's practically nothing difficult for him to manage here, since either the nonblocking or greenthread approach he goes with will already be implemented.

he is using neither though.

Or just use a language which makes such a programming style very natural. Erlang is a clear winner there, but instead of Rust and using another man's library, consider Ada.

rosettacode.org/wiki/Echo_server#Ada

yes
no. it isnt ACID

Yeah the code is shit. It's gonna need a full rewrite at some point. But I figure you guys will rip it apart and completely improve it and let me know how fucking retarded I am.

don't worry. i'm going to rewrite it in rust
LOOOOOL. Holla Forums couldn't program their way out of a wet paper bag if their life depended on it

Do you have a Code of Conduct yet? There's a lot of transphobia here and I want to make sure I feel safe interacting and sharing with the community you create.

steve you utter mong, you said you will stop using your trip!

i lied XDDDDDDDD

...

Apologize!

Yeah here it is:


the whole point of python is its a common language people know, making modifications easier. Why write it in some shitty hipster language

justify your opinion or i'll have to "not an argument" you

python is actually quite shitty, one of the most shitty languages to be precise

These words are super problematic, I feel unsafe.

I like that python is a clean easy to read language, for that reason it's very good for scripting, and in that area it's the best out of few good alternatives.

yeah python is very clean

(checked)
fugg. i hit reply on accident.
when even the official wiki says that python sucks you know shit's fucky
wiki.python.org/moin/PythonWarts
also read guido's retarded ramblings on len:
effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm

So is Pascal. But ppl make fun of Pascal because it's old, whereas Python is trendy.
Also if you're going to use SQL, you might as well write in enterprise Java, because you're going in that direction already, and it won't be long before you're piling on frameworks.

...

When I was beginning to program, I thought I was so fucking smart for connecting an ORM layer from the PostgresDB to my Java structs webapp. I piled on more corporate buzzword memes than I care to remember. I was a bright kid, horribly mislead by the term "professional" software development.

What's wrong with your approach? Sounds good to me

It's a shitty language, but its fast to program in and going to stick around. Rust will be dead by 2025, or ignored like D

Honestly I may just ditch python and go to C once I get a working version. It would run better, be a language I actually know well, and I could program in some cool curses menu shit if you connect over ssh

Python usage is going down tho. The 2/3 split really broke its neck

Yeah it did, but its still used more than rust

Rust is up and coming, soon it will be the most used language!

Sure buddy, sure

Makes the thread a lot better. Good luck OP, looking forward to helping out if possible.

Rust is being killed by its own community of non-coders, who see Mozilla/Rust as a brand they identify with, rather than anything they use.


I read so many books on that bullshit too, I really wish I had spent that time studying mathematics.

Well the time is upon us. Here is the git

github.com/Zapod/PythBBS

I'll set up a BBS server tomorrow. I am finishing up getting

*getting user creation, settings, and the wall working.

You might want to use this:
docs.python.org/3/library/argparse.html#module-argparse

Fucking hell

oh user...

what is the problem with that though?

...

Look up "Syd Barrett". I don't think I'm him. But who knows, he did go insane.

And I didn't know what to say on the first commit haha.

--allow-empty-message

oh shit i think i remember this -- I waited to try and use it until i started using loonix as my main thing but then forogt about it fuk

good stuff, user. iirc weren't u using an old desktop or am i retarded?

I used an old proprietary HP mobo shoved into a case with a piece of wood. I moved it to a laptop towards the end of its run

I honestly would like to see a version of this written in rust.
Too bad steve is just a LARPer and won't produce any code...

Still no CoC big no-no. I also notice that you don't have any contributors from marginalized groups, is your outreach campaign lagging?

Also please refrain from gendered terms like "Boys", your commit messages are not welcoming to genders across the entire spectrum. Instead of Welcome to Hel, Boys, consider saying Welcome to Hel, Friends.

What's a CoC? How do you pronounce that anyway? See Oh See? Cock? Cuck?

Corruption of Champions. It's a "/d/ comes alive" text game, albeit with a bit more furfaggotry on average than, say, five years ago.

bbs are fucking cancer though. even if i didnt think that, i wouldn't waste my time writing something that no one is ever going to use

[[$]] ebin.$

nlang syntax is so fucking autistic
i kind of like it

It's its own thing tbh. I don't expect everyone to like it. I like symbols better than keywords, so I built it upon that and the concept of registry.

It reads like that 30+ C++ blob of characters performing some unspeakable dark magic ritual I saw in a fellow student's coursework once.
Also your memelang is bloated as fuck. Obligatory argument list and whatever "0." stands for.

"0." obviously is the return code

So simply reaching end of current scope is not enough for you? Or does menelang also lacks void so a return value is obligatory as well?

it says right in the function signature that it returns a sigend 32 bit integer.
also im not the designer of nlang. stop embarrassing yourself, faggot.

If the return type is omitted then the last expression is left as-is, otherwise it's typechecked and then wrapped in a return (...); (for C).

He replied to a memefied Pascal code, m8. How do I know if menelang has obligatory return values even if return type is not void (assuming it even has void, again)? It looks like shit so I'm expecting anything.
If he was comparing it co C it would've been a whole different set of complaints.

As for embarrasing oneself, you do know that in the code he was replying to both argument list and return value are implicitly set, right?


Only in this case or in general?
Either way, if you really care I can go to your thread because at first I didn't see that this thread has nothing to do with either Pascal or your thing.

ok

I wrote bbs software in like 20 minutes. You must be some sort of noob programer its the easiest thing ever. You just aren't leet like me.

post source

Fucking redditor I won't post source for you, you'll reddit up my source code. Probably post it right to reddit while claiming its your own.I know how you work.

The truth is you should be able to write a bbs in a very short time. The fact that you can't proves your a redditor.

...

Literal cuckold redditor projecting. Can't even write a bbs. Kill your
SELF
See thats red text we use that here on Holla Forums. Your probably not aware of it (((redditor)))

That's the benefit to being autistic, you can spend time writing things that no one will ever care for, like the Japanese guy mentioned in the other thread who is writing Windows95 kernel extensions.

Hey zapod do you remember me? I went by the name of copy in the irc.

Yep, names I remeber are copy, walrus, and agrecascino.

Just wondering, is it up yet?

cmd line pastebin ix.io is pozzed? How?

Cool!

I put it up, but it had some security issues. I had to take it down. So i'm patching them and working on isolating the computer from my home network.

you know how to set up isolated vlans? You should look into pfsense if you are going to run a home server, runs off of any old pc.
pfsense.org/download/

I have a Cisco switch i'm using. And also a firewall PC i'm configuring.

pfsense is openBSD and has a ton of features like setting up easy blocklists. Also it goes well with a managed CISCO switch as long as you have a descent intel NIC. I isolated my consoles, workstation, wifi, and torrent server with it. white-listing ports is pretty easy and it's great for monitoring traffic hitting your server. I'm currently using it as a vpn concentrator as well, which you can add separate VLANs to.

pfsense is FreeBSD-based, but using pf.

Okay, keep us posted.

ok, thanks for the contributing