CGI Bash Shell Interface
Go to file
Rafal Kupiec ccafb8d244 Switch to markdown 2018-07-12 08:57:03 +02:00
COPYING Initial import 2013-06-28 18:50:13 +02:00
Makefile Initial import 2013-06-28 18:50:13 +02:00
README.md Switch to markdown 2018-07-12 08:57:03 +02:00
buffer.c Initial import 2013-06-28 18:50:13 +02:00
buffer.h Initial import 2013-06-28 18:50:13 +02:00
cbsi.c Update to v 0.92 2013-07-05 23:10:17 +02:00
cbsi.h Initial import 2013-06-28 18:50:13 +02:00
common.h Update to v 0.92 2013-07-05 23:10:17 +02:00
error.c Initial import 2013-06-28 18:50:13 +02:00
error.h Initial import 2013-06-28 18:50:13 +02:00
mimetype.c Initial import 2013-06-28 18:50:13 +02:00
mimetype.h Initial import 2013-06-28 18:50:13 +02:00
subshell.c Initial import 2013-06-28 18:50:13 +02:00
subshell.h Initial import 2013-06-28 18:50:13 +02:00

README.md

CGI Bash Shell Interface

CBSI is a small program that makes CGI programming in the Bash Shell a lot easier, or at least more tolerable. It is intended for Kagera Firmware, where other languages are too big.

It parses POST and GET requests in addiction to COOKIES, placing elements as name=value pairs into the environment for the CGI script to use.

It combines three features into an engine:

  • It opens a shell, and translates all text into printable statements. All text within <% ... %> constructs are passed verbatim to the shell.
  • It opens a shell, and prints the shell expression. Everything within <%: ... %> tags are supposed to be parsed into 'echo' statement.
  • It supports multilanguage and allows to easily put all texts within <%@ ... %> tags to be quick and easily translated into chosen language.

Additional parameters that can be passed to CBSI:

  • --language-dir=pathspec - specifies a directory where CBSI should look for scripts translations. Default value is '/usr/lib/kagera/langs'
  • --shell=pathspec - specifies an alternate bash-like shell to use. This defaults to '/bin/sh'
  • --translation=filename - specifies a dictionary filename to be loaded in addiction to common.dic from language directory. The extension is added automatically.
  • --upload-dir=pathspec - this specifies a temporary directory where all uploaded files are created. Defaults to '/tmp'
  • --upload-limit=limit - allows a mime-encoded file up to limit KB to be uploaded. The default value is 0KB (no limit).

This software is based on Haserl http://haserl.sourceforge.net/.