hackedyour.info)Hastebin Plus is a lightweight, security-hardened pastebin written in Node.js for sharing plain text, code, logs, and Markdown documents. It is based on haste and Hastebin Plus, enhanced for speed, simplicity, and zero-execution client-side Markdown rendering.
git clone https://github.com/adamoutler/pastebin.git
cd pastebin
docker build -t pastebin .
docker run --name pastebin \
-v pastebin-pastes:/opt/pastebin/data \
-v pastebin-images:/opt/pastebin/static/images \
-p 7777:7777 \
-d pastebin
/raw/:id), and one-key duplication (Ctrl + D).#839496) on a black (#000) background and subtle charcoal code blocks (#0c0c0c).MD toolbar button or Ctrl + Shift + M.Write and Preview before saving (Ctrl + S).document.createElement + textContent only; zero innerHTML, outerHTML, or .html() sinks).<script> tags inside pastes are rendered strictly as inert literal text. is preserved literally as plain text so zero external or internal image requests fire automatically.[label](url)) enforce an explicit protocol allowlist (https:, http:, mailto:, #anchor) with rel="noopener noreferrer nofollow".Content-Security-Policy, X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer, and X-Frame-Options: DENY headers./images/:id.png) for shared links.| Shortcut | Action |
|---|---|
Ctrl + S | Save current paste |
Ctrl + N | New paste (Writing Mode) |
Ctrl + D | Duplicate locked paste into editor |
Ctrl + Shift + R | Open raw text view (/raw/:id) |
Ctrl + Shift + M | Toggle Markdown view / Writing preview |
Ctrl + Shift + T | Share paste link |
git clone https://github.com/adamoutler/pastebin.gitconfig.js and adjust settings if needed.npm cinpm testnpm startconfig.js)| Key | Description | Default value |
|---|---|---|
host | The host the server runs on | 0.0.0.0 |
port | The port the server runs on | 7777 |
dataPath | The directory where all pastes are stored | ./data |
keyLength | The length of the pastes' key | 16 |
maxLength | Maximum chars in a paste | 5000000 |
staticMaxAge | Max age for static assets | 86400 |
compressStaticAssets | Whether or not to compile static js assets | true |
documents | Static documents to serve; will never expire | See below |
{
"host": "0.0.0.0",
"port": 7777,
"dataPath": "./data",
"keyLength": 16,
"maxLength": 5000000,
"staticMaxAge": 86400,
"compressStaticAssets": true,
"documents": {
"about": "./README.md"
}
}
npm test
pytest -v test_server.py
Copyright (C) 2014 Marvin Menzerath
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Content type
Image
Digest
sha256:654d487ca…
Size
313.1 MB
Last updated
2 days ago
docker pull adamoutler/pastebin