Skip to main content

a versatile HTTP pastebin

Project description

httpaste - versatile HTTP pastebin

NOTE: httpaste is publicly hosted at httpaste.it and as a hidden Tor service (https://paste77ubkwxy4fqezffsmthxdh3xerwi72tlsw2mch7ecjhw2xn7iyd.onion). Both services are to be considered evaluatory, as long as the source code is in pre-release. Regarding voidance of pre-release status, see Open Issues, for more information.

This program offers an HTTP interface for storing public and private data (a.k.a. pastes), commonly referred to as a pastebin application. It is inspired by sprunge.us and ix.io. 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, or MySQL backend.

Public data can be accessed through an URL, where as private pastes additionally require HTTP basic authentication. Creation of authentication credentials happens on the fly, there is no sign-up process. Public pastes can only be accessed by knowing their paste ids, they are not listed on any index, since it isn’t technically possible (by design).

All pastes are symetrically encrypted server-side with an HMAC derived key and SHA-256 hashing, a server-side salt and a randomly generated password. Public paste’s passwords are derived from their ids. Private paste’s passwords are randomly generated and stored inside a symetrically encrypted personal database, with the encryption key also being derived through the same HMAC mechanism, where the HTTP basic authentication credentials act as the master password.

Paste ids, usernames, and any other identifiable attributes are only stored inside storage backends as keyed and salted BLAKE2 hashes.

The program supports output formatting for syntax highlighting (powered by pygments), as well as MIME type output manipulation, and input encoding. The program can therefore serve as a minimalist, anonymous object storage for small data.

Minute-based and ‘burn-after-read’ paste expiration are also supported.

Getting Started

Install

$ python3 -m pip install httpaste-victorykit
$ httpaste --help

Create Configuration

$ 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

$ httpaste standalone --config myconfig.ini --port 8080

Publish a Private Paste

$ 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

$ curl -u myusername:mypassword http://localhost:8080/paste/private/UALUA9
My first private paste

Publish a Public Paste

$ echo 'My first public paste' | curl -F 'data=<-' http://localhost:8080/paste/public
http://localhost:8080/paste/public/X4L39J

Retrieve a Public Paste

$ curl http://localhost:8080/paste/public/X4L39J
My first public paste

Documentation

The documentation can be found under 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/>.

This program uses licensed third-party software.

More Information

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

httpaste-victorykit-1.0.13a0.tar.gz (183.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httpaste_victorykit-1.0.13a0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file httpaste-victorykit-1.0.13a0.tar.gz.

File metadata

  • Download URL: httpaste-victorykit-1.0.13a0.tar.gz
  • Upload date:
  • Size: 183.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for httpaste-victorykit-1.0.13a0.tar.gz
Algorithm Hash digest
SHA256 ee98eaf0dd85299ad13b256e269d6413b3363dcfe342e2ba9becf88a45ab732c
MD5 baba73a8f2b63168c9ced6fd557a0996
BLAKE2b-256 b671fc577aa19a259698f7e8fc01f4e6b558ea3c389e96256bbf7cd677f4ed10

See more details on using hashes here.

File details

Details for the file httpaste_victorykit-1.0.13a0-py3-none-any.whl.

File metadata

File hashes

Hashes for httpaste_victorykit-1.0.13a0-py3-none-any.whl
Algorithm Hash digest
SHA256 657c3d2fdbe58a8875d41f062f7e27b8371f361f8b6bc57ebb632c9a81309eea
MD5 ec7ceca95a9f4b2d832caa4bfada90a2
BLAKE2b-256 9c82b3a8d8258e5ce829b3ce82f43a71637b6b714c13a1180686cfb9e5b70ed2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page