linedump/README.md

148 lines
3.8 KiB
Markdown

# Linedump
**CLI-only text pastebin service.**
- Status: Beta - expect minor changes
- Instance: [linedump.com](https://linedump.com/)
- Inspired by:
- [0x0.st](https://git.0x0.st/mia/0x0)
- [transfer.sh](https://github.com/dutchcoders/transfer.sh)
**Note:** content is stored unencrypted on the server - consider it public! - Use client-side encryption example in *Usage* section.
---
## Features
**Available**:
- save and share content via CLI
- up- and download in CLI possible
- rate-limits
**Ideas**:
- integrated retention/purge function
**Not planned**:
- GUI *(work around possible, WIP)*
- media besides text (abuse potential and moderation effort too high - there are other projects for it available)
---
## Usage
```text
█ Upload curl:
curl -X POST -d "Cheers" https://linedump.com/ # string
curl -X POST https://linedump.com --data-binary @- < file.txt # file
ip -br a | curl -X POST https://linedump.com --data-binary @- # command output
█ Upload wget:
echo "Cheers" | wget --post-data=@- -O- https://linedump.com/ # string
wget --post-file=file.txt -O- https://linedump.com/ # file
ip -br a | wget --post-data=@- -O- https://linedump.com/ # command output
█ Upload Powershell:
Invoke-RestMethod -Uri "https://linedump.com/" -Method Post -Body "Cheers" # string
Invoke-RestMethod -Uri "https://linedump.com/" -Method Post -InFile "file.txt" # file
ipconfig | Invoke-RestMethod -Uri "https://linedump.com/" -Method Post -Body { $_ } # command output
█ Download:
curl https://linedump.com/{path}
wget -O- https://linedump.com/{path}
Invoke-RestMethod -Uri "https://linedump.com/{path}"
██ Encryption Examples with curl ██
█ Upload text:
echo 'Cheers' | openssl enc -aes-256-cbc -pbkdf2 -base64 -pass pass:yourkey | curl -X POST -d @- https://linedump.com/
█ Upload file:
openssl enc -aes-256-cbc -pbkdf2 -salt -pass pass:yourkey -base64 < YOURFILE.txt | curl -sS -X POST https://linedump.com --data-binary @-
█ Upload command output:
ip -br a | openssl enc -aes-256-cbc -pbkdf2 -salt -pass pass:yourkey -base64 | curl -sS -X POST https://linedump.com --data-binary @-
█ Download:
curl -s https://linedump.com/PASTE_THE_ID | base64 -d | openssl enc -d -aes-256-cbc -pbkdf2 -pass pass:yourkey
██ Adv Examples ██
█ Multiple commands:
{ cmd() { printf "\n# %s\n" "$*"; "$@"; }; \
cmd hostname; \
cmd ip -br a; \
} 2>&1 | curl -X POST https://linedump.com --data-binary @-
█ Continous command:
(timeout --signal=INT --kill-after=5s 10s \
ping 127.1; \
echo "--- Terminated ---") | \
curl -X POST --data-binary @- https://linedump.com
```
---
## Installation
Use with reverse-proxy and HTTPS!
### Environment Variables
| Variable | Description | Default | Required |
|----------|-------------|---------|----------|
| `DOMAIN` | Domain name used in the application responses and examples | `linedump.com` | No |
| `DESCRIPTION` | Application description displayed in the root endpoint | `CLI-only pastebin powered by linedump.com` | No |
| `MAX_FILE_SIZE_MB` | Maximum file size limit in megabytes | `50` | No |
| `RATE_LIMIT` | Rate limit for uploads (format: "requests/timeframe") | `50/hour` | No |
| `URL_PATH_LENGTH` | Length of generated URL paths (number of characters) | `6` | No |
---
## Security
For security concerns or reports, please contact via `hello a t uphillsecurity d o t com` [gpg](https://uphillsecurity.com/gpg).
---
## License
**Apache License**
Version 2.0, January 2004
http://www.apache.org/licenses/
- ✅ Commercial use
- ✅ Modification
- ✅ Distribution
- ✅ Patent use
- ✅ Private use
- ✅ Limitations
- ❌Trademark use
- ❌Liability
- ❌Warranty