Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

randpass

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randpass

  • 0.3.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Randpass v0.3.0

Ruby random password generator.
Generate password and copy in clipboard, or generate list and/or save as .txt file.
File is saved as plain text, it is up to end-user to decide how to secure it.

Password is generated with SecureRandom#base64 and a few (random) special characters ! # * $ % _ @

Dependencies

Randpass use clipboard-gem, that require xsel or xclip on Linux systems.
Setup script will check and install xsel if nothing is found.

How to use:

Use from terminal:

When generating a single password, you don't need any argument, or you can add number of password characters (default is 25). By default, password is printed in STDOUT and copied to clipboard, but not saved as file.

  • generate password with 25 characters
    randpass

  • generate password with 30 characters
    randpass 30
    randpass --char 30

  • clear clipboard
    randpass -k
    randpass --clear

  • add -c or --noc to disable clipboard copy
    randpass 35 -c

  • add -p or --nop to disable STDOUT
    randpass 20 -p

When generating a list of passwords, you need to supply -n or --char to set number of password characters (default is 25). Passwords will be saved in a current working directory (unless otherwise specified) in format randpass_#{Time.now.to_i}.txt. This way we avoid overwrite, and it's possible to get time of file generation with Time.at TIME_INTEGER

  • generate password list from comments (20 characters long password)
    randpass -n 20 -l GitHub RubyGems AnotherWebSite

  • generate password list with 10 passwords - without comments
    randpass -r 10
    randpass -n 20 -r 10

  • add -s or --nos to disable saving list as a file
    randpass -n 20 -r 5 -s randpass -r 10 --nos --noc

  • add -d or --dir as location to store password list
    randpass -r 10 -d 'my_path/directory'

How to install

  • install from rubygems
gem install randpass && randpass -i
  • download from github with ssh
git clone git@github.com:alx3dev/randpass \
cd randpass && randpass -i
  • download from github with https
git clone https://www.github.com/alx3dev/randpass \
cd randpass && randpass -i

Tested on:

  • ruby 2.7.5
  • ruby 3.0.3
  • ruby 3.1.0
  • ruby 3.1.3
  • jruby 9.3.2.0

FAQs

Package last updated on 26 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc