An open API service indexing awesome lists of open source software.

https://github.com/jrodal98/transfer

A bash script for uploading and downloading from https://transfer.sh/ and https://0x0.st/
https://github.com/jrodal98/transfer

Last synced: about 1 year ago
JSON representation

A bash script for uploading and downloading from https://transfer.sh/ and https://0x0.st/

Awesome Lists containing this project

README

          

# transfer

A bash script for uploading and downloading from and .

Submit an issue for support for similar sites.

## Features

* Upload files
* Upload directories (archives them as they are being uploaded)
* Download files
* Encrypt files as they are being uploaded
* Decrypt files as they are being downloaded
* Decrypt files after they are downloaded
* Log urls to `~/.transfer_history`
* Provide default password with `pass`

## Dependencies

* bash
* curl
* gpg
* tee
* tar
* pass (optional)

These are installed by default on most Linux systems. Refer to your package manager if you need to install them.

## Installation

0) Clone the repository `git clone https://github.com/jrodal98/transfer.git && cd transfer`
1) Install the dependencies listed above using your package manager.
2) Optionally, set a default password using `pass insert transfer` and/or change the default password in the `transfer.sh` file (highly recommended)
3) Add `$HOME/bin` to your path. If you use bash, then you would add `export PATH="$HOME/bin:$PATH"` to your `~/.bashrc`. If using zsh, add that line of code to your `~/.zshrc` file.
4) Run `./install.sh`

Alternatively, you can just call the `transfer.sh` script directly instead of doing steps 3-4, but I don't recommend this, as it's more verbose. You could also install the program by running `sudo mv transfer.sh /usr/bin/transfer`, but I'm not sure if there are other shell scripts called transfer in the wild, so this could be dangerous.

## Examples

* Upload a file or directory: `transfer `
* Automatically encrypt a file or directory using a default password while uploading: `transfer -e `
* Automatically encrypt a file or directory using a provided password while uploading: `transfer -e -p `
* Download a file: `transfer `
* Automatically decrypt a file using a default password while downloading: `transfer -d `
* Automatically decrypt a file using a provided password while downloading: `transfer -d -p `
* Decrypt file with default password: `transfer -d `
* Decrypt file with a provided password `transfer -d -p `
* Do all of the above but upload to instead: `transfer -s 0x0.st `

## Unimplemented features

* Automatically copy urls to clipboard (`-c flag`, will add xclip as a dependency)
* Specify maximum number of downloads
* Specify maximum life of url
* cronjob for deleting expired urls from `~/.transfer_history`