Git Product home page Git Product logo

passbird's Introduction

Passbird 🐦‍⬛

Passbird is an npm library for generating and validating passwords.

Installation

To install Passbird globally on your system, run:

npm install -g passbird

To install Passbird in an specific context, run:

npm install passbird

Usage (when installed globally)

To use Passbird, start by running:

passbird start

You will be asked to choose the type of password you want to generate:

$ passbird start
? Want to generate a default or memorable password or want to validate a password? (Use arrow keys)
❯ Default
  Memorable
  Validate

Default Password

If you choose the "Default" option, you will be asked the following questions:

? What type of password do you want to generate? Default
? How long do you want the password to be? 10
? Include uppercase letters? Yes
? Include numbers? Yes
? Include symbols? Yes

After answering these questions, Passbird will generate a random password for you, like this: :v/rz!p6SR

Memorable Password

If you choose the "Memorable" option, you will be asked the following questions:

? What type of password do you want to generate? Memorable
? Include uppercase letters? Yes
? Include numbers? Yes
? Include symbols? Yes
Please, enter the words separated by commas: Andrés, Lina

After answering these questions, Passbird will generate a memorable password for you, like this: AndrésdLina16M.. If you're not satisfied with the password, you can choose to generate a new one:

Are you satisfied with the password? (y/n) n
Please, enter the words separated by commas:

Validate

This section of the code introduces a feature that validates any given password against the Have I Been Pwned (HIBP) API.

$ passbird start
? Want to generate a default or memorable password or want to validate a password? Validate
? Insert password to validate: Loi

Warn:
Password has been exposed in previous data breaches.

Usage (when installed in an specific context)

If you want to use an specific function (default, memorable or validate password), run:

For default:

node default.js <length> <includeUppercase> <includeNumbers> <includeSymbols>

The command will be something like:

node default.js 10 true true true

If you want to import it and use it in your project:

import { generatDefaultePassword } from '../node_modules/passbird/src/index.js';

// Define arguments
let length = 10;
let includeUppercase = 'true';
let includeNumbers = 'true';
let includeSymbols = 'true';

// Call the function
let password = generatDefaultePassword(length, includeUppercase, includeNumbers, includeSymbols);

For memorable:

node memorable.js <includeUppercase> <includeNumbers> <includeSymbols>

The command will be something like:

node memorable.js true true true

Then, you will be ask for write the words you want to use.

If you want to import it and use it in your project:

import { generateMemorablePassword } from '../node_modules/passbird/src/index.js';

// Define arguments
let includeUppercase = 'true';
let includeNumbers = 'true';
let includeSymbols = 'true';

// Call the function
generateMemorablePassword(includeUppercase, includeNumbers, includeSymbols);

For validate:

node validate.js <password>

The command will be something like:

node validate.js password123

If you want to import it and use it in your project:

import { validatePassword } from '../node_modules/passbird/src/index.js';

// Define the password
let password = 'password123';

// Call the function
validatePassword(password);

Note that default.js and memorable.js return the variable "password", so you can use it in your project but validate.js returns a message if the password is breached or not.

Contributing

We welcome contributions to Passbird! If you're interested in improving this library, there are many ways you can contribute:

  • Submit bug reports and feature requests on our GitHub issues page.
  • Review and improve our documentation.
  • Review and refactor our existing code.
  • Add new features and enhancements.

To get started, please fork the Passbird repository, make your changes, and submit a pull request. We look forward to collaborating with you!

License

Passbird is licensed under the MIT License. See the LICENSE file for more details.

passbird's People

Contributors

andibird avatar

Stargazers

 avatar

Watchers

 avatar

passbird's Issues

Hash and Salt Functions

Provide functions to apply hash and salt to passwords, which is a common practice in password security.

Security Evaluation

Incorporate a function that evaluates the strength of the generated passwords and offers suggestions for enhancing their security.

Customizable Patterns

Allow users to define custom patterns for passwords, such as including specific symbols, numbers, or uppercase letters at determined positions.

Breach Data API Integration

Connect your library with an API that checks if the generated passwords have been exposed in previous data breaches.

Phrase-Based Generation

Create an option to generate passwords based on memorable phrases, which can make them easier to remember for users.

User Interface

While your library is for developers, consider offering a simple user interface that can be used by non-technical individuals.

Multilingual Functionality

Add support for multiple languages, allowing passwords to include characters from different alphabets or writing systems.

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.