Code Monkey home page Code Monkey logo

notp's Introduction

notp

Continuous Integration

notp is a CLI tool for generating one time passwords from CLI. Highly influenced by 2FA repository from rsc.

Installation

You can clone the repository and build it from the source, download using crate.io or just download the binary that goes well with your OS from the latest release

Usage

# Let's see what we have here.
$ notp --help
# notp supports --key and --stdin exclusively. If you want to keep your secret secret,
# I urge you to use --stdin flag. --key is also usefull when you want to combine notp with
# shell tools and don't want to pass your secret using echo and such. Also, for the sake of 
# simplictiy I'll keep using --key flag throughout this documentation.
# Alrigh, lets say I'd like to add a Google account.
$ notp add taylan-google --key superSecretKey
# you have to provide secret code when stdin prompts.
# OR
$ notp add taylan-google --stdin
# Key: <you will type your encryption key here>
# Enter secret prompt: <You will paste your OTP secret here>
$ notp list
$ notp get <name> --key superSecretKey 

OTP generation only supports 6 digit codes, for now.

notp uses default config path on the OS that you're using. Such as ~/.config/notp for Linux, \AppData\Roaming\notp for Windows and ~/Library/Preferences/notp for iOS and encrypts the file AES with the given key from CLI as an argument.

The default time-based authentication codes are derived from a hash of the key and the current time, so it is important that the system clock have at least one-minute accuracy.

Example

Adding new secret:

$ notp add AWS --key ttaayyllaann 
Please enter the secret: NRNM7KGFTR6SUMPBAEMBETM2WGKVUWHH6Y4VEGNPZON3GMVXBHF...
$
# There won't be any confirmation messages that indicates successfull insertion
# but there will be error messages if something wents wrong.

Checking existing secrets you have:

$ notp
1. AWS
2. Google
$

Generating the OTP code:

$ notp get AWS --key ttaayyllaann
442659
$ 

Deleting a secret:

$ notp delete AWS
AWS Deleted!

Copying OTP code into the clipboard:

$ notp  get AWS --key ttaayyllaann -c
442659

notp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rustbunker

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.