add GPG example
parent
51d517a402
commit
652c30677e
1 changed files with 50 additions and 0 deletions
50
Usage.md
Normal file
50
Usage.md
Normal file
|
|
@ -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
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue