Compare commits
3 commits
f3a52b33d3
...
a8707a267b
| Author | SHA1 | Date | |
|---|---|---|---|
| a8707a267b | |||
| b62ec8473e | |||
| 6337f47b0d |
2 changed files with 6 additions and 3 deletions
|
|
@ -135,6 +135,8 @@ Invoke-RestMethod -Uri "https://linedump.com/" -Headers @{"Authorization"="Beare
|
||||||
curl -X POST --data-binary @- https://linedump.com
|
curl -X POST --data-binary @- https://linedump.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
[For more examples check out the Wiki.](https://git.uphillsecurity.com/cf7/linedump/wiki/Usage)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
@ -170,7 +172,7 @@ podman run --replace -d --restart=unless-stopped \
|
||||||
| Variable | Description | Default | Required |
|
| Variable | Description | Default | Required |
|
||||||
|----------|-------------|---------|----------|
|
|----------|-------------|---------|----------|
|
||||||
| `BASEURL` | Base URL used in the application responses and examples | `http://127.0.0.1:8000` | No |
|
| `BASEURL` | Base URL used in the application responses and examples | `http://127.0.0.1:8000` | No |
|
||||||
| `DESCRIPTION` | Application description displayed in the root endpoint | `CLI-only pastebin powered by linedump.com` | No |
|
| `DESCRIPTION` | Application description displayed in the root endpoint (supports `\n` for multiline) | `CLI-only pastebin powered by linedump.com\nOpen Source: https://git.uphillsecurity.com/cf7/linedump` | No |
|
||||||
| `MAX_FILE_SIZE_MB` | Maximum file size limit in megabytes | `50` | 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 |
|
| `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 |
|
| `URL_PATH_LENGTH` | Length of generated URL paths (number of characters) | `6` | No |
|
||||||
|
|
@ -192,6 +194,7 @@ For security concerns or reports, please contact via `hello a t uphillsecurity d
|
||||||
|
|
||||||
- [Github Mirror available](https://github.com/CaffeineFueled1/linedump)
|
- [Github Mirror available](https://github.com/CaffeineFueled1/linedump)
|
||||||
- [Rate Limit Testing Script](https://git.uphillsecurity.com/cf7/Snippets/wiki/bash-linedump-ratelimit-test.-)
|
- [Rate Limit Testing Script](https://git.uphillsecurity.com/cf7/Snippets/wiki/bash-linedump-ratelimit-test.-)
|
||||||
|
- [Linedumpe Wiki](https://git.uphillsecurity.com/cf7/linedump/wiki/?action=_pages)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
4
main.py
4
main.py
|
|
@ -16,7 +16,7 @@ import sys
|
||||||
|
|
||||||
|
|
||||||
BASEURL = os.getenv('BASEURL', 'http://127.0.0.1:8000')
|
BASEURL = os.getenv('BASEURL', 'http://127.0.0.1:8000')
|
||||||
DESCRIPTION = os.getenv('DESCRIPTION', 'CLI-only pastebin powered by linedump.com')
|
DESCRIPTION = os.getenv('DESCRIPTION', 'CLI-only pastebin powered by linedump.com\nOpen Source: https://git.uphillsecurity.com/cf7/linedump').replace('\\n', '\n')
|
||||||
MAX_FILE_SIZE_MB = int(os.getenv('MAX_FILE_SIZE_MB', '50'))
|
MAX_FILE_SIZE_MB = int(os.getenv('MAX_FILE_SIZE_MB', '50'))
|
||||||
RATE_LIMIT = os.getenv('RATE_LIMIT', '50/hour')
|
RATE_LIMIT = os.getenv('RATE_LIMIT', '50/hour')
|
||||||
URL_PATH_LENGTH = int(os.getenv('URL_PATH_LENGTH', '6'))
|
URL_PATH_LENGTH = int(os.getenv('URL_PATH_LENGTH', '6'))
|
||||||
|
|
@ -292,7 +292,7 @@ async def upload_text(request: Request, authorized: bool = Depends(validate_uplo
|
||||||
size_bytes=len(content))
|
size_bytes=len(content))
|
||||||
|
|
||||||
# Return URL and deletion token
|
# Return URL and deletion token
|
||||||
return f"{BASEURL}/{random_path}\nDelete with HTTP POST: {BASEURL}/{random_path}?token={deletion_token}\n"
|
return f"{BASEURL}/{random_path}\nDelete with HTTP POST:\n{BASEURL}/{random_path}?token={deletion_token}\n"
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log("ERROR", "upload_failed",
|
log("ERROR", "upload_failed",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue