You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Robin Malley 1adc547efe
2 weeks ago
assets Allow scrolling on index page 3 weeks ago
conf Have the processes start in their own chroots 3 weeks ago
doc Start working on documentation 3 months ago
kore_chroot Add gitignores 3 years ago
packaging/systemd Have the processes start in their own chroots 3 weeks ago
spec Add some better error reporting 3 weeks ago
src hotfix 2 weeks ago
tools Add some tools for interfaceing with smr 2 years ago
.gitignore Add some files to gitignore 2 years ago
Makefile hotfix makefile 3 weeks ago Update cloc 3 weeks ago
dh2048.pem Inital commit 3 years ago



This repository contains the source code to a pastebin clone. It was made after concerns with taking down certain kinds of content. SMR aims to be small, fast, and secure. It is built on top of Kore, using luajit to expose a Lua programming environment. It uses sqlite3 as it's database. SMR is implemented in about 4k SLOC and is expected to never exceed 5k SLOC. Contributions welcome.

Language                     files          blank        comment           code
Lua                             38            231            438           2338
C                                4             65            133            719
HTML                            18             23              0            562
JavaScript                       4             23             34            293
SQL                             36              6             35            274
CSS                              3              4              8             74
C/C++ Header                     4              3              0             48
SUM:                           107            355            648           4308


  • Accounts (complete)
  • Comments (complete)
  • Tags (complete)
  • Search (complete)
  • Archive (complete)
  • Author biographies (complete)
  • Kore 4.2.0 (complete)
  • addon api


  • Currently, people can post comments to unlisted stories even if they don't have the correct link.
  • Find a replacement preprocessor
  • The archive is currently generated weekly from a cron job, and served syncronously. We can generate a zip file on-the-fly instead, and if the client disconnects, it's fine to drop the whole thing.
  • We can simplify a lot of error handling logic by setting sql prepared statements to reset during error unwinding.
  • We can simplify a lot of business logic by having requests parse their parameters eagerly.


If you want to contribute to this repository:

  1. Install the kore webserver(Documentation -> installation)
  2. Use a kodev create smr to create a blank kore application
  3. Install Lua and Luarocks from your package manager
  4. Use Luarocks to install the following dependencies (luarocks install <package>)
  • etlua - Lua templating, comparable to Jinja for Python
  • lpeg - Parsing Expression Grammers, used to build text parsers
  • lsqlite3 - Sqlite3 for Lua, a lightweight database
  • lua-zlib - Data compression
  1. You may need to modify conf/build.conf, I use Lua 5.1 on my development machine, but everything should still work with later versions.
  2. Install spp
  3. Clone this repository into the smr folder, cd into the root, and run make!
  • You may need to modify the configuration in the Makefile, add to your /etc/hosts, modify command invocation, ect.

Misc. notes

SMR requires a slightly modified version of Kore to run. See my kore patches for the changes I needed to make to get the JIT compiler playing nice with Kore's seccomp restrictions. There are a few other changes, like modified kore to accept any text as input for things like file upload.

UPDATE (12/18/2020)

Kore 4.0 no longer needs the seccomp changes, as those have been exposed to library users, and smr has been updated appropriately. It still needs the allow-multiline-input patch though.