rand¶
Generate random data.
Synopsis¶
Description¶
Generate random data in various formats: strings, integers, hex, base64, passwords, or passphrases.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--type |
-t |
Type: str, int, hex, base64, password, phrase |
str |
--length |
-l |
Length of output (chars for str/hex/base64/password, words for phrase) | 16 |
--count |
-n |
Number of values to generate | 1 |
--min |
Minimum value for int type | 0 |
|
--max |
Maximum value for int type | 100 |
|
--charset |
-c |
Custom character set for str type |
Examples¶
Random string:
Random integer:
Random hex string:
Random base64:
Generate a password:
Generate a passphrase:
Multiple values:
Custom character set:
Types¶
| Type | Description |
|---|---|
str |
Alphanumeric string (A-Z, a-z, 0-9) |
int |
Integer within min/max range |
hex |
Hexadecimal string (0-9, a-f) |
base64 |
Base64-encoded random bytes |
password |
String with letters, numbers, and symbols |
phrase |
Random words (passphrase style) |