From 652c30677ec17405f3c019490c2daf01297b66a5 Mon Sep 17 00:00:00 2001 From: Caffeine Fueled Date: Thu, 16 Oct 2025 16:31:12 +0000 Subject: [PATCH] add GPG example --- Usage.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Usage.md diff --git a/Usage.md b/Usage.md new file mode 100644 index 0000000..130c082 --- /dev/null +++ b/Usage.md @@ -0,0 +1,50 @@ +## Encryption with GPG + +_Replace `curl` with any other tool that can send HTTP POST requests. Example on Linux._ + + **Upload** + +String: +: `echo "Cheers" | gpg --symmetric --armor | curl -X POST --data-binary @- https://linedump.com` + +File: +: `gpg --symmetric --armor file.txt -o - | curl -X POST --data-binary @- https://linedump.com` + +Command: +: `ip -br a | gpg --symmetric --armor | curl -X POST --data-binary @- https://linedump.com` + + **Download** + +Save to file: +: `curl -s https://linedump.com/{paste_id} | gpg --decrypt -o output.txt` + +### Example + +**1. Upload** + +```bash +echo "Cheers" | gpg --symmetric --armor | curl -X POST --data-binary @- https://linedump.com +https://linedump.com/xGuiMp +Delete with HTTP POST: https://linedump.com/xGuiMp?token=x2NTpUh_JH7rwCdZ3gFDDAsCmAACkpYhZAaW0PP8 +``` + +**2. Checking encrypted content the server sees** + +```bash +curl https://linedump.com/xGuiMp +-----BEGIN PGP MESSAGE----- + +jA0ECQMKjt5qCUrYoIj/0jwBPzikbS57PpJ0QR+5nlKXppAfkyVci7mI5kR3+zmC +HOQYztfu4JXW1sEGaH3OPD0KlmBwpWIpbuSU2VE= +=uRk1 +-----END PGP MESSAGE----- +``` + +**3. Download and decryption** + +```bash +curl -s https://linedump.com/xGuiMp | gpg --decrypt +gpg: AES256.CFB encrypted data +gpg: encrypted with 1 passphrase +Cheers +``` \ No newline at end of file