Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
passgen — Generate passwords from the terminal | Kitploit
Tools/GitHubGitHub/bilalbaraz/passgen
General Purpose UtilitiesPassword CrackingEncryption/Decryption ToolsPrivacyAuthentication
GitHubbilalbaraz/passgen

passgen

Generate passwords from the terminal

View Repository
236 months agoNot yet reviewed
Website

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

PassGen Banner

🔐 passgen — Generate passwords from the terminal

GitHub Release Codecov OpenSSF Scorecard OpenSSF Best Practices

PassGen Demo

A small Go CLI that generates secure random passwords with flexible character sets and exclusions.

Uses crypto/rand for cryptographically secure randomness. If no charset flags are provided, all sets are enabled by default.

Installation

Go

root@kitploit:~
# latest
go install github.com/bilalbaraz/passgen@latest

# specific version
go install github.com/bilalbaraz/passgen@<version>

Homebrew

root@kitploit:~
brew tap bilalbaraz/tap
brew install passgen

Linux amd64

root@kitploit:~
wget -L https://github.com/bilalbaraz/passgen/releases/latest/download/passgen_linux_amd64.zip \
&& unzip passgen_linux_amd64.zip \
&& sudo mv passgen /usr/local/bin/ \
&& rm passgen_linux_amd64.zip

Linux arm64

root@kitploit:~
wget -L https://github.com/bilalbaraz/passgen/releases/latest/download/passgen_linux_arm64.zip \
&& unzip passgen_linux_arm64.zip \
&& sudo mv passgen /usr/local/bin/ \
&& rm passgen_linux_arm64.zip

Quickstart

root@kitploit:~

# basic (defaults to all character sets)
passgen --len 16 --count 3

# lower/upper/digits only
passgen --len 24 --count 5 --lower --upper --digits

# symbols only, excluding "@$"
passgen --len 20 --symbols --exclude "@$"

# exclude ambiguous characters (0 O 1 l I)
passgen --len 16 --no-ambiguous

# copy generated passwords to clipboard
passgen --len 20 --count 3 --copy

# render first password as QR code in terminal (requires -count 1)
passgen --len 20 --qr

Development

root@kitploit:~
go run .
go build .
go run ./cmd/passgen
go build ./cmd/passgen
go test -v ./...

Command Surface

  • Length: --len <n> or -l <n>
  • Char sets: --lower, --upper, --digits, --symbols
  • Count: --count <n> or -c <n>
  • Exclude chars: --exclude "..." or -x "..."
  • No ambiguous: --no-ambiguous
  • Copy to clipboard: --copy or -p
  • QR code: --qr or (only when )

Configuration

No config file. All behavior is controlled via CLI flags.

Notes

  • Errors are printed to stderr and exit with code 1 on invalid input.
  • -copy uses pbcopy (macOS), clip (Windows), or wl-copy/xclip (Linux).
Download Tool
-q
--count 1
  • Help: -h / --help