From bcfab0fbad901102069d4bdd7064a4368e63f840 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Sat, 2 Apr 2022 03:07:49 +0200 Subject: [PATCH] docs: add repository docs --- ARCHITECTURE.md | 12 ++++++ CONTRIBUTING.md | 24 +++++++++++ README.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 ARCHITECTURE.md create mode 100644 CONTRIBUTING.md create mode 100644 README.md diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 0000000..3806854 --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,12 @@ +# Architecture + +This program’s design resembles a Resource-Method-Representation architecture pattern. This is due to the design choice of making it API-oriented, instead of +domain-oriented. Therefore + +Router + +Controller + +Model + +Backend diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8ce7d6a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contribution Guidelines + +TODO + +## Prerequisites + +You need the following tools to be installed: + + +* Python (> ver. 3.7) + + +* Python *pip* module + +```shell +$ git clone git@bitbucket.org:victorykit/httpaste.git +$ cd httpaste +$ python3 -m pipenv install -d +$ python3 -m pipenv run tox -e test +$ python3 -m pipenv run tox -e build +$ python3 -m pipenv run tox -e docs +$ python3 -m pipenv run tox -e lint +$ python3 -m pipenv run tox -e format +``` diff --git a/README.md b/README.md new file mode 100644 index 0000000..030d58b --- /dev/null +++ b/README.md @@ -0,0 +1,110 @@ +# httpaste - versatile HTTP pastebin + +![](docs/_assets/images/favpng_parrot-royalty-free-cartoon.png) + +httpaste is a pastebin application for easily pasting and retrieving data over +HTTP from shell environments and web browsers. It is inspired by [sprunge.us](http://sprunge.us) +and [ix.io](http://ix.io/), but focuses on extendability, advanced security, with little to +no trade-off to simplicity. It can be hosted through WSGI, CGI, Fast CGI, or +as a standalone evaluation server. It offers multiple storage backends, such as +a filesystem backend, SQLite backend, MySQL backend, or MongoDB backend. + +All pastes are being encrypted on the fly and can only be retrieved by an +authorized user, either through knowing the paste id of a public paste, or +having authentication credentials, as well as the paste id of a private paste. +This makes httpaste ideal as a pastebin for sensitive environments such as the +Tor network. Authentication credentials are created on-the-fly and don’t require a sign-up process. + +httpaste supports output formatting for syntax highlighting (powered by +[pygments](https://pygments.org/)), as well as MIME type output manipulation, and input encoding. +Therefore httpaste can server as an anonymous object storage for small data. + +Minute-based and ‘burn-after-read’ paste expiration are supported. + +httpaste focuses on security through cryptography, making it a computationally intensive application. + +# Get Started + +## Install + +```shell +$ python3 -m pip install httpaste-victorykit +$ httpaste --help +``` + +## Create Configuration + +```shell +$ httpaste default-config --dump myconfig.ini +``` + +**NOTE**: The default configuration creates an in-memory SQLite backend, which is not +suitable for WWW deployments. Visit backend, for more +information on configuring the backend. + +## Run a Local Evaluation Server + +```shell +$ httpaste standalone --config myconfig.ini --port 8080 +``` + +## Publish a Private Paste + +```shell +$ echo 'My first private paste' | curl -F 'data=<-' -u myusername:mypassword http://localhost:8080/paste/private +http://localhost:8080/paste/private/UALUA9 +``` + +**NOTE**: If the user does not exist, they will be created upon authentication. + +## Retrieve a Private Paste + +```shell +$ curl -u myusername:mypassword http://localhost:8080/paste/private/UALUA9 +My first private paste +``` + +## Publish a Public Paste + +```shell +$ echo 'My first public paste' | curl -F 'data=<-' http://localhost:8080/paste/public +http://localhost:8080/paste/public/X4L39J +``` + +## Retrieve a Public Paste + +```shell +$ curl http://localhost:8080/paste/public/X4L39J +My first public paste +``` + +### Documentation + +The documentation can be found under [https://victorykit.bitbucket.io/httpaste/](https://victorykit.bitbucket.io/httpaste/). + +### Licensing + +Copyright (C) 2021 Tiara Rodney (victoryk.it) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <[https://www.gnu.org/licenses/](https://www.gnu.org/licenses/)>. + +This program uses licensed third-party software. + +### More Information + + +* [Architecture](ARCHITECTURE.md) + + +* [Contribution Guidelines](CONTRIBUTING.md)