Skip to main content

Manage your uploads to 0x0.st from the cli.

Project description

Project generated with PyScaffold

nptr-cli

Manage your uploads to 0x0.st from the cli.

nptr-cli exists to easily upload to 0x0.st via the cli. It also prints the tokens to delete uploads from 0x0.st.

It also can be used as a library for other python projects.

Installation

pip install nptr-cli

Usage

To upload files:

$ 0x0 u file.txt # you can also use `0x0 up` or `0x0 upload`
$ echo "this will be uploaded" | 0x0 # You can omit the u, it is the default when you pipe into `0x0`
$ 0x0 -i https://your-0x0-instance.com u file.txt # To use other instances than 0x0.st
$ 0x0 -i alias u file.txt # can also be an alias defined in your config.toml
$ 0x0 u -s file.txt # To use longer paths in the URL which are harder to predict like https://0x0.st/s/123acb-319gas8dgh8ahdg8/a8gn.txt

All these commands will output something like this:

https://0x0.st/abcd.txt
Expires: 1234567890
Token: TOKEN

To delete files:

$ 0x0 d TOKEN URL # you can also use `0x0 del` or `0x0 delete`

To get more info about 0x0 use:

$ 0x0 -h
$ 0x0 delete -h
$ 0x0 upload -h

Configuration

The config file is located at ~/.config/0x0/config.toml.

These are the default values currently, if nothing is set (See also [#Usage]).

quiet=false # same as -q/--quiet
instance=https://0x0.st # same as -i/--instance
secret=false # same as -s/--secret

As mentioned earlier you can also add instance aliases and basic auth credentials.

Instance Aliases

Aliases work like this:

[instances]

[instances.my_instance] # now you can use `0x0 -i my_instance`
url = https://my_instance.tld # it will use this domain
username = admin # and if you provide a username
password = admin # and password (which are optional),
# it will authenticate via http basic auth

Also have a look at the documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nptr-cli-0.5.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nptr_cli-0.5-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file nptr-cli-0.5.tar.gz.

File metadata

  • Download URL: nptr-cli-0.5.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for nptr-cli-0.5.tar.gz
Algorithm Hash digest
SHA256 ce0d27cebdf896e38744e391e7ad301dbc1819e3718dc9e44e40fabc5fda2f10
MD5 ee4b573632d85063754feb953442f2ab
BLAKE2b-256 bc9a02b04c317284803441b5f32921c6a3eba958a6ba9fcac32f539805ab7d94

See more details on using hashes here.

File details

Details for the file nptr_cli-0.5-py3-none-any.whl.

File metadata

  • Download URL: nptr_cli-0.5-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for nptr_cli-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f8e0c9c063c68c55eeb258f2dc2b4b9703b82a39d605ab8a1d0d14fef3ad6e63
MD5 f089dde4f1851c91d299faa95029bc3b
BLAKE2b-256 0dd9927d9b0ac41e3dcd42ae0a6a82c1f3103df752d1dc4b6bf72acdb36a3b49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page