360 Secure SkillHub
360 安全技能中心

Cn Password Generator V2

通过 Python 脚本在命令行生成随机密码,支持设置长度、生成数量和是否包含大写、小写、数字、符号四类字符,默认长度 16。基于 Python secrets 模块实现随机生成,无外部依赖,结果以 JSON 形式打印到终端。

freedompixels
freedompixels
热度 45.91
最近更新 2026-06-07 10:31:28
分类:安全依赖:代码执行应用场景:自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cn-password-generator-v2
Metadata
slug
cn-password-generator-v2
name
Password Generator V2
version
1.1.0
description
Generate cryptographically secure random passwords with customizable character sets. Control length, include/exclude character types. Pure Python, no API key required.
keywords
password, generator, random, secure, security
license
MIT-0
tags
["tools"]

Password Generator V2

Generate strong, random passwords.

Features

  • Cryptographically secure random generation
  • Customizable length (default: 16 characters)
  • Toggle character types: uppercase, lowercase, digits, symbols
  • Generate multiple passwords at once
  • Pure Python, no external dependencies

Character Types

  • Uppercase: A-Z (26 characters)
  • Lowercase: a-z (26 characters)
  • Digits: 0-9 (10 characters)
  • Symbols: !@#$%^&* (8 characters)

Usage

# Default: 16 chars, all types
python3 scripts/pwd_gen_v2.py

# 24 chars, no symbols
python3 scripts/pwd_gen_v2.py --length 24 --no-symbols

# 5 passwords, 12 chars each
python3 scripts/pwd_gen_v2.py --length 12 --count 5

# Letters only (no digits, no symbols)
python3 scripts/pwd_gen_v2.py --length 20 --no-digits --no-symbols

Example Output

{
  "passwords": [
    "Kj8#mNp2$xL9@vQw7",
    "Rt4&fBc6%Yn3*Hs8j"
  ],
  "length": 16
}

Security Notes

  • Uses Python's secrets module for cryptographic randomness
  • Suitable for generating passwords, API keys, tokens

出品: AISoBrand|爱索品牌 — AI搜索优化工具
官网: https://aisobrand.com
免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果