Skip to main content

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

Project description

PyPI-Server

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

The package is on pypi.

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.1.tar.gz (29.9 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.1-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nptr-cli-0.5.1.tar.gz
  • Upload date:
  • Size: 29.9 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.1.tar.gz
Algorithm Hash digest
SHA256 7e406ab1416a7fe70ba0726560613ad6b28f169447753d4fb1b292af115a5857
MD5 465b3a714e88c6767ee28964c2a0df4a
BLAKE2b-256 0d4b016633f0d8a8d39b8126f26136a9731a68de503e95bf9a5352be71811943

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nptr_cli-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 17.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33ca6c40f348dcc3388eacad3c1a95c5caa95e74cf38e1dce14adebf7fc0ba43
MD5 b1dc62d92b700a7d225bbee92a16fb10
BLAKE2b-256 28076d5dc114d6dab3a408493dc29a9d7ce153bfc5eeb78624f573aa18aae33a

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